Difference between revisions of "Flags with Rectangles Tutorial"

From Progzoo
Jump to: navigation, search
(Japan)
(Japan)
Line 81: Line 81:
 
*The dark lines are NOT part of the flag. They are shown as guides only.
 
*The dark lines are NOT part of the flag. They are shown as guides only.
 
[[Image:flagjapan.png|border]]
 
[[Image:flagjapan.png|border]]
<hint tease="How to draw a circle">
+
<div class='dhint' title="How to draw a circle">
 
<code>g.fillOval(0,0,150,100)</code> will fill an oval bounded by the whole shape.
 
<code>g.fillOval(0,0,150,100)</code> will fill an oval bounded by the whole shape.
 
See [[Draw Circle]]....
 
See [[Draw Circle]]....
</hint>
+
</div>
  
 
<code>g.fillOval(0,0,150,100)</code> would fill an oval bounded by the whole shape.
 
<code>g.fillOval(0,0,150,100)</code> would fill an oval bounded by the whole shape.

Revision as of 22:51, 29 August 2012

Experiment in interaction

Libya

The flag of Libya is a simple green rectangle.

Try the program as it is given, then change it so that the green rectangle is 150 wide.
Flaglibya.png

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

France

The flag of France is blue, white and red. The code given draws only one of the three rectangles required, and it is in the wrong place.
Flag guide france.png

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

Germany

The flag of Germany is black, red and yellow.

Only one of the three rectangles has been drawn - and that one is in the wrong place.
Flaggermany.png

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

Japan

  • The flag of Japan is a red circle on a white background.
  • The rectangle is 150 by 100.
  • The circle is in position 45,20, width and height are 60,60.
  • The dark lines are NOT part of the flag. They are shown as guides only.

Flagjapan.png

g.fillOval(0,0,150,100) will fill an oval bounded by the whole shape. See Draw Circle....

g.fillOval(0,0,150,100) would fill an oval bounded by the whole shape. See Draw Circle.


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

Now you can try the Rectangles Quick Quiz Lecture 2 Support