/usr/include/GraphicsMagick/Magick++/Montage.h is in libgraphicsmagick++1-dev 1.3.30+hg15796-1~deb9u2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | // This may look like C code, but it is really -*- C++ -*-
//
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
//
// Definition of Montage class used to specify montage options.
//
#if !defined(Magick_Montage_header)
#define Magick_Montage_header
#include "Magick++/Include.h"
#include <string>
#include "Magick++/Color.h"
#include "Magick++/Geometry.h"
//
// Basic (Un-framed) Montage
//
namespace Magick
{
class MagickDLLDecl Montage
{
public:
Montage( void );
virtual ~Montage( void );
// Specifies the background color that thumbnails are imaged upon.
void backgroundColor ( const Color &backgroundColor_ );
Color backgroundColor ( void ) const;
// Specifies the image composition algorithm for thumbnails. This
// controls the algorithm by which the thumbnail image is placed
// on the background. Use of OverCompositeOp is recommended for
// use with images that have transparency. This option may have
// negative side-effects for images without transparency.
void compose ( CompositeOperator compose_ );
CompositeOperator compose ( void ) const;
// Specifies the image filename to be used for the generated
// montage images. To handle the case were multiple montage images
// are generated, a printf-style format may be embedded within the
// filename. For example, a filename specification of
// image%02d.miff names the montage images as image00.miff,
// image01.miff, etc.
void fileName( const std::string &fileName_ );
std::string fileName( void ) const;
// Specifies the fill color to use for the label text.
void fillColor ( const Color &fill_ );
Color fillColor ( void ) const;
// Specifies the thumbnail label font.
void font ( const std::string &font_ );
std::string font ( void ) const;
// Specifies the size of the generated thumbnail.
void geometry ( const Geometry &geometry_ );
Geometry geometry ( void ) const;
// Specifies the thumbnail positioning within the specified
// geometry area. If the thumbnail is smaller in any dimension
// than the geometry, then it is placed according to this
// specification
void gravity ( GravityType gravity_ );
GravityType gravity ( void ) const;
// Specifies the format used for the image label. Special format
// characters may be embedded in the format string to include
// information about the image.
void label( const std::string &label_ );
std::string label( void ) const;
// Specifies the pen color to use for the label text (same as fill).
void penColor ( const Color &pen_ );
Color penColor ( void ) const;
// Specifies the thumbnail label font size.
void pointSize ( unsigned int pointSize_ );
unsigned int pointSize ( void ) const;
// Enable/disable drop-shadow on thumbnails.
void shadow ( bool shadow_ );
bool shadow ( void ) const;
// Specifies the stroke color to use for the label text .
void strokeColor ( const Color &stroke_ );
Color strokeColor ( void ) const;
// Specifies a texture image to use as montage background. The
// built-in textures "granite:" and "plasma:" are available. A
// texture is the same as a background image.
void texture ( const std::string &texture_ );
std::string texture ( void ) const;
// Specifies the maximum number of montage columns and rows in the
// montage. The montage is built by filling out all cells in a row
// before advancing to the next row. Once the montage has reached
// the maximum number of columns and rows, a new montage image is
// started.
void tile ( const Geometry &tile_ );
Geometry tile ( void ) const;
// Specifies the montage title
void title ( const std::string &title_ );
std::string title ( void ) const;
// Specifies a montage color to set transparent. This option can
// be set the same as the background color in order for the
// thumbnails to appear without a background when rendered on an
// HTML page. For best effect, ensure that the transparent color
// selected does not occur in the rendered thumbnail colors.
void transparentColor ( const Color &transparentColor_ );
Color transparentColor ( void ) const;
//
// Implementation methods/members
//
// Update elements in existing MontageInfo structure
virtual void updateMontageInfo ( MagickLib::MontageInfo &montageInfo_ ) const;
protected:
private:
Color _backgroundColor; // Color that thumbnails are composed on
CompositeOperator _compose; // Composition algorithm to use (e.g. ReplaceCompositeOp)
std::string _fileName; // Filename to save montages to
Color _fill; // Fill color
std::string _font; // Label font
Geometry _geometry; // Thumbnail width & height plus border width & height
GravityType _gravity; // Thumbnail position (e.g. SouthWestGravity)
std::string _label; // Thumbnail label (applied to image prior to montage)
unsigned int _pointSize; // Font point size
bool _shadow; // Enable drop-shadows on thumbnails
Color _stroke; // Outline color
std::string _texture; // Background texture image
Geometry _tile; // Thumbnail rows and colmns
std::string _title; // Montage title
Color _transparentColor; // Transparent color
};
//
// Montage With Frames (Extends Basic Montage)
//
class MagickDLLDecl MontageFramed : public Montage
{
public:
MontageFramed ( void );
/* virtual */ ~MontageFramed ( void );
// Specifies the background color within the thumbnail frame.
void borderColor ( const Color &borderColor_ );
Color borderColor ( void ) const;
// Specifies the border (in pixels) to place between a thumbnail
// and its surrounding frame. This option only takes effect if
// thumbnail frames are enabled (via frameGeometry) and the
// thumbnail geometry specification doesn't also specify the
// thumbnail border width.
void borderWidth ( unsigned int borderWidth_ );
unsigned int borderWidth ( void ) const;
// Specifies the geometry specification for frame to place around
// thumbnail. If this parameter is not specified, then the montage
// is unframed.
void frameGeometry ( const Geometry &frame_ );
Geometry frameGeometry ( void ) const;
// Specifies the thumbnail frame color.
void matteColor ( const Color &matteColor_ );
Color matteColor ( void ) const;
//
// Implementation methods/members
//
// Update elements in existing MontageInfo structure
/* virtual */ void updateMontageInfo ( MagickLib::MontageInfo &montageInfo_ ) const;
protected:
private:
Color _borderColor; // Frame border color
unsigned int _borderWidth; // Pixels between thumbnail and surrounding frame
Geometry _frame; // Frame geometry (width & height frame thickness)
Color _matteColor; // Frame foreground color
};
} // namespace Magick
//
// Inlines
//
//
// Implementation of Montage
//
inline void Magick::Montage::backgroundColor ( const Magick::Color &backgroundColor_ )
{
_backgroundColor = backgroundColor_;
}
inline Magick::Color Magick::Montage::backgroundColor ( void ) const
{
return _backgroundColor;
}
inline void Magick::Montage::compose ( Magick::CompositeOperator compose_ )
{
_compose = compose_;
}
inline Magick::CompositeOperator Magick::Montage::compose ( void ) const
{
return _compose;
}
inline void Magick::Montage::fileName( const std::string &fileName_ )
{
_fileName = fileName_;
}
inline std::string Magick::Montage::fileName( void ) const
{
return _fileName;
}
inline void Magick::Montage::fillColor ( const Color &fill_ )
{
_fill=fill_;
}
inline Magick::Color Magick::Montage::fillColor ( void ) const
{
return _fill;
}
inline void Magick::Montage::font ( const std::string &font_ )
{
_font = font_;
}
inline std::string Magick::Montage::font ( void ) const
{
return _font;
}
inline void Magick::Montage::geometry ( const Magick::Geometry &geometry_ )
{
_geometry = geometry_;
}
inline Magick::Geometry Magick::Montage::geometry ( void ) const
{
return _geometry;
}
inline void Magick::Montage::gravity ( Magick::GravityType gravity_ )
{
_gravity = gravity_;
}
inline Magick::GravityType Magick::Montage::gravity ( void ) const
{
return _gravity;
}
// Apply as attribute to all images before doing montage
inline void Magick::Montage::label( const std::string &label_ )
{
_label = label_;
}
inline std::string Magick::Montage::label( void ) const
{
return _label;
}
inline void Magick::Montage::penColor ( const Color &pen_ )
{
_fill=pen_;
_stroke=Color("none");
}
inline Magick::Color Magick::Montage::penColor ( void ) const
{
return _fill;
}
inline void Magick::Montage::pointSize ( unsigned int pointSize_ )
{
_pointSize = pointSize_;
}
inline unsigned int Magick::Montage::pointSize ( void ) const
{
return _pointSize;
}
inline void Magick::Montage::shadow ( bool shadow_ )
{
_shadow = shadow_;
}
inline bool Magick::Montage::shadow ( void ) const
{
return _shadow;
}
inline void Magick::Montage::strokeColor ( const Color &stroke_ )
{
_stroke=stroke_;
}
inline Magick::Color Magick::Montage::strokeColor ( void ) const
{
return _stroke;
}
inline void Magick::Montage::texture ( const std::string &texture_ )
{
_texture = texture_;
}
inline std::string Magick::Montage::texture ( void ) const
{
return _texture;
}
inline void Magick::Montage::tile ( const Geometry &tile_ )
{
_tile = tile_;
}
inline Magick::Geometry Magick::Montage::tile ( void ) const
{
return _tile;
}
inline void Magick::Montage::title ( const std::string &title_ )
{
_title = title_;
}
inline std::string Magick::Montage::title ( void ) const
{
return _title;
}
// Applied after the fact to montage with TransparentImage()
inline void Magick::Montage::transparentColor ( const Magick::Color &transparentColor_ )
{
_transparentColor = transparentColor_;
}
inline Magick::Color Magick::Montage::transparentColor ( void ) const
{
return _transparentColor;
}
//
// Implementation of MontageFramed
//
inline void Magick::MontageFramed::borderColor ( const Magick::Color &borderColor_ )
{
_borderColor = borderColor_;
}
inline Magick::Color Magick::MontageFramed::borderColor ( void ) const
{
return _borderColor;
}
inline void Magick::MontageFramed::borderWidth ( unsigned int borderWidth_ )
{
_borderWidth = borderWidth_;
}
inline unsigned int Magick::MontageFramed::borderWidth ( void ) const
{
return _borderWidth;
}
inline void Magick::MontageFramed::frameGeometry ( const Magick::Geometry &frame_ )
{
_frame = frame_;
}
inline Magick::Geometry Magick::MontageFramed::frameGeometry ( void ) const
{
return _frame;
}
inline void Magick::MontageFramed::matteColor ( const Magick::Color &matteColor_ )
{
_matteColor = matteColor_;
}
inline Magick::Color Magick::MontageFramed::matteColor ( void ) const
{
return _matteColor;
}
#endif // Magick_Montage_header
|