REBOL 3.0

Default TEXT setup in DRAW?

Carl Sassenrath, CTO
REBOL Technologies
28-Aug-2008 18:33 GMT

Article #0143
Main page || Index || Prior Article [0142] || Next Article [0144] || 20 Comments || Send feedback

The DRAW dialect requires each TEXT command to setup its font, para, and other attributes. However, for things like GUI's, most of the time, those attributes are the same.

Question: should we find a way to specify default TEXT attributes that are valid for the duration of the DRAW block?

This would reduce the overhead for things like the GUI, which tend to use a large number of TEXT blocks within DRAW GOBs. (E.g. for text-list styles.)

Example of current method:

drawing: [
    some-graphics
    text 5x5 [font f1 para p1 "choice 1"]
    text 5x25 [font f1 para p1 "choice 2"]
    text 5x45 [font f1 para p1 "choice 3"]
    ...
]

Possible future method:

drawing: [
    some-graphics
    text-options [font f1 para p1]
    text 5x5 "choice 1"
    text 5x25 "choice 2"
    text 5x45 "choice 3"
    ...
]

We may have talked about this before, but it's time to reach a conclusion.

20 Comments

REBOL 3.0
Updated 25-Jul-2017 - Edit - Copyright REBOL Technologies - REBOL.net