www.pudn.com > sswf-1.7.4-src.zip > flags.sswf


/* flags.sswf V1.00 - written by Alexis Wilke for Made to Order Software, Ltd. (c) 2002-2006 */
/* encoding="iso8859-1" */

/*

Copyright (c) 2002-2006 Made to Order Software, Ltd.

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and
associated documentation files (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the
following conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/


/*
 * This file defines a set of sprites which are different country
 * or state flags.
 */

block sswf {
	list flags {
		list definitions {
			fill style "fill_black"        { sswf.col.black; };
			fill style "fill_blue"         { sswf.col.blue; };
			fill style "fill_blue_green"   { color { 36 / 255.0, 64 / 255.0, 192 / 255.0 } };
			fill style "fill_cyan"         { sswf.col.cyan; };
			fill style "fill_dark_blue"    { color { 20 / 255.0, 36 / 255.0, 132 / 255.0 } };
			fill style "fill_dark_green"   { color { 12 / 255.0, 76 / 255.0, 12 / 255.0 } };
			fill style "fill_dark_red"     { color { 212 / 255.0, 20 / 255.0, 12 / 255.0 } };
			fill style "fill_green"        { color { 36 / 255.0, 124 / 255.0, 28 / 255.0 } };
			fill style "fill_green_blue"   { color { 4 / 255.0, 116 / 255.0, 68 / 255.0 } };
			fill style "fill_light_purple" { color { 96 / 255.0, 96 / 255.0, 1 } };
			fill style "fill_orange"       { color { 252 / 255.0, 108 / 255.0, 20 / 255.0 } };
			fill style "fill_red"          { sswf.col.red; };
			fill style "fill_white"        { sswf.col.white; };
			fill style "fill_yellow"       { sswf.col.yellow; };
			fill style "fill_yolk"         { color { 252 / 255.0, 204 / 255.0, 20 / 255.0 } };

			line style "line_thin"         { width: 0.05; sswf.col.black; };

			edges "circle" {
					// the scale_x/y define the radius in pixels by x and y
					sx = defined("scale_x") ? scale_x / 28.35 : 1;
					sy = defined("scale_y") ? scale_y / 28.35 : 1;
					 11.75 * sx,   0.00 * sy,   8.30 * sx,   8.30 * sy;
					  8.30 * sx,   8.30 * sy,   0.00 * sx,  11.75 * sy;
					  0.00 * sx,  11.75 * sy,  -8.30 * sx,   8.30 * sy;
					 -8.30 * sx,   8.30 * sy, -11.75 * sx,   0.00 * sy;
					-11.75 * sx,   0.00 * sy,  -8.30 * sx,  -8.30 * sy;
					 -8.30 * sx,  -8.30 * sy,   0.00 * sx, -11.75 * sy;
					  0.00 * sx, -11.75 * sy,   8.30 * sx,  -8.30 * sy;
			   close: 8.30 * sx,  -8.30 * sy,  11.75 * sx,   0.00 * sy;
			};


			// 1/3rd vertical rectangles
			points "rect_vertical_1d3" { 16, 33; 16, -33; -16, -33; -16, 33; };
			edges "square" { 1, 0; 0, 1; -1, 0; 0, -1; };
			shape "rect_vertical_1d3_black" {
				rectangle { -17, -34, 17, 34 };
				fill_black; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_blue" {
				rectangle { -17, -34, 17, 34 };
				fill_blue; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_dark_blue" {
				rectangle { -17, -34, 17, 34 };
				fill_dark_blue; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_dark_green" {
				rectangle { -17, -34, 17, 34 };
				fill_dark_green; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_dark_red" {
				rectangle { -17, -34, 17, 34 };
				fill_dark_red; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_green" {
				rectangle { -17, -34, 17, 34 };
				fill_green; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_green_blue" {
				rectangle { -17, -34, 17, 34 };
				definitions.fill_green_blue; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_light_purple" {
				rectangle { -17, -34, 17, 34 };
				fill_light_purple; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_orange" {
				rectangle { -17, -34, 17, 34 };
				fill_orange; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_red" {
				rectangle { -17, -34, 17, 34 };
				fill_red; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_white" {
				rectangle { -17, -34, 17, 34 };
				fill_white; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_yellow" {
				rectangle { -17, -34, 17, 34 };
				fill_yellow; move: -16, 33; rect_vertical_1d3;
			};
			shape "rect_vertical_1d3_yolk" {
				rectangle { -17, -34, 17, 34 };
				fill_yolk; move: -16, 33; rect_vertical_1d3;
			};

			// draw this around all the flags
			edges "rect_background" { 129, 0; 0, 66; -129, 0; 0, -66; };
			shape "rect_outline" {
				rectangle { -65.5, -34, 65.5, 34 };
				line_thin; move: -64.5, -33; rect_background;
			};
			edges "rect_reduced" { 96, 0; 0, 66; -96, 0; 0, -66; };
			shape "rect_outline_reduced" {
				rectangle { -49, -34, 49, 34 };
				line_thin; move: -48, -33; rect_reduced; 
			};
			edges "horiz_band5" { 0, 5; 64.5 * 2, 0; 0, -5; -64.5 * 2, 0; };
			edges "half_horiz_band5" { 0, 5; 64.5, 0; 0, -5; -64.5, 0; };
		};
		list bangla {
			list insert {
				shape "rect_background" {
					rectangle { -65.5, -34, 65.5, 34 };
					definitions.fill_green_blue; move: -48, -33; definitions.rect_reduced;
				};
				shape "dot" {
					rectangle { -19, -1, 19, 37 };
					scale_x = 18;
					scale_y = 18;
					definitions.fill_red; definitions.circle;
				};
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: rect_background;
					};
					place object {
						depth: 2;
						id: dot;
						matrix { translate: 0, -18 };
					};
					place object {
						depth: 3;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list belau {
			list insert {
				shape "rect_background" {
					rectangle { -65.5, -34, 65.5, 34 };
					definitions.fill_blue_green; move: -48, -33; definitions.rect_reduced;
				};
				shape "dot" {
					rectangle { -19, -1, 19, 37 };
					scale_x = 18;
					scale_y = 18;
					definitions.fill_yellow; definitions.circle;
				};
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: rect_background;
					};
					place object {
						depth: 2;
						id: dot;
						matrix { translate: 0, -18 };
					};
					place object {
						depth: 3;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list belgium {
			list insert {
				definitions.rect_vertical_1d3_black;
				definitions.rect_vertical_1d3_yellow;
				definitions.rect_vertical_1d3_red;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_black;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_yellow;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_red;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list canaries {
			list insert {
				definitions.rect_vertical_1d3_white;
				definitions.rect_vertical_1d3_light_purple;
				definitions.rect_vertical_1d3_yellow;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_white;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_light_purple;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_yellow;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list chad {
			list insert {
				definitions.rect_vertical_1d3_dark_blue;
				definitions.rect_vertical_1d3_yellow;
				definitions.rect_vertical_1d3_red;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_dark_blue;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_yellow;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_red;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list france {
			list insert {
				definitions.rect_vertical_1d3_blue;
				definitions.rect_vertical_1d3_white;
				definitions.rect_vertical_1d3_red;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_blue;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_white;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_red;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list guinea {
			list insert {
				definitions.rect_vertical_1d3_red;
				definitions.rect_vertical_1d3_yellow;
				definitions.rect_vertical_1d3_green;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_red;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_yellow;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_green;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list ireland {
			list insert {
				definitions.rect_vertical_1d3_dark_green;
				definitions.rect_vertical_1d3_white;
				definitions.rect_vertical_1d3_orange;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_dark_green;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_white;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_orange;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list italy {
			list insert {
				definitions.rect_vertical_1d3_dark_green;
				definitions.rect_vertical_1d3_white;
				definitions.rect_vertical_1d3_red;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_dark_green;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_white;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_red;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list ivory_coast {
			list insert {
				definitions.rect_vertical_1d3_orange;
				definitions.rect_vertical_1d3_white;
				definitions.rect_vertical_1d3_green;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_orange;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_white;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_green;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list japan {
			list insert {
				shape "rect_background" {
					rectangle { -65, -34, 66, 34 };
					definitions.fill_white; move: -48, -33; definitions.rect_reduced;
				};
				shape "dot" {
					rectangle { -19, -1, 19, 37 };
					scale_x = 18;
					scale_y = 18;
					definitions.fill_red; definitions.circle;
				};
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: rect_background;
					};
					place object {
						depth: 2;
						id: dot;
						matrix { translate: 0, -18 };
					};
					place object {
						depth: 3;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list libya {
			list insert {
				shape "rect_background" {
					rectangle { -65, -33, 66, 33 };
					definitions.fill_green; move: -48, -32; definitions.rect_reduced;
				};
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: rect_background;
					};
					place object {
						depth: 2;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list mali {
			list insert {
				definitions.rect_vertical_1d3_green;
				definitions.rect_vertical_1d3_yellow;
				definitions.rect_vertical_1d3_dark_red;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_green;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_yellow;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_dark_red;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list nigeria {
			list insert {
				definitions.rect_vertical_1d3_dark_green;
				definitions.rect_vertical_1d3_white;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_dark_green;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_white;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_dark_green;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list romania {
			list insert {
				definitions.rect_vertical_1d3_dark_blue;
				definitions.rect_vertical_1d3_yolk;
				definitions.rect_vertical_1d3_dark_red;
				definitions.rect_outline_reduced;
				sprite "flag" {
					place object {
						depth: 1;
						id: definitions.rect_vertical_1d3_dark_blue;
						matrix { translate: -32, 0 };
					};
					place object {
						depth: 2;
						id: definitions.rect_vertical_1d3_yolk;
					};
					place object {
						depth: 3;
						id: definitions.rect_vertical_1d3_dark_red;
						matrix { translate: 32, 0 };
					};
					place object {
						depth: 4;
						id: definitions.rect_outline_reduced;
					};
				};
			};
		};
		list united_kingdom {
			list insert {
				/* the England flag is very specific, draw it as is */
				definitions.rect_outline;
				shape "uk_flag" {
					rectangle { -65.5, -34, 65.5, 34 };
					definitions.fill_white;
						move: -64.5, -33;
							 definitions.rect_background;
					fill style { color { 207 / 255.0, 10 / 255.0, 4 / 255.0 } };
						move: -64.5, -7;
							points { -64.5, 7; -7, 7; -7, 33; 7, 33; 7, 7; 64.5, 7; 64.5, -7; 7, -7; 7, -33; -7, -33; -7, -7; -64.5, -7; };
					fill style { color { 179 / 255.0, 9 / 255.0, 6 / 255.0 } };
						move: -64.5, -28;
							points { -64.5, -33; -63, -33; -23, -11; -33, -11; -64.5, -28; };
						move: -62, 33;
							points { -22, 11; -14, 11; -53, 33; -62, 33; };
						move: 64.5, 29;
							points { 31, 11; 21, 11; 61, 33; 64.5, 33; 64.5, 29; };
						move: 64.5, -33;
							points { 26, -11; 13, -11; 54, -33; 64.5, -33; };
					fill style { color { 5 / 255.0, 14 / 255.0, 76 / 255.0 } };
						move: -64.5, -24;
							points { -38, -11; -64.5, -11; -64.5, -24; };
						move: -51, -33;
							points { -11, -33; -11, -13; -51, -33; };
						move: 11, -33;
							points { 11, -13; 49, -33; 11, -33; };
						move: 64.5, -25;
							points { 64.5, -11; 37, -11; 64.5, -25; };
						move: 64.5, 11;
							points { 64.5, 26; 37, 11; 64.5, 11; };
						move: -64.5, 11;
							points { -35, 11; -64.5, 26; -64.5, 11; };
						move: -48, 33;
							points { -11, 13; -11, 33; -48, 33; };
						move: 11, 13;
							points { 11, 33; 49, 33; 11, 13; };
				};
				sprite "flag" {
					place object {
						depth: 1;
						id: uk_flag;
					};
					place object {
						depth: 2;
						id: definitions.rect_outline;
					};
				};
			};
		};
		list united_states {	/* USA */
			list insert {
				/* the US flag is somewhat specific, draw a lot of it as is */
				definitions.rect_outline;
				shape "us_flag" {
					rectangle { -65.5, -34, 65.5, 34 };
					/* white background */
					definitions.fill_white;
						move: -64.5, -33;
							 definitions.rect_background;
					/* blue rectangle */
					fill style { color { 0, 10 / 255.0, 60 / 255.0 } };
						move: -64.5, -33;
							points { -64.5, 2; 0, 2; 0, -33; -64.5, -33; };
					/* red stripes */
					fill style { color { 255 / 255.0, 15 / 255.0, 15 / 255.0 } };
						move: 0, -33;
							definitions.half_horiz_band5;
						move: 0, -23;
							definitions.half_horiz_band5;
						move: 0, -13;
							definitions.half_horiz_band5;
						move: 0, -3;
							definitions.half_horiz_band5;
						move: -64.5, 8;
							definitions.horiz_band5;
						move: -64.5, 18;
							definitions.horiz_band5;
						move: -64.5, 28;
							definitions.horiz_band5;
				};
				shape "star" {
					fill style { color { 0 / 255.0, 255 / 255.0, 0 / 255.0 } };
						move: -39.27, 8.815;
							edges { 30, 0; 9.27, -28.53; 9.27, 28.53; 30, 0;
									-24.27, 17.63; 9.27, 28.53; -24.27, -17.63; -24.27, 17.63;
									9.27, -28.53; close: 0, 0; };
				};
				star_width = (30 + 9.27) * 2 * 0.05;
				space = (64.5 - 2 - star_width) / 5;
				sprite "star_row5" {
					place object {
						depth: 2;
						id: star;
						matrix { translate: -61.67, 0; scale: 0.05; };
					};
					place object {
						depth: 2;
						id: star;
						matrix { translate: -61.67 + space, 0; scale: 0.05; };
					};
					place object {
						depth: 2;
						id: star;
						matrix { translate: -61.67 + space * 2, 0; scale: 0.05; };
					};
					place object {
						depth: 2;
						id: star;
						matrix { translate: -61.67 + space * 3, 0; scale: 0.05; };
					};
					place object {
						depth: 2;
						id: star;
						matrix { translate: -61.67 + space * 4, 0; scale: 0.05; };
					};
				};
				sprite "star_row6" {
					place object {
						depth: 1;
						id: star_row5;
					};
					place object {
						depth: 2;
						id: star;
						matrix { translate: -61.67 + space * 5, 0; scale: 0.05; };
					};
				};
				sprite "flag" {
					place object {
						depth: 1;
						id: us_flag;
					};

					// rows of 6 stars
					hspace = 7.42;
					place object {
						depth: 11;
						id: star_row6;
						matrix { translate: 0, -31.17; scale: 1; };
					};
					place object {
						depth: 12;
						id: star_row6;
						matrix { translate: 0, -31.17 + hspace; scale: 1; };
					};
					place object {
						depth: 13;
						id: star_row6;
						matrix { translate: 0, -31.17 + hspace * 2; scale: 1; };
					};
					place object {
						depth: 14;
						id: star_row6;
						matrix { translate: 0, -31.17 + hspace * 3; scale: 1; };
					};
					place object {
						depth: 15;
						id: star_row6;
						matrix { translate: 0, -31.17 + hspace * 4; scale: 1; };
					};

					// rows of 5 stars
					place object {
						depth: 21;
						id: star_row5;
						matrix { translate: space / 2.0, -27.43; scale: 1; };
					};
					place object {
						depth: 22;
						id: star_row5;
						matrix { translate: space / 2.0, -27.43 + hspace; scale: 1; };
					};
					place object {
						depth: 23;
						id: star_row5;
						matrix { translate: space / 2.0, -27.43 + hspace * 2; scale: 1; };
					};
					place object {
						depth: 24;
						id: star_row5;
						matrix { translate: space / 2.0, -27.43 + hspace * 3; scale: 1; };
					};

					// draw outline on top
					place object {
						depth: 100;
						id: definitions.rect_outline;
					};
				};
			};
		};
	};
};

// vim: ts=4