Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
C++ Programming

Tutorial: Introducing Graphics

 

1. Libya


Big

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 wider.

Flag of Libya

2. France


Big

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.

3. Germany


Big

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.

4. Palau


Big

  • The flag of Palau is a yellow circle on a blue background.
  • The rectangle is 300 by 200.
  • The circle is in position 50,50, width and height are 100,100.
  • The RGB values for the blue: 154,176,217.
  • The dark lines are NOT part of the flag. They are shown as guides only.
Flag of Palau

Use DrawableEllipse, this takes six parameters:

originX_ originY_
The coordinates of the centre of the ellipse.
radiusX_ radiusY_
arcStart_ arcEnd_
Use degrees to specify the angle to be drawn. Use 0, 360 to draw the full thing.