Difference between revisions of "Talk:Programming Tutorial"

From Progzoo
Jump to: navigation, search
(Flag of France (PyX version))
 
(4 intermediate revisions by the same user not shown)
Line 24: Line 24:
 
</prog>
 
</prog>
 
</question>
 
</question>
==Flag of France (PyX version)==
+
==Flag of Germany==
 
<question height="140" width="190" imgOut="flag.png" className="Raster" title="France" rows="9" cols="40">
 
<question height="140" width="190" imgOut="flag.png" className="Raster" title="France" rows="9" cols="40">
 
The guide image is produced using the following:
 
The guide image is produced using the following:
Line 32: Line 32:
 
   g.fillRect(0,0,190,140);
 
   g.fillRect(0,0,190,140);
 
   g.translate(20,20);
 
   g.translate(20,20);
   g.setColor(Color.blue);
+
   g.setColor(Color.black);
   g.fillRect(0,0,50,100);
+
   g.fillRect(0,0,150,30);
  g.setColor(Color.white);
+
  g.fillRect(50,0,50,100);
+
 
   g.setColor(Color.red);
 
   g.setColor(Color.red);
   g.fillRect(100,0,50,100);
+
   g.fillRect(0,30,150,30);
 +
  g.setColor(Color.yellow);
 +
  g.fillRect(0,60,150,30);
 
   g.setColor(Color.black);
 
   g.setColor(Color.black);
   g.drawRect(0,0,150,100);
+
   g.drawRect(0,0,150,90);
 
   g.translate(-15,-5);
 
   g.translate(-15,-5);
 
   g.drawString("0, 1",0,0);
 
   g.drawString("0, 1",0,0);
Line 47: Line 47:
 
}
 
}
 
</prog>
 
</prog>
 +
</question>
 +
 +
==Flag of Palau==
 +
<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(27,20);
 +
  g.setColor(new Color(154,176,217));
 +
  g.fillRect(0,0,150,100);
 +
  g.setColor(Color.yellow);
 +
  g.fillOval(25,25,50,50);
 +
  g.setColor(Color.black);
 +
  g.drawRect(0,0,150,100);
 +
  g.drawRect(25,0,50,100);
 +
  g.drawRect(0,25,150,50);
 +
  g.translate(-10,-5);
 +
  g.drawString("25",25,0);
 +
  g.drawString("75",75,0);
 +
  g.translate(-5,7);
 +
  g.drawString("25",0,25);
 +
  g.drawString("75",0,75);
 +
  g.drawString("100",-10,100);
 +
}</prog>
 
</question>
 
</question>

Latest revision as of 10:31, 1 March 2015

Flag of France

The guide image is produced using the following:


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

Flag of Germany

The guide image is produced using the following:


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

Flag of Palau

The guide image is produced using the following:


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