Advertisement
Guest User

yeetpoint

a guest
Feb 26th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. class Point {
  2. PVector Location = new PVector(0, 0);
  3. float Xpos;
  4. float Ypos;
  5. int Pointcol = 0;
  6.  
  7. Point(float x, float y) {
  8. Xpos = x;
  9. Ypos = y;
  10. Location = new PVector(Xpos, Ypos);
  11. if (Xpos<=150) {
  12. Pointcol = 255;
  13. }
  14. }
  15.  
  16. void display() {
  17. stroke(Pointcol);
  18. point(Location.x, Location.y);
  19. }
  20. void textualise() {
  21. fill(0);
  22. textSize(10);
  23. text((Location.x)-384, Location.x+50, Location.y);
  24. text((Location.y)-512, Location.x, Location.y);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement