Difference between revisions of "Playpen"

From Progzoo
Jump to: navigation, search
(Polygon)
(Polygon)
Line 5: Line 5:
 
</p>
 
</p>
 
==Polygon==
 
==Polygon==
 +
<question height="100" width="70" imgOut="flag.png" className="Raster" title="Polygon" rows="15">
 +
* 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]]
 
An image outside a question [[Image:DrawPoly.png]]
 
<question height="100" width="70" imgOut="flag.png" className="Raster" title="Polygon" rows="15">
 
<question height="100" width="70" imgOut="flag.png" className="Raster" title="Polygon" rows="15">
 
* zzzz  cazcsczaxxvz
 
* zzzz  cazcsczaxxvz
* yycxxzw
+
* Demonstration of the
 
An image inside a question [[Image:DrawPoly.png]]
 
An image inside a question [[Image:DrawPoly.png]]
  
 +
This one is done not using wiki style
 
<img src="/img/drawPoly.png" style="float:left;border-width:thin;border-style:solid"/>
 
<img src="/img/drawPoly.png" style="float:left;border-width:thin;border-style:solid"/>
 
   
 
   

Revision as of 09:51, 5 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.

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]

The Image Bug

An image outside a question DrawPoly.png

  • zzzz cazcsczaxxvz
  • Demonstration of the

An image inside a question DrawPoly.png

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]