18 int main(
int ,
char ** argv)
27 if(getenv(
"SRCDIR") != 0)
28 srcdir = getenv(
"SRCDIR");
34 string backGround =
"xc:#CCCCCC";
37 Color border =
"#D4DCF3";
40 string buttonSize =
"120x20";
43 string buttonTexture =
"granite:";
46 string text =
"Button Text";
49 string textColor =
"red";
52 int fontPointSize = 16;
61 button.
size( buttonSize );
64 button.
read( backGround );
67 Image backgroundTexture( buttonTexture );
68 button.
texture( backgroundTexture );
70 #if MAGICKCORE_FREETYPE_DELEGATE 74 if (getenv(
"MAGICK_FONT") != 0)
75 button.
font(
string(getenv(
"MAGICK_FONT")));
76 button.
annotate( text, CenterGravity );
81 button.
frame(
"6x6+3+3" );
92 cout <<
"Writing to \"button_out.miff\" ..." << endl;
94 button.
write(
"button_out.miff");
100 catch( exception &error_ )
102 cout <<
"Caught exception: " << error_.what() << endl;
void annotate(const std::string &text_, const Geometry &location_)
void quantize(const bool measureError_=false)
void read(const Blob &blob_)
void frame(const Geometry &geometry_=frameGeometryDefault)
void borderColor(const Color &color_)
void font(const std::string &font_)
void fontPointsize(const double pointSize_)
void texture(const Image &texture_)
void fillColor(const Color &fillColor_)
void size(const Geometry &geometry_)
void quantizeColors(const size_t colors_)
MagickPPExport void InitializeMagick(const char *path_)
void quantizeDither(const bool ditherFlag_)
void depth(const size_t depth_)
void compressType(const CompressionType compressType_)