17using namespace Magick;
19int main(
int ,
char ** argv)
23 InitializeMagick(*argv);
28 if(getenv(
"SRCDIR") != 0)
29 srcdir = getenv(
"SRCDIR");
34 Image image(
"300x300",
"white" );
40 std::list<Coordinate> poly_coord;
46 Image texture( srcdir +
"tile.miff" );
47 image.penTexture( texture );
49 texture.isValid(
false );
50 image.penTexture( texture );
55 image.strokeColor(
"black" );
56 image.fillColor(
"red" );
57 image.strokeWidth( 5 );
59 image.fillColor(
Color() );
64 image.strokeColor(
"black" );
65 image.strokeWidth( 5 );
66 list<Drawable> drawlist;
75 image.draw( drawlist );
80 image.colorFuzz( 0.5*QuantumRange );
81 image.floodFillColor(
"+132+62",
"blue" );
86 image.strokeColor(
Color());
87 image.fillColor(
"red" );
88 if (getenv(
"MAGICK_FONT") != 0)
89 image.font(
string(getenv(
"MAGICK_FONT")));
90 image.fontPointsize( 18 );
91 image.annotate(
"Hello world!",
"+150+20" );
93 image.fillColor(
"blue" );
94 image.fontPointsize( 14 );
95 image.annotate(
"Goodbye cruel world!",
"+150+38" );
97 image.fillColor(
"black" );
98 image.fontPointsize( 14 );
99 image.annotate(
"I'm climbing the wall!",
"+280+120",
100 NorthWestGravity, 90.0 );
106 cout <<
"Writing image \"shapes_out.miff\" ..." << endl;
108 image.compressType( RLECompression );
109 image.write(
"shapes_out.miff" );
115 catch( exception &error_ )
117 cout <<
"Caught exception: " << error_.what() << endl;