Perl:Flags with Lines Tutorial

From Progzoo
Jump to navigation Jump to search

Interactive Programming Tutorials - Drawing flags using lines.

You may want to look at: [../ht50Graphics/200Lines.xml How to draw thick lines.]


The cross of St. Andrew shows diagonal lines on a blue background.

  • Complete the flag by drawing the other diagonal line.
  • The white lines should be slightly thicker - try 18.


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


The English flag is the cross of St. George. This is a red cross on a white background.

  • The line thickness should be 1/5 of the height of the flag.


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


The flag of Botswana has a black stripe on a white stripe on a blue background.

  • The flag is 150 by 100
  • The white stripe behind the black one has width 30
  • The black stripe has width 20
  • The pale blue has rgb: 110,184,237

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

Trinidad and Tobago

There is a problem with this example

Seemingly the GD library being used here does not support drawing thick lines outside the drawing area as expected. If anyone can suggest how I might fix this problem (without resorting to polygons) I would appreciate it.

We can start and end lines outside the confines of the surface.


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