P2D

From Robowiki
Revision as of 22:22, 25 May 2009 by J Litewski (talk | contribs) (minor change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

P2D, short for Point2D, is a helper class that makes drawing to the screen easier. This is taken from David_Alves/DrawingBot with some heavy modifications by Nat. It can currently draw Circles, Lines, Dots, and Text.

How to Use

(A detailed description is needed)

Functions

You can see more details on the functions on the API Page. The color variable is optional in all the listed functions. If it's not supplied, it'll default to Color.WHITE.

  • P2D.drawLine(Point2D.Double p1, Point2D.Double p2, Color color)
  • P2D.drawCircle(Point2D.Double center, double radius, Color color)
  • P2D.drawPoint(Point2D.Double p1, Color color)
  • P2D.drawText(String text, double x, double y, Color color)

Modifications

If you have any modifications to the script, like new features or the such, can be done on the Source Page.