Difference between revisions of "P2D"

From Robowiki
Jump to navigation Jump to search
(→‎Functions: Fixed things)
m (minor change)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=P2D=
+
P2D, short for Point2D, is a helper class that makes drawing to the screen easier. This is taken from {{OldWiki|David_Alves/DrawingBot}} with some heavy modifications by [[User:Nat|Nat]]. It can currently draw Circles, Lines, Dots, and Text.
([[P2D/source|Source]])
 
P2D, short for Point2D, is a helper class that makes drawing to the screen easier. This is taken from {{OldWiki|David_Alves/DrawingBot}} with some slight changes and syntax realignments.
 
  
 
==How to Use==
 
==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.
+
(A detailed description is needed)
===Functions===
+
 
You can see more details on the functions on the [[P2D/API|API Page]].<br>
+
==Functions==
* <code>drawLine(Point2D.Double p1, Point2D.Double p2, Color color)</code><br>
+
You can see more details on the functions on the [[P2D/API|API Page]]. The <code>color</code> variable is optional in all the listed functions. If it's not supplied, it'll default to <code>Color.WHITE</code>.
* <code>drawCircle(Point2D.Double center, double radius, Color color)</code><br>
+
* <code>P2D.drawLine(Point2D.Double p1, Point2D.Double p2, Color color)</code>
* <code>drawPoint(Point2D.Double p1, Color color)</code><br>
+
* <code>P2D.drawCircle(Point2D.Double center, double radius, Color color)</code>
* <code>drawText(String text, double x, double y, Color color)</code>
+
* <code>P2D.drawPoint(Point2D.Double p1, Color color)</code>
 +
* <code>P2D.drawText(String text, double x, double y, Color color)</code>
  
 
==Modifications==
 
==Modifications==
If you have any modifications to the script, like new features or the such, can be done on the [[P2D/source|Source Page]]. I will check the page every once in a while and update the download .jar for easier installs.
+
If you have any modifications to the script, like new features or the such, can be done on the [[P2D/source|Source Page]].
==Where to get it==
 
I'm looking for a site to host it on. When I do find a site, I'll post the link here.
 

Latest revision as of 23:22, 25 May 2009

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.