Difference between revisions of "Talk:Programming Tutorial"

From Progzoo
Jump to: navigation, search
(Flag of France)
(Flag of France)
Line 20: Line 20:
 
   g.drawString("100,0",100,0);
 
   g.drawString("100,0",100,0);
 
   g.drawString("0,100",0,120);
 
   g.drawString("0,100",0,120);
 +
}
 +
 +
</prog>
 +
</question>
 +
==Flag of France (PyX version)==
 +
<question height="140" width="190" imgOut="flag.png" className="Raster" title="France" rows="9" cols="40">
 +
The guide image is produced using the following:
 +
<shell lang="java" className="Flag" import="shells.xml#raster"/>
 +
<prog lang="java">static void drawFlag(Graphics2D g){
 +
  g.setColor(Color.white);
 +
  g.fillRect(0,0,190,140);
 +
  g.translate(20,20);
 +
  g.setColor(Color.blue);
 +
  g.fillRect(0,0,50,100);
 +
  g.setColor(Color.white);
 +
  g.fillRect(50,0,50,100);
 +
  g.setColor(Color.red);
 +
  g.fillRect(100,0,50,100);
 +
  g.setColor(Color.black);
 +
  g.drawRect(0,0,150,100);
 +
  g.translate(-15,-5);
 +
  g.drawString("0,0",0,100);
 +
  g.drawString("1,0",50,100);
 +
  g.drawString("2,0",100,0);
 +
  g.drawString("0,1",0,120);
 
}
 
}
  
 
</prog>
 
</prog>
 
</question>
 
</question>

Revision as of 11:52, 23 December 2007

Flag of France

The guide image is produced using the following:


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

Flag of France (PyX version)

The guide image is produced using the following:


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