We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
pshape (Read 503 times)
pshape
Dec 18th, 2008, 5:49pm
 
Hi,

This is a very basic question, but I have just downloaded processing 1.0.1
and I have been trying to get pshape imporint svg's. I've created a data folder inside the folder where the sketch is located but it gives me this error report:

2008-12-18 16:46:36.541 java[2103] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0x11d03, name = 'java.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2008-12-18 16:46:36.542 java[2103] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)

I apologise that I am a beginner and so this error report means nothing to me.

Thankyou
Re: pshape
Reply #1 - Dec 18th, 2008, 7:38pm
 
Don't worry, I am starting to have some experience with Java, and this error means nothing to me either... Smiley

Looks like an error in a native library (JNA?).

Providing more information (system? Looks like Unix) and perhaps some code (if not too long) might help.
Re: pshape
Reply #2 - Dec 19th, 2008, 12:07am
 
Hi,

Thankyou for the reply and again sorry for the simplicity of this question. The code is also very simple, just a pshape example from the processing libraries section:

PShape bot = loadShape("svgcat.svg");
smooth();
shapeMode(CENTER);
shape(bot, 35, 35, 50, 50);
shapeMode(CORNER);
fill(102);
shape(bot, 35, 35, 50, 50);

Infact the error message is not coming up now, but the svg does not show, instead a grey box of about 50px by 50px shows.

I have placed the svg file in the data folder of the sketch. Perhaps there is something obvious I am not doing.

Thankyou




Re: pshape
Reply #3 - Dec 19th, 2008, 10:28am
 
I fear I cannot reproduce the issue with Processing 1.0.1 on French Windows XP Pro SP3.

I tried your little code with bot1, and with a chess piece from Wikipedia. The latter was made with Inkscape, it is nice to see support for this. Not perfect: the piece is all black, and another piece cannot be displayed because there is no support for arc yet, but that's a good start.

Mmm, I played  a bit and if I move fill:white out of styles to attributes: fill="#FFFFFF", and stroke:black to stroke="#000000" I had a good rendering.

Anyway, the issue might be with your svgcat file.
Re: pshape
Reply #4 - Dec 20th, 2008, 2:11am
 
Thankyou for the reply. I will test different vector type svg's before posting again.

Thankyou.
Re: pshape
Reply #5 - Dec 20th, 2008, 3:22pm
 
JHT83 wrote on Dec 18th, 2008, 5:49pm:
2008-12-18 16:46:36.541 java[2103] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0x11d03, name = 'java.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2008-12-18 16:46:36.542 java[2103] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)

That's an Apple bug:
http://processing.org/reference/environment/platforms.html#mac

And is unrelated to your problem.
Page Index Toggle Pages: 1