1 // This may look like C code, but it is really -*- C++ -*- 2 // 3 // Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003 4 // 5 // Definition of Montage class used to specify montage options. 6 // 7 8 #if !defined(Magick_Montage_header) 9 #define Magick_Montage_header 10 11 #include "Magick++/Include.h" 12 #include <string> 13 #include "Magick++/Color.h" 14 #include "Magick++/Geometry.h" 15 16 // 17 // Basic (Un-framed) Montage 18 // 19 namespace Magick 20 { 21 class MagickPPExport Montage 22 { 23 public: 24 25 Montage(void); 26 virtual ~Montage(void); 27 28 // Color that thumbnails are composed on 29 void backgroundColor(const Color &backgroundColor_); 30 Color backgroundColor(void) const; 31 32 // Composition algorithm to use (e.g. ReplaceCompositeOp) 33 void compose(CompositeOperator compose_); 34 CompositeOperator compose(void) const; 35 36 // Filename to save montages to 37 void fileName(const std::string &fileName_); 38 std::string fileName(void) const; 39 40 // Fill color 41 void fillColor(const Color &fill_); 42 Color fillColor(void) const; 43 44 // Label font 45 void font(const std::string &font_); 46 std::string font(void) const; 47 48 // Thumbnail width & height plus border width & height 49 void geometry(const Geometry &geometry_); 50 Geometry geometry(void) const; 51 52 // Thumbnail position (e.g. SouthWestGravity) 53 void gravity(GravityType gravity_); 54 GravityType gravity(void) const; 55 56 // Thumbnail label (applied to image prior to montage) 57 void label(const std::string &label_); 58 std::string label(void) const; 59 60 // Font point size 61 void pointSize(size_t pointSize_); 62 size_t pointSize(void) const; 63 64 // Enable drop-shadows on thumbnails 65 void shadow(bool shadow_); 66 bool shadow(void) const; 67 68 // Outline color 69 void strokeColor(const Color &stroke_); 70 Color strokeColor(void) const; 71 72 // Background texture image 73 void texture(const std::string &texture_); 74 std::string texture(void) const; 75 76 // Thumbnail rows and colmns 77 void tile(const Geometry &tile_); 78 Geometry tile(void) const; 79 80 // Montage title 81 void title(const std::string &title_); 82 std::string title(void) const; 83 84 // Transparent color 85 void transparentColor(const Color &transparentColor_); 86 Color transparentColor(void) const; 87 88 // 89 // Implementation methods/members 90 // 91 92 // Update elements in existing MontageInfo structure 93 virtual void updateMontageInfo(MagickCore::MontageInfo &montageInfo_) const; 94 95 private: 96 97 Color _backgroundColor; 98 std::string _fileName; 99 Color _fill; 100 std::string _font; 101 Geometry _geometry; 102 GravityType _gravity; 103 std::string _label; 104 size_t _pointSize; 105 bool _shadow; 106 Color _stroke; 107 std::string _texture; 108 Geometry _tile; 109 std::string _title; 110 Color _transparentColor; 111 }; 112 113 // 114 // Montage With Frames (Extends Basic Montage) 115 // 116 class MagickPPExport MontageFramed : public Montage 117 { 118 public: 119 120 MontageFramed(void); 121 ~MontageFramed(void); 122 123 // Frame foreground color 124 void alphaColor(const Color &alphaColor_); 125 Color alphaColor(void) const; 126 127 // Frame border color 128 void borderColor(const Color &borderColor_); 129 Color borderColor(void) const; 130 131 // Pixels between thumbnail and surrounding frame 132 void borderWidth(size_t borderWidth_); 133 size_t borderWidth(void) const; 134 135 // Frame geometry (width & height frame thickness) 136 void frameGeometry(const Geometry &frame_); 137 Geometry frameGeometry(void) const; 138 139 // 140 // Implementation methods/members 141 // 142 143 // Update elements in existing MontageInfo structure 144 void updateMontageInfo(MagickCore::MontageInfo &montageInfo_) const; 145 146 private: 147 148 Color _alphaColor; 149 Color _borderColor; 150 size_t _borderWidth; 151 Geometry _frame; 152 }; 153 } // namespace Magick 154 155 #endif // Magick_Montage_header 156