Difference between revisions of "Playpen"

From Progzoo
Jump to: navigation, search
(Polygon)
Line 3: Line 3:
 
We need tto specify a whole list of points to draw or fill a
 
We need tto specify a whole list of points to draw or fill a
 
polygon.
 
polygon.
 +
{{subst:{{PAGENAME}}}}
 
</p>
 
</p>
 
==Polygon==
 
==Polygon==
Line 8: Line 9:
 
* zzzz  cazcsczaxxvz
 
* zzzz  cazcsczaxxvz
  
 
This one is done not using wiki style
 
<img src="/img/drawPoly.png" style="float:left;border-width:thin;border-style:solid"/>
 
 
<shell lang="java" import="shells.xml#raster"/>
 
<blurb lang="java">
 
The Polygon object may have a number of Points added.
 
</blurb>     
 
<prog lang='java'>
 
static void drawFlag(Graphics2D g)
 
{
 
if (a&lt;b)
 
  g.setColor(Color.white);
 
  g.fillRect(0,0,200,180);
 
  g.setColor(Color.blue);
 
  Polygon tri = new Polygon();
 
  tri.addPoint(10,50);
 
  tri.addPoint(50,10);//
 
  tri.addPoint(50,90);
 
  g.drawPolygon(tri);
 
}
 
</prog> 
 
</question>
 
 
==The Image Bug==
 
An image outside a question [[Image:DrawPoly.png]]
 
<question height="100" width="70" imgOut="flag.png" className="Raster" title="Polygon" rows="15">
 
* zzzz  cazcsczaxxvz
 
* Demonstration of the
 
An image inside a question [[Image:DrawPoly.png]]
 
  
 
This one is done not using wiki style
 
This one is done not using wiki style

Revision as of 17:47, 9 December 2007

A polygon is an angular shape such as a triangle or a hexagon. We need tto specify a whole list of points to draw or fill a polygon. {{subst:Playpen}}

Polygon

  • zzzz cazcsczaxxvz


This one is done not using wiki style <img src="/img/drawPoly.png" style="float:left;border-width:thin;border-style:solid"/>


The Polygon object may have a number of Points added.


[Font] [Default] [Show] [Resize] [History] [Profile]