Questions of Dec 1, 2002

Sarah sarahr at
Mon Dec 2 22:20:00 EST 2002

> (1) how to create polygons, scripted,properly.
>        set the templateGraphic to polygon
>        choose graphics tool
>        ..... and how to proceed, properly.
set "the points" of the polygon.
The "points" is a list of coordinate pairs x,y on separate lines.
e.g. to create a graphic & draw a square:

create graphic "Box"
set the style of graphic "Box" to "polygon"
set the points of graphic "Box" to "50,50" & cr & "50,100" & cr & \
       	"100,100" & cr & "100,50" & cr & "50,50"

> (2) how to set a polygon to transparent, scripted. Trying a transparent
> style does not work, and there is no other property to that end.
set the opaque of graphic "What" to false

> (3) how to create graphics lines, scripted. the "line" style does not 
> work.
> Maybe I asked this before.
Exactly the same way as for a polygon, just use a different set of 
points. You can set the style to "line" or "polygon". It doesn't seem 
to matter much. If you use line, remember to put it inside quotes or 
you'll get an error.
> (4) How to get the rgb version of a Color specified by name.
>     That is, set the backgroundColor to "Violet1", say.
>      and then, scripted, set the foregroundcolor to something slightly
> different.
>     Or, to get the backgroundColor in rgb, no matter how it was 
> entered.
This is a basically unsolved problem. Rev just uses a lookup table to 
get color names vs RGB values. Unfortunately, when you then query the 
color of something that was set using a name, it returns the name and 
not the RGB values.
If you want to find the complete list, open up the Application Overview 
and turn on Revolution UI stacks in list. Find revColors.rev and go to 
the only card in the only stack. Have a look at the properties and go 
to the Custom tab, then turn on "Show Revolution UI custom properties". 
The cRevColorTranslation property gives you all the names & RGB 

> (5) Are there arrays of anything. Specially, I'd like to talk memo[21] 
> =
> someOtherArray .
>      and even more, later talk get memo[21][receiver], say.
I'll leave this one to the array experts on this list...


More information about the Use-livecode mailing list