14using namespace Magick;
16int main(
int ,
char ** argv)
20 InitializeMagick(*argv);
25 if(getenv(
"SRCDIR") != 0)
26 srcdir = getenv(
"SRCDIR");
32 string backGround =
"xc:#CCCCCC";
35 Color border =
"#D4DCF3";
38 string buttonSize =
"120x20";
41 string buttonTexture =
"granite:";
44 string text =
"Button Text";
47 string textColor =
"red";
50 int fontPointSize = 16;
59 button.size( buttonSize );
62 button.read( backGround );
65 Image backgroundTexture( buttonTexture );
66 button.texture( backgroundTexture );
69 button.fillColor( textColor );
70 button.fontPointsize( fontPointSize );
71 if (getenv(
"MAGICK_FONT") != 0)
72 button.font(
string(getenv(
"MAGICK_FONT")));
73 button.annotate( text, CenterGravity );
76 button.borderColor( border );
77 button.frame(
"6x6+3+3" );
83 button.quantizeDither(
false);
84 button.quantizeColors(64);
88 cout <<
"Writing to \"button_out.miff\" ..." << endl;
89 button.compressType( RLECompression );
90 button.write(
"button_out.miff");
96 catch( exception &error_ )
98 cout <<
"Caught exception: " << error_.what() << endl;