Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. import java.awt.Frame;
  2. import java.awt.Graphics;
  3. import java.awt.Graphics2D;
  4. import java.awt.geom.CubicCurve2D;
  5. import java.awt.geom.QuadCurve2D;
  6. import javafx.scene.shape.*;
  7.  
  8. public class Pointed extends Frame
  9. {
  10. public Pointed()
  11. {
  12. setTitle("Roman Arch");
  13. setSize(1000, 1000);
  14. setVisible(true);
  15. }
  16.  
  17. public void paint(Graphics g)
  18. {
  19. Graphics2D g2 = (Graphics2D) g;
  20. QuadCurve2D q = new QuadCurve2D.Float();
  21. QuadCurve2D l = new QuadCurve2D.Float();
  22. QuadCurve2D p = new QuadCurve2D.Float();
  23. QuadCurve2D m = new QuadCurve2D.Float();
  24. // draw CubicCurve2D.Double with set coordinates
  25. q.setCurve(200,550,250,300,500,100);
  26. l.setCurve(800,550,750,300,500,100);
  27.  
  28. g2.draw(q);
  29. g2.draw(l);
  30.  
  31.  
  32. }
  33.  
  34. public static void main(String args[])
  35. {
  36. new Pointed();
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement