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.
IndexProgramming Questions & HelpSyntax Questions › Re: loadShape(), PShape, beginShape() in Java
Page Index Toggle Pages: 1
Re: loadShape(), PShape, beginShape() in Java (Read 393 times)
Re: loadShape(), PShape, beginShape() in Java
Jan 13th, 2009, 11:13am
 
What version of processing do you use?
Re: loadShape(), PShape, beginShape() in Java
Reply #1 - Jan 13th, 2009, 11:16am
 
I'm sorry, I deleted the original question. :X

Good morning,
I have problem using loadShape() in my project.
I've imported processing and the svg file is in my projects folder. But functions loadShape() and shape() are behaving like they're not inherited from PApplet and need to be defined.
Nor specifying them like processing.core.PApplet.loadShape() solves the problem.
Don't you have any suggestions what am I doing wrong?
Thank you very much for any reply.

 
Code:

import processing.core.*;

public class PatternGenerator extends PApplet {
 if(...){
   beginShape();
   ...
   endShape(CLOSE);
 }

 else{
   PShape sh;
   sh = loadShape("trash.svg");
   shape(sh, 0, 0, 50, 50);
 }
}



Re: loadShape(), PShape, beginShape() in Java
Reply #2 - Jan 13th, 2009, 11:19am
 
eskimoblood wrote on Jan 13th, 2009, 11:13am:
What version of processing do you use


You're right, that was some older library, I tried the newest and it's ok now. Well now I have different problem, but I'll try to solve it somehow by myself for the first time.
Thank you.
Page Index Toggle Pages: 1