15 int main(
int ,
char ** argv)
24 if(getenv(
"SRCDIR") != 0)
25 srcdir = getenv(
"SRCDIR");
31 string backGround =
"xc:#CCCCCC";
34 Color border =
"#D4DCF3";
37 string buttonSize =
"120x20";
40 string buttonTexture =
"granite:";
43 string text =
"Button Text";
46 string textColor =
"red";
49 int fontPointSize = 16;
58 button.
size( buttonSize );
61 button.
read( backGround );
64 Image backgroundTexture( buttonTexture );
65 button.
texture( backgroundTexture );
67 #if MAGICKCORE_FREETYPE_DELEGATE 71 if (getenv(
"MAGICK_FONT") != 0)
72 button.
font(
string(getenv(
"MAGICK_FONT")));
73 button.
annotate( text, CenterGravity );
78 button.
frame(
"6x6+3+3" );
89 cout <<
"Writing to \"button_out.miff\" ..." << endl;
91 button.
write(
"button_out.miff");
97 catch( exception &error_ )
99 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_)