Onwards and Upwards
[1/6] from: sanghabum:aol at: 6-Jun-2001 5:05
Hi guys,
Any VID experts got any idea how to render text vertically? I'm trying to
draw a bar chart, and the Y-axis is crying out for text that goes up rather
than along.
(I wrote the other day that I was trying to run before I could walk with
Rebol, and many this proves it).
Thanks,
Colin.
[2/6] from: carl:cybercraft at: 6-Jun-2001 23:22
On 06-Jun-01, [Sanghabum--aol--com] wrote:
> Hi guys,
> Any VID experts got any idea how to render text vertically? I'm
> trying to draw a bar chart, and the Y-axis is crying out for text
> that goes up rather than along.
There used to be a bug that'd do this for you. (:
Try this...
view layout [
across box blue 24x300 "V^/e^/r^/t^/i^/c^/a^/l^/"
box blue 300x300 "Chart"
]
An alternative might be to write to a face and rotate it if you want
the text rotated as well.
> (I wrote the other day that I was trying to run before I could walk
> with Rebol, and many this proves it).
> Thanks,
> Colin.
--
Carl Read
[carl--cybercraft--co--nz]
[3/6] from: sterling:rebol at: 6-Jun-2001 10:13
How's this? Sometimes the simple tricks work well enough...
view layout [
across
txt 10x200 "vertical text" font [name: font-fixed]
txt "horizontal text"
]
The only problems you have are spaces in the string and you have to
get the right width for the font you choose. Fixed width is easier to
use because groups of thin letters like "it" will often end up on the
same line otherwise.
Sterling
[4/6] from: arolls:bigpond:au at: 7-Jun-2001 4:36
Layout some text, convert to an image,
then use the inbuilt 90 degree rotation
effect to display it sideways. See below.
> Any VID experts got any idea how to render text vertically? I'm trying to
> draw a bar chart, and the Y-axis is crying out for text that goes
> up rather
> than along.
> Thanks,
> Colin.
;original
img: to-image layout [
origin 0x0
space 0x0
H1 "hello there"
]
view center-face layout [image img]
; one way - make the face yourself
rot-face: center-face make face [
image: img
size: reverse img/size ; (width, height) -> (height, width)
edge: none
effect: [rotate 90]
]
view rot-face
; or another way - lay it out with layout
view center-face layout [
origin 0x0
image img reverse img/size effect [rotate 270]
]
Regards,
Anton.
[5/6] from: petr:krenzelok:trz:cz at: 6-Jun-2001 21:25
The solution works untill there is no underlying face image or the face is
transparent. For most cases should be sufficient though ...
-pekr-
[6/6] from: g:santilli:tiscalinet:it at: 7-Jun-2001 13:53
Petr Krenzelok wrote:
> The solution works untill there is no underlying face image or the face is
> transparent. For most cases should be sufficient though ...
In that case, one could use something like:
view layout [
image %bay.jpg effect [
rotate 90
draw [text 20x80 "Rotated text"]
rotate 270
]
]
Regards,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/