As a part of a bigger application I want to draw a graph
with labeled nodes and lines connecting the labels.
The node positions will be in the "db" and editable,
but the drawing I want generic, so that there should
be a way to calculate the size of the label,
"obj.BoundingBox()" so to say.
An example:
test: func [spec] [
view layout [box 400x800 black effect [draw spec]]
]
bold20: make face/font [style: 'bold size: 20]
test [
pen yellow
line 30x30 60x260
fill-pen yellow
pen navy
box 18x18 220x42
font bold20 text anti-aliased "Some labeled graph" 20x20
box 50x250 110x280
text "Hello!" 52x252
]
How that can be done? I can restrict the app to
have only one font size and only one font, and
it is OK if there is only an approximative estimation
for the bounding box (yellow box in the code).
And the font can be fixed to be Arial or something with
regular spacing. But if there is an even more generic
way, the better...
(I have used Rebol many years, but have not
done many visual apps with it).
Any help appreciated, and Happy New year too!