First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 175
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Matthew Allen <fret@memecode.com>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: exosceleton <exosceleton@hotmail.com>
Add CC:
CC:
URL:
Summary:

Attachment Type Creator Created Size Actions
result image/x-png exosceleton 2008-01-14 07:11 19.52 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 175 depends on: Show dependency tree
Show dependency graph
Bug 175 blocks:

Additional Comments:







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


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);

------- Comment #1 From Matthew Allen 2008-01-13 02:15:09 -------
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.

------- Comment #2 From exosceleton 2008-01-14 06:31:03 -------
but there is only one text statement per newpath / fillpath group?

------- Comment #3 From Matthew Allen 2008-01-14 06:35:00 -------
So it's interfering with the other shapes in the same path... it translates
them. Nevermind, I'll put a fix online tonight.

------- Comment #4 From exosceleton 2008-01-14 06:39:46 -------
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.

------- Comment #5 From Matthew Allen 2008-01-14 06:57:20 -------
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.

------- Comment #6 From exosceleton 2008-01-14 07:04:59 -------
looks great, 5 pix more in height coord and everything looks good again, even
the gradient.

Thanks fret!

------- Comment #7 From exosceleton 2008-01-14 07:11:29 -------
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.

------- Comment #8 From Matthew Allen 2008-01-14 09:25:45 -------
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?

------- Comment #9 From exosceleton 2008-01-14 09:35:50 -------
would that import to the drawing, or to the scribe script function?

------- Comment #10 From Matthew Allen 2008-01-14 09:43:49 -------
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.

------- Comment #11 From exosceleton 2008-01-14 09:50:55 -------
that makes the most sense

First Last Prev Next    No search results available      Search page      Enter new bug