19using namespace Magick;
21int main(
int ,
char ** argv)
25 InitializeMagick(*argv);
30 if(getenv(
"SRCDIR") != 0)
31 srcdir = getenv(
"SRCDIR");
36 Image image(
"300x300",
"white" );
42 std::vector<Coordinate> poly_coord;
48 Image texture( srcdir +
"tile.miff" );
49 image.fillPattern( texture );
51 texture.isValid(
false );
52 image.fillPattern( texture );
57 image.strokeColor(
"black" );
58 image.fillColor(
"red" );
59 image.strokeWidth( 5 );
61 image.fillColor(
Color() );
66 image.strokeColor(
"black" );
67 image.strokeWidth( 5 );
68 vector<Drawable> drawlist;
77 image.draw( drawlist );
82 image.colorFuzz( 0.5*QuantumRange );
83 image.floodFillColor(
"+132+62",
"blue" );
88 image.strokeColor(
Color());
89 image.fillColor(
"red" );
90 if (getenv(
"MAGICK_FONT") != 0)
91 image.font(
string(getenv(
"MAGICK_FONT")));
92 image.fontPointsize( 18 );
93#if defined(MAGICKCORE_FREETYPE_DELEGATE)
94 image.annotate(
"Hello world!",
"+150+20" );
97 image.fillColor(
"blue" );
98 image.fontPointsize( 14 );
99#if defined(MAGICKCORE_FREETYPE_DELEGATE)
100 image.annotate(
"Goodbye cruel world!",
"+150+38" );
103 image.fillColor(
"black" );
104 image.fontPointsize( 14 );
105#if defined(MAGICKCORE_FREETYPE_DELEGATE)
106 image.annotate(
"I'm climbing the wall!",
"+280+120",
107 NorthWestGravity, 90.0 );
114 cout <<
"Writing image \"shapes_out.miff\" ..." << endl;
116 image.compressType( RLECompression );
117 image.write(
"shapes_out.miff" );
123 catch( exception &error_ )
125 cout <<
"Caught exception: " << error_.what() << endl;