Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:19

0001 // This may look like C code, but it is really -*- C++ -*-
0002 //
0003 // Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
0004 //
0005 // Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization
0006 // dedicated to making software imaging solutions freely available.
0007 //
0008 // Definition of Montage class used to specify montage options.
0009 //
0010 
0011 #if !defined(Magick_Montage_header)
0012 #define Magick_Montage_header
0013 
0014 #include "Magick++/Include.h"
0015 #include <string>
0016 #include "Magick++/Color.h"
0017 #include "Magick++/Geometry.h"
0018 
0019 //
0020 // Basic (Un-framed) Montage
0021 //
0022 namespace Magick
0023 {
0024   class MagickPPExport Montage
0025   {
0026   public:
0027 
0028     Montage(void);
0029     virtual ~Montage(void);
0030 
0031     // Color that thumbnails are composed on
0032     void backgroundColor(const Color &backgroundColor_);
0033     Color backgroundColor(void) const;
0034 
0035     // Composition algorithm to use (e.g. ReplaceCompositeOp)
0036     void compose(CompositeOperator compose_);
0037     CompositeOperator compose(void) const;
0038 
0039     // Filename to save montages to
0040     void fileName(const std::string &fileName_);
0041     std::string fileName(void) const;
0042 
0043     // Fill color
0044     void fillColor(const Color &fill_);
0045     Color fillColor(void) const;
0046 
0047     // Label font
0048     void font(const std::string &font_);
0049     std::string font(void) const;
0050 
0051     // Thumbnail width & height plus border width & height
0052     void geometry(const Geometry &geometry_);
0053     Geometry geometry(void) const;
0054 
0055     // Thumbnail position (e.g. SouthWestGravity)
0056     void gravity(GravityType gravity_);
0057     GravityType gravity(void) const;
0058 
0059     // Thumbnail label (applied to image prior to montage)
0060     void label(const std::string &label_);
0061     std::string label(void) const;
0062 
0063     // Font point size
0064     void pointSize(size_t pointSize_);
0065     size_t pointSize(void) const;
0066 
0067     // Enable drop-shadows on thumbnails
0068     void shadow(bool shadow_);
0069     bool shadow(void) const;
0070 
0071     // Outline color
0072     void strokeColor(const Color &stroke_);
0073     Color strokeColor(void) const;
0074 
0075     // Background texture image
0076     void texture(const std::string &texture_);
0077     std::string texture(void) const;
0078 
0079     // Thumbnail rows and columns
0080     void tile(const Geometry &tile_);
0081     Geometry tile(void) const;
0082 
0083     // Montage title
0084     void title(const std::string &title_);
0085     std::string title(void) const;
0086 
0087     // Transparent color
0088     void transparentColor(const Color &transparentColor_);
0089     Color transparentColor(void) const;
0090 
0091     //
0092     // Implementation methods/members
0093     //
0094 
0095     // Update elements in existing MontageInfo structure
0096     virtual void updateMontageInfo(MagickCore::MontageInfo &montageInfo_) const;
0097 
0098   private:
0099 
0100     Color _backgroundColor;
0101     std::string _fileName;
0102     Color _fill;
0103     std::string _font;
0104     Geometry _geometry;
0105     GravityType _gravity;
0106     std::string _label;
0107     size_t _pointSize;
0108     bool _shadow;
0109     Color _stroke;
0110     std::string _texture;
0111     Geometry _tile;
0112     std::string _title;
0113     Color _transparentColor;
0114   };
0115 
0116   //
0117   // Montage With Frames (Extends Basic Montage)
0118   //
0119   class MagickPPExport MontageFramed : public Montage
0120   {
0121   public:
0122 
0123     MontageFramed(void);
0124     ~MontageFramed(void);
0125 
0126     // Frame foreground color
0127     void matteColor(const Color &matteColor_);
0128     Color matteColor(void) const;
0129 
0130     // Frame border color
0131     void borderColor(const Color &borderColor_);
0132     Color borderColor(void) const;
0133 
0134     // Pixels between thumbnail and surrounding frame
0135     void borderWidth(size_t borderWidth_);
0136     size_t borderWidth(void) const;
0137 
0138     // Frame geometry (width & height frame thickness)
0139     void frameGeometry(const Geometry &frame_);
0140     Geometry frameGeometry(void) const;
0141 
0142     //
0143     // Implementation methods/members
0144     //
0145 
0146     // Update elements in existing MontageInfo structure
0147     void updateMontageInfo(MagickCore::MontageInfo &montageInfo_) const;
0148 
0149   private:
0150 
0151     Color _matteColor;
0152     Color _borderColor;
0153     size_t _borderWidth;
0154     Geometry _frame;
0155   };
0156 } // namespace Magick
0157 
0158 #endif // Magick_Montage_header