Drawing a curved shape (vector graphics)

Graham Samuel livfoss at mac.com
Thu Jan 29 06:07:46 EST 2009


It seems funny that after all these years I've never tried this, but I  
realise I don't know how to draw a curved shape by script. I see from  
the Rev documentation that the style of a graphic can be 'curve' and  
that the shape of the graphic can be defined by its points, but that  
doesn't tell me how to produce a smooth curve which will still look  
curved at any degree of enlargement or resolution.

For example if I set a graphic to style 'curve' and draw it by  
calculating a circular path with a point every few degrees, I will get  
a circle. But is this **really** a circle or is it rather a polygon  
with a lot of small straight sides? If the latter, it wouldn't look  
good after enlargement or when printed on a high-resolution printer,  
would it? And what if I want to draw a far more complex shape  
consisting perhaps of straight lines and more than one kind of curve?  
All this is easy in drawing programs, but how would one do it with Rev  
scripting? Maybe I just missed the relevant documentation, but up to  
now I can't see the answer.

TIA

Graham




More information about the use-livecode mailing list