On 08/01/2007, at 12:02 AM, Emile SCHWARZ wrote:
Say I want to draw a color gradiant (shade of colors) from RGB (255,127,0) to RGB(0,127,255) [I put arbitrary RGB values here since this can be the case: I ask the user the start and end colors and (s)he can place &c000000 or click on a Canvas rect to choose a color in the OS palettes]

As recently discussed on the Blurry Canvas thread.

Download the ScriptPictureEffects from

http://www.oofile.com.au/downloads.html#DownloadREALbasic

You can use the method in the PictureEffectsScripter class, test it in that app with a script like this:
LinearGradient &cFF2020, &c000000, 0

Note that it allows for a rotated gradient, using PictureEffects to rotate the picture. At an angle of 0, it just draws straight onto a Graphics object.

enjoy

Andy Dent BSc  MACS   http://www.oofile.com.au/
OOFILE - Database, Reports, Graphs, GUI for c++ on multiple platforms
REALbasic, C++, Python, Mac and Windows development and porting



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to