Thread

Index > Scripting > how about an examples / codebase portion of the forum
Author/Date how about an examples / codebase portion of the forum
exosceleton
12/03/2007 6:54am
for instance

in I.mage this:
/////////////////////////////////////////////////////
w = 144;
h = 32;
edge = 3;
r = 7;

create (w+3, h+3, 32);

newpath (q);
rgb( 255, 255,255);
rect (q,0,0,w+3,h+3);
fillpath (q);

// bordershadow

newpath (p);
rgb( 150,150,150);
roundrect (p, 3, 3, w+2, h+2, r);
fillpath (p);

blur( 2.5);

// Draw the fill first
newpath (p);
roundrect( p, edge, edge, w - edge, h - edge, r - edge);
lineargradient( edge, edge, edge, h - edge);
addstop( 0, 100,100,100, 255);
addstop (1, 16,174, 16, 255);
fillpath (p);



// Border + text in one render
newpath (p);
roundrect (p, 0, 0, w, h, r);
roundrect (p, edge, edge, w - edge, h - edge, r - edge);
font( Verdana, 17, "");
text( p,38, 24, "Route");
lineargradient (0, 0, 0, h);
addstop( 0, 16, 174, 16, 255);
addstop( 1, 255, 255, 255, 255);
fillpath (p);

save ("c:\mei\routebuttonimage.png");
//////////////////////////////////////////////////////////////////

makes this:

fret
13/03/2007 6:23am
This is the right place to post examples.

Thanks for contributing.
Reply