P2D

From Robowiki
Revision as of 07:59, 23 May 2009 by J Litewski (talk | contribs) (minor changes)
Jump to navigation Jump to search

(Source)
P2D, short for Point2D, is a helper class that makes drawing to the screen easier. This is taken from David_Alves/DrawingBot with some slight changes and syntax realignments currently.

How to Use

Currently, this script helps draw Circles, Dots, Lines, and Text to the screen. To see these, you need to open your bot's debug console and click the 'Paint' button.

Functions

You can see more details on the functions on the API Page.

  • drawLine(Point2D.Double p1, Point2D.Double p2, Color color)
  • drawCircle(Point2D.Double center, double radius, Color color)
  • drawPoint(Point2D.Double p1, Color color)
  • 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.