Road Signs, Hard

From Progzoo
Jump to: navigation, search

Each of these road signs is worth 20 points.

Ice

  • Based on work by ASHLEY HAZLE

Ashley's original version includes a 16 point polygon painted 6 times. This variation paints half that polygon 12 times.

Roadice.png


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

Zone ENDS

  • Solution based on Kevin Smith's solution.

You can calculate the width of the text using the stringWidth method of the FontMetrics class. You can use this figure to calculate where to place text that should be in the centre.

Roadzoneends.png


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

Diversion Northtown

Notice how the black border is curved inside and out.

Roaddiversionnorthtown.png



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

Swing Bridge

Making a wavy line is hard work. The cosine function can be used to set up the coordinate array. The drawPolyline function only works with integers which will result in a "lumpy" wave usless you "scale up" as we do here with sf.

Roadswingbridge.png


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

Turpin's Crossing

This model answer was provided by Stuart Blows

You are not asked to do this because it is easy.

You are asked to do it because it is hard.

Roadturpin.png


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