|Bug#: 175||Product: i.Mage||Version: 1.08||Platform: PC|
|OS/Version: Windows 2000||Status: RESOLVED||Severity: major||Priority: P1|
|Resolution: FIXED||Assigned To: firstname.lastname@example.org||Reported By: email@example.com|
|Component: User Interface|
|Summary: v 1.08 script function broken|
|Opened: 2008-01-12 19:18|
|Description:||Opened: 2008-01-12 19:18|
i needed to change a menu image for a website so i ran the script i had saved. Apparently i upgraded to 1.08 since the creation of the original, but the result was not what i expected. an image is worth a thousand words so i suggest you just run in 1.06 and in 1.08: //////////////////////////////////////////////////////// w = 144; h = 32; edge = 3; r = 7; create (2*w+6, 2*h+6, 32); newpath (q); rgb( 255, 255,255); rect (q,0,0,2*w+6,2*h+6); fillpath (q); // 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,5, 24, "Contactinfo"); lineargradient (0, 0, 0, h); addstop( 0, 100, 100, 100, 255); addstop( 1, 200, 200, 200, 255); fillpath (p); // Border + text in one render newpath (q); roundrect (q, 0, h+6, w, 2*h+6, r); roundrect (q, edge, h+6+edge, w - edge, 2*h+6 - edge, r - edge); font( Verdana, 17, ""); text( q,3, 24+h+6, "Foto's"); lineargradient (0, h+6, 0, 2*h+6); addstop( 0, 200, 200, 200, 255); addstop( 1, 100, 100, 100, 255); fillpath (q); // Border + text in one render newpath (t); roundrect (t, w+6, 0, w+30, 12, r); roundrect (t, w+6+edge, edge, w+30 - edge, 12 - edge, r - edge); rgb(100,100,100); fillpath (t); // Border + text in one render newpath (y); roundrect (y, w+6, h+6, w+30, h+6+12, r); roundrect (y, w+6+edge,h+6+ edge, w+30 - edge, h+6+12 - edge, r - edge); rgb(200,200,200); fillpath (y);
This is fixed for the next build. The text positions aren't exactly the same as before so you'll need to adjust your script a little. The positioning of things of text changed to improve it's accuracy, and so you were previously adjusting for that error in your script. I'll try and make a release soon. The problem was that text applies a transform to the path... so if you use a single peice of text per path you don't see that issue.
but there is only one text statement per newpath / fillpath group?
So it's interfering with the other shapes in the same path... it translates them. Nevermind, I'll put a fix online tonight.
Oh, i see, ONLY the one text statement per path. Got you. If you get round to it, i'll understand if you've got (scribe)priorities.
Try this: http://www.memecode.com/data/image-win32-v109.exe You'll have to adjust your script... but it should be ok after that.
looks great, 5 pix more in height coord and everything looks good again, even the gradient. Thanks fret!
Created an attachment (id=39) [details] result This is the image i was was working on. I started out trying to code the entire thing, but have not succeeded in creating the correct curves yet. There is a lot of cut and paste work in there now. I'll post the examples forum if i get anywhere usefull.
Looks like you could use a loop over the middle bits, once you got one right, you should be able to get the rest in one hit. Maybe it'd be useful to be able to import paths from file, e.g. create a path in InkScape and then import it into a i.Mage path object using an import function and use it in your drawing.... hmmmm sound good?
would that import to the drawing, or to the scribe script function?
I guess I could do both, but initially I'd just import a path into a script variable and let you play with it in script.