TheBuzzer
5
Junior Poster in Training
Recommended Answers
Jump to PostI am not very clear about your question.
Would you like to tell more about what are confusing you ?
Jump to Postif you have to use a Shape i would go with a CubicCurve2D
the sun tutorial that covers these is
Jump to Postok:
it's not perfect, and doesn't take into account orientation, but it illustrates my idea:
public void paint(Graphics g){ Graphics2D g2 = (Graphics2D) g; g2.setStroke(new BasicStroke(4,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND)); for(int i=0;i<=80;i+=8){ g2.setColor(new Color(0,0,0)); g2.draw(makeSin(10+i,10,40+i,40)); g2.setColor(new Color(128,128,128)); g2.draw(makeSin(14+i,10,44+i,40)); } } public CubicCurve2D.Double makeSin(double x,double y,double x2,double y2){ return new CubicCurve2D.Double(x,y,(x+x2)/2,y,(x+x2)/2,y2,x2,y2); …
All 10 Replies
yzg1236
0
Newbie Poster
sciwizeh
62
Posting Pro in Training
TheBuzzer
5
Junior Poster in Training
sciwizeh
62
Posting Pro in Training
sciwizeh
62
Posting Pro in Training
Alex Edwards
commented:
Pfftt, and you said you sucked at art? =P
+1
TheBuzzer
5
Junior Poster in Training
TheBuzzer
5
Junior Poster in Training
sciwizeh
62
Posting Pro in Training
TheBuzzer
5
Junior Poster in Training
sciwizeh
62
Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.