Difference between revisions of "C#:Flags with Polygons Tutorial"

From Progzoo
Jump to: navigation, search
(Bahamas)
(Bahamas)
Line 31: Line 31:
 
static void drawFlag(Graphics g)
 
static void drawFlag(Graphics g)
 
{
 
{
   g.FillRectangle(Brushes.Blue,0,0,500,300);
+
  Brush pb = new SolidBrush(Color.FromArgb(127,192,255));
 +
   g.FillRectangle(pb,0,0,500,300);
 
   g.DrawLine(new Pen(Brushes.White,30),0,0,500,300);
 
   g.DrawLine(new Pen(Brushes.White,30),0,0,500,300);
 
}
 
}

Revision as of 13:59, 6 March 2013

Drawing flags: filling polygons.

Napier

The Napier flag is a red triangle on a white square. It suggests the letter N.
Flagnapier.png

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

Bahamas

To complete the flag of the Bahamas you must add the black triangle which represents the unity and vigour of the people.

Flagbahamas.png

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

Jamaica

We need to four triangle to draw the flag of Jamaica. If we get it right we will leave a yellow cross.

Flagjamaica.png

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

Seychelles

The Seychelles has a cheerful flag; four triangles and a quadrilateral.

Flagseychelles.png

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