20using namespace Magick;
22int main(
int ,
char ** argv)
31 if(getenv(
"SRCDIR") != 0)
32 srcdir = getenv(
"SRCDIR");
37 Image image(
"300x300",
"white" );
43 std::vector<Coordinate> poly_coord;
49 Image texture( srcdir +
"tile.miff" );
50 image.fillPattern( texture );
52 texture.isValid(
false );
53 image.fillPattern( texture );
58 image.strokeColor(
"black" );
59 image.fillColor(
"red" );
60 image.strokeWidth( 5 );
62 image.fillColor(
Color() );
67 image.strokeColor(
"black" );
68 image.strokeWidth( 5 );
69 vector<Drawable> drawlist;
78 image.draw( drawlist );
83 image.colorFuzz( 0.5*QuantumRange );
84 image.floodFillColor(
"+132+62",
"blue" );
89 image.strokeColor(
Color());
90 image.fillColor(
"red" );
91 if (getenv(
"MAGICK_FONT") != 0)
92 image.font(
string(getenv(
"MAGICK_FONT")));
93 image.fontPointsize( 18 );
94#if defined(MAGICKCORE_FREETYPE_DELEGATE)
95 image.annotate(
"Hello world!",
"+150+20" );
98 image.fillColor(
"blue" );
99 image.fontPointsize( 14 );
100#if defined(MAGICKCORE_FREETYPE_DELEGATE)
101 image.annotate(
"Goodbye cruel world!",
"+150+38" );
104 image.fillColor(
"black" );
105 image.fontPointsize( 14 );
106#if defined(MAGICKCORE_FREETYPE_DELEGATE)
107 image.annotate(
"I'm climbing the wall!",
"+280+120",
108 NorthWestGravity, 90.0 );
115 cout <<
"Writing image \"shapes_out.miff\" ..." << endl;
117 image.compressType( RLECompression );
118 image.write(
"shapes_out.miff" );
124 catch( exception &error_ )
126 cout <<
"Caught exception: " << error_.what() << endl;