Powered by Pair ImageMagick logo
Image Magick
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

Magick::Options Class Reference

#include <Options.h>

Collaboration diagram for Magick::Options:

Collaboration graph
[legend]

Public Member Functions

 Options (void)
 Options (const Options &options_)
 ~Options ()
void antiAlias (bool flag_)
bool antiAlias (void) const
void adjoin (bool flag_)
bool adjoin (void) const
void backgroundColor (const Color &color_)
Color backgroundColor (void) const
void backgroundTexture (const std::string &backgroundTexture_)
std::string backgroundTexture (void) const
void borderColor (const Color &color_)
Color borderColor (void) const
void boxColor (const Color &boxColor_)
Color boxColor (void) const
void colorFuzz (double fuzz_)
double colorFuzz (void) const
void compressType (CompressionType compressType_)
CompressionType compressType (void) const
void debug (bool flag_)
bool debug (void) const
void density (const Geometry &geomery_)
Geometry density (void) const
void depth (unsigned int depth_)
unsigned int depth (void) const
void endian (EndianType endian_)
EndianType endian (void) const
void fileName (const std::string &fileName_)
std::string fileName (void) const
void fillColor (const Color &fillColor_)
Color fillColor (void) const
void fillPattern (const MagickLib::Image *fillPattern_)
const MagickLib::ImagefillPattern (void) const
void fillRule (const FillRule &fillRule_)
FillRule fillRule (void) const
void font (const std::string &font_)
std::string font (void) const
void fontPointsize (double pointSize_)
double fontPointsize (void) const
std::string format (void) const
void interlaceType (InterlaceType interlace_)
InterlaceType interlaceType (void) const
void magick (const std::string &magick_)
std::string magick (void) const
void matteColor (const Color &matteColor_)
Color matteColor (void) const
void monochrome (bool monochromeFlag_)
bool monochrome (void) const
void page (const Geometry &pageSize_)
Geometry page (void) const
void quality (unsigned int quality_)
unsigned int quality (void) const
void quantizeColors (unsigned int colors_)
unsigned int quantizeColors (void) const
void quantizeColorSpace (ColorspaceType colorSpace_)
ColorspaceType quantizeColorSpace (void) const
void quantizeDither (bool ditherFlag_)
bool quantizeDither (void) const
void quantizeTreeDepth (unsigned int treeDepth_)
unsigned int quantizeTreeDepth (void) const
void resolutionUnits (ResolutionType resolutionUnits_)
ResolutionType resolutionUnits (void) const
void size (const Geometry &geometry_)
Geometry size (void) const
void strokeAntiAlias (bool flag_)
bool strokeAntiAlias (void) const
void strokeColor (const Color &strokeColor_)
Color strokeColor (void) const
void strokeDashArray (const double *strokeDashArray_)
const double * strokeDashArray (void) const
void strokeDashOffset (double strokeDashOffset_)
double strokeDashOffset (void) const
void strokeLineCap (LineCap lineCap_)
LineCap strokeLineCap (void) const
void strokeLineJoin (LineJoin lineJoin_)
LineJoin strokeLineJoin (void) const
void strokeMiterLimit (unsigned int miterLimit_)
unsigned int strokeMiterLimit (void) const
void strokePattern (const MagickLib::Image *strokePattern_)
const MagickLib::ImagestrokePattern (void) const
void strokeWidth (double strokeWidth_)
double strokeWidth (void) const
void subImage (unsigned int subImage_)
unsigned int subImage (void) const
void subRange (unsigned int subRange_)
unsigned int subRange (void) const
void textEncoding (const std::string &encoding_)
std::string textEncoding (void) const
void tileName (const std::string &tileName_)
std::string tileName (void) const
void type (const ImageType type_)
ImageType type (void) const
void transformOrigin (double tx_, double ty_)
void transformReset (void)
void transformRotation (double angle_)
void transformScale (double sx_, double sy_)
void transformSkewX (double skewx_)
void transformSkewY (double skewy_)
void verbose (bool verboseFlag_)
bool verbose (void) const
void view (const std::string &view_)
std::string view (void) const
void x11Display (const std::string &display_)
std::string x11Display (void) const
MagickLib::DrawInfodrawInfo (void)
MagickLib::ImageInfoimageInfo (void)
MagickLib::QuantizeInfoquantizeInfo (void)
 Options (const MagickLib::ImageInfo *imageInfo_, const MagickLib::QuantizeInfo *quantizeInfo_, const MagickLib::DrawInfo *drawInfo_)

Private Member Functions

Optionsoperator= (const Options &)

Private Attributes

MagickLib::ImageInfo_imageInfo
MagickLib::QuantizeInfo_quantizeInfo
MagickLib::DrawInfo_drawInfo

Constructor & Destructor Documentation

Magick::Options::Options void   ) 
 

Definition at line 22 of file Options.cpp.

References _drawInfo, _imageInfo, _quantizeInfo, AcquireMagickMemory(), DrawInfo, GetDrawInfo(), GetImageInfo(), GetQuantizeInfo(), ImageInfo, and QuantizeInfo.

00023 : _imageInfo(static_cast<ImageInfo*>(AcquireMagickMemory(sizeof(ImageInfo)))), 00024 _quantizeInfo(static_cast<QuantizeInfo*>(AcquireMagickMemory(sizeof(QuantizeInfo)))), 00025 _drawInfo(static_cast<DrawInfo*>(AcquireMagickMemory( sizeof(DrawInfo)))) 00026 { 00027 // Initialize image info with defaults 00028 GetImageInfo( _imageInfo ); 00029 00030 // Initialize quantization info 00031 GetQuantizeInfo( _quantizeInfo ); 00032 00033 // Initialize drawing info 00034 GetDrawInfo( _imageInfo, _drawInfo ); 00035 }

Here is the call graph for this function:

Magick::Options::Options const Options options_  ) 
 

Definition at line 38 of file Options.cpp.

References CloneDrawInfo(), CloneImageInfo(), and CloneQuantizeInfo().

00039 : _imageInfo(CloneImageInfo( options_._imageInfo )), 00040 _quantizeInfo(CloneQuantizeInfo(options_._quantizeInfo)), 00041 _drawInfo(CloneDrawInfo(_imageInfo, options_._drawInfo)) 00042 { 00043 }

Here is the call graph for this function:

Magick::Options::~Options  ) 
 

Definition at line 59 of file Options.cpp.

References _drawInfo, _imageInfo, _quantizeInfo, DestroyDrawInfo(), DestroyImageInfo(), and DestroyQuantizeInfo().

00060 { 00061 // Destroy image info 00062 _imageInfo =DestroyImageInfo( _imageInfo ); 00063 _imageInfo=0; 00064 00065 // Destroy quantization info 00066 _quantizeInfo =DestroyQuantizeInfo( _quantizeInfo ); 00067 _quantizeInfo=0; 00068 00069 // Destroy drawing info 00070 _drawInfo =DestroyDrawInfo( _drawInfo ); 00071 _drawInfo=0; 00072 }

Here is the call graph for this function:

Magick::Options::Options const MagickLib::ImageInfo imageInfo_,
const MagickLib::QuantizeInfo quantizeInfo_,
const MagickLib::DrawInfo drawInfo_
 

Definition at line 46 of file Options.cpp.

References _drawInfo, _imageInfo, _quantizeInfo, CloneDrawInfo(), CloneImageInfo(), and CloneQuantizeInfo().

00049 : _imageInfo(0), 00050 _quantizeInfo(0), 00051 _drawInfo(0) 00052 { 00053 _imageInfo = CloneImageInfo(imageInfo_); 00054 _quantizeInfo = CloneQuantizeInfo(quantizeInfo_); 00055 _drawInfo = CloneDrawInfo(imageInfo_,drawInfo_); 00056 }

Here is the call graph for this function:


Member Function Documentation

bool Magick::Options::adjoin void   )  const
 

Definition at line 95 of file Options.cpp.

References _imageInfo.

00096 { 00097 return static_cast<bool>(_imageInfo->adjoin); 00098 }

void Magick::Options::adjoin bool  flag_  ) 
 

Definition at line 90 of file Options.cpp.

References _imageInfo, MagickFalse, and MagickTrue.

Referenced by Magick::Image::adjoin().

00091 { 00092 _imageInfo->adjoin = static_cast<MagickBooleanType> 00093 (flag_ ? MagickTrue : MagickFalse); 00094 }

bool Magick::Options::antiAlias void   )  const
 

Definition at line 85 of file Options.cpp.

References _drawInfo.

00086 { 00087 return static_cast<bool>(_drawInfo->text_antialias); 00088 }

void Magick::Options::antiAlias bool  flag_  ) 
 

Definition at line 80 of file Options.cpp.

References _drawInfo, MagickFalse, and MagickTrue.

Referenced by Magick::Image::antiAlias().

00081 { 00082 _drawInfo->text_antialias = static_cast<MagickBooleanType> 00083 (flag_ ? MagickTrue : MagickFalse); 00084 }

Magick::Color Magick::Options::backgroundColor void   )  const
 

Definition at line 104 of file Options.cpp.

References _imageInfo, and Magick::Color.

00105 { 00106 return Magick::Color( _imageInfo->background_color ); 00107 }

void Magick::Options::backgroundColor const Color color_  ) 
 

Definition at line 100 of file Options.cpp.

References _imageInfo.

Referenced by Magick::Image::backgroundColor().

00101 { 00102 _imageInfo->background_color = color_; 00103 }

std::string Magick::Options::backgroundTexture void   )  const
 

Definition at line 116 of file Options.cpp.

References _imageInfo.

00117 { 00118 if ( _imageInfo->texture ) 00119 return std::string( _imageInfo->texture ); 00120 else 00121 return std::string(); 00122 }

void Magick::Options::backgroundTexture const std::string &  backgroundTexture_  ) 
 

Definition at line 109 of file Options.cpp.

References _imageInfo, Magick::CloneString(), and RelinquishMagickMemory().

Referenced by Magick::Image::backgroundTexture().

00110 { 00111 if ( backgroundTexture_.length() == 0 ) 00112 _imageInfo->texture=(char *) RelinquishMagickMemory(_imageInfo->texture); 00113 else 00114 Magick::CloneString( &_imageInfo->texture, backgroundTexture_ ); 00115 }

Here is the call graph for this function:

Magick::Color Magick::Options::borderColor void   )  const
 

Definition at line 129 of file Options.cpp.

References _imageInfo, and Magick::Color.

00130 { 00131 return Magick::Color( _imageInfo->border_color ); 00132 }

void Magick::Options::borderColor const Color color_  ) 
 

Definition at line 124 of file Options.cpp.

References _drawInfo, and _imageInfo.

Referenced by Magick::Image::borderColor().

00125 { 00126 _imageInfo->border_color = color_; 00127 _drawInfo->border_color = color_; 00128 }

Magick::Color Magick::Options::boxColor void   )  const
 

Definition at line 139 of file Options.cpp.

References _drawInfo, and Magick::Color.

00140 { 00141 return Magick::Color( _drawInfo->undercolor ); 00142 }

void Magick::Options::boxColor const Color boxColor_  ) 
 

Definition at line 135 of file Options.cpp.

References _drawInfo.

Referenced by Magick::Image::boxColor().

00136 { 00137 _drawInfo->undercolor = boxColor_; 00138 }

double Magick::Options::colorFuzz void   )  const
 

Definition at line 157 of file Options.cpp.

References _imageInfo.

00158 { 00159 return _imageInfo->fuzz; 00160 }

void Magick::Options::colorFuzz double  fuzz_  ) 
 

Definition at line 153 of file Options.cpp.

References _imageInfo.

Referenced by Magick::Image::colorFuzz().

00154 { 00155 _imageInfo->fuzz = fuzz_; 00156 }

Magick::CompressionType Magick::Options::compressType void   )  const
 

Definition at line 148 of file Options.cpp.

References _imageInfo.

00149 { 00150 return static_cast<Magick::CompressionType>(_imageInfo->compression); 00151 }

void Magick::Options::compressType CompressionType  compressType_  ) 
 

Definition at line 144 of file Options.cpp.

References _imageInfo.

Referenced by Magick::Image::compressType().

00145 { 00146 _imageInfo->compression = compressType_; 00147 }

bool Magick::Options::debug void   )  const
 

Definition at line 174 of file Options.cpp.

References IsEventLogging().

00175 { 00176 if( IsEventLogging() ) 00177 { 00178 return true; 00179 } 00180 return false; 00181 }

Here is the call graph for this function:

void Magick::Options::debug bool  flag_  ) 
 

Definition at line 163 of file Options.cpp.

References SetLogEventMask().

Referenced by Magick::Image::debug().

00164 { 00165 if(flag_) 00166 { 00167 SetLogEventMask("All"); 00168 } 00169 else 00170 { 00171 SetLogEventMask("None"); 00172 } 00173 }

Here is the call graph for this function:

Magick::Geometry Magick::Options::density void   )  const
 

Definition at line 190 of file Options.cpp.

References _imageInfo, and Magick::Geometry.

00191 { 00192 if ( _imageInfo->density ) 00193 return Geometry( _imageInfo->density ); 00194 00195 return Geometry(); 00196 }

void Magick::Options::density const Geometry geomery_  ) 
 

Definition at line 183 of file Options.cpp.

References _imageInfo, Magick::CloneString(), Magick::Geometry::isValid(), and RelinquishMagickMemory().

Referenced by Magick::Image::density().

00184 { 00185 if ( !density_.isValid() ) 00186 _imageInfo->density=(char *) RelinquishMagickMemory(_imageInfo->density); 00187 else 00188 Magick::CloneString( &_imageInfo->density, density_ ); 00189 }

Here is the call graph for this function:

unsigned int Magick::Options::depth void   )  const
 

Definition at line 202 of file Options.cpp.

References _imageInfo.

00203 { 00204 return _imageInfo->depth; 00205 }

void Magick::Options::depth unsigned int  depth_  ) 
 

Definition at line 198 of file Options.cpp.

References _imageInfo.

Referenced by Magick::Image::depth(), and Magick::Image::modulusDepth().

00199 { 00200 _imageInfo->depth = depth_; 00201 }

MagickLib::DrawInfo * Magick::Options::drawInfo void   ) 
 

Definition at line 803 of file Options.cpp.

References _drawInfo.

Referenced by Magick::Image::annotate(), and Magick::Image::fontTypeMetrics().

00804 { 00805 return _drawInfo; 00806 }

Magick::EndianType Magick::Options::endian void   )  const
 

Definition at line 213 of file Options.cpp.

References _imageInfo.

00214 { 00215 return _imageInfo->endian; 00216 }

void Magick::Options::endian EndianType  endian_  ) 
 

Definition at line 209 of file Options.cpp.

References _imageInfo.

Referenced by Magick::Image::endian().

00210 { 00211 _imageInfo->endian = endian_; 00212 }

std::string Magick::Options::fileName void   )  const
 

Definition at line 223 of file Options.cpp.

References _imageInfo.

00224 { 00225 return std::string( _imageInfo->filename ); 00226 }

void Magick::Options::fileName const std::string &  fileName_  ) 
 

Definition at line 218 of file Options.cpp.

References _imageInfo, and MaxTextExtent.

Referenced by Magick::Image::fileName(), Magick::Image::ping(), and Magick::Image::read().

00219 { 00220 fileName_.copy( _imageInfo->filename, MaxTextExtent-1 ); 00221 _imageInfo->filename[ fileName_.length() ] = 0; 00222 }

Magick::Color Magick::Options::fillColor void   )  const
 

Definition at line 233 of file Options.cpp.

References _drawInfo.

00234 { 00235 return _drawInfo->fill; 00236 }

void Magick::Options::fillColor const Color fillColor_  ) 
 

Definition at line 229 of file Options.cpp.

References _drawInfo.

Referenced by Magick::Image::fillColor(), and Magick::Image::penColor().

00230 { 00231 _drawInfo->fill = fillColor_; 00232 }

const MagickLib::Image * Magick::Options::fillPattern void   )  const
 

Definition at line 260 of file Options.cpp.

References _drawInfo.

00261 { 00262 return _drawInfo->fill_pattern; 00263 }

void Magick::Options::fillPattern const MagickLib::Image fillPattern_  ) 
 

Definition at line 239 of file Options.cpp.

References _drawInfo, CloneImage(), DestroyImageList(), ExceptionInfo, GetExceptionInfo(), MagickTrue, and Magick::throwException().

Referenced by Magick::Image::fillPattern(), Magick::Image::floodFillTexture(), and Magick::Image::penTexture().

00240 { 00241 if ( _drawInfo->fill_pattern ) 00242 { 00243 DestroyImageList( _drawInfo->fill_pattern ); 00244 _drawInfo->fill_pattern = 0; 00245 } 00246 00247 if ( fillPattern_ ) 00248 { 00249 ExceptionInfo exceptionInfo; 00250 GetExceptionInfo( &exceptionInfo ); 00251 _drawInfo->fill_pattern = 00252 CloneImage( const_cast<MagickLib::Image*>(fillPattern_), 00253 0, 00254 0, 00255 static_cast<MagickBooleanType>(MagickTrue), 00256 &exceptionInfo ); 00257 throwException( exceptionInfo ); 00258 } 00259 }

Here is the call graph for this function:

Magick::FillRule Magick::Options::fillRule void   )  const
 

Definition at line 270 of file Options.cpp.

References _drawInfo.

00271 { 00272 return _drawInfo->fill_rule; 00273 }

void Magick::Options::fillRule const FillRule fillRule_  ) 
 

Definition at line 266 of file Options.cpp.

References _drawInfo.

Referenced by Magick::Image::fillRule().

00267 { 00268 _drawInfo->fill_rule = fillRule_; 00269 }

std::string Magick::Options::font void   )  const
 

Definition at line 288 of file Options.cpp.

References _imageInfo.

00289 { 00290 if ( _imageInfo->font ) 00291 return std::string( _imageInfo->font ); 00292 00293 return std::string(); 00294 }

void Magick::Options::font const std::string &  font_  ) 
 

Definition at line 275 of file Options.cpp.

References _drawInfo, _imageInfo, Magick::CloneString(), and RelinquishMagickMemory().

Referenced by Magick::Image::font().

00276 { 00277 if ( font_.length() == 0 ) 00278 { 00279 _imageInfo->font=(char *) RelinquishMagickMemory(_imageInfo->font); 00280 _drawInfo->font=(char *) RelinquishMagickMemory(_drawInfo->font); 00281 } 00282 else 00283 { 00284 Magick::CloneString( &_imageInfo->font, font_ ); 00285 Magick::CloneString( &_drawInfo->font, font_ ); 00286 } 00287 }

Here is the call graph for this function:

double Magick::Options::fontPointsize void   )  const
 

Definition at line 301 of file Options.cpp.

References _imageInfo.

00302 { 00303 return _imageInfo->pointsize; 00304 }

void Magick::Options::fontPointsize double  pointSize_  ) 
 

Definition at line 296 of file Options.cpp.

References _drawInfo, and _imageInfo.

Referenced by Magick::Image::fontPointsize().

00297 { 00298 _imageInfo->pointsize = pointSize_; 00299 _drawInfo->pointsize = pointSize_; 00300 }

std::string Magick::Options::format void   )  const
 

Definition at line 306 of file Options.cpp.

References _imageInfo, _MagickInfo::description, GetExceptionInfo(), GetMagickInfo(), and MagickInfo.

00307 { 00308 ExceptionInfo exception; 00309 00310 const MagickInfo * magick_info = 0; 00311 GetExceptionInfo(&exception); 00312 if ( *_imageInfo->magick != '\0' ) 00313 magick_info = GetMagickInfo( _imageInfo->magick , &exception); 00314 00315 if (( magick_info != 0 ) && 00316 ( *magick_info->description != '\0' )) 00317 return std::string( magick_info->description ); 00318 00319 return std::string(); 00320 }

Here is the call graph for this function:

MagickLib::ImageInfo * Magick::Options::imageInfo void   ) 
 

Definition at line 808 of file Options.cpp.

References _imageInfo.

Referenced by Magick::ImageRef::ImageRef().

00809 { 00810 return _imageInfo; 00811 }

Magick::InterlaceType Magick::Options::interlaceType void   )  const
 

Definition at line 326 of file Options.cpp.

References _imageInfo.

00327 { 00328 return static_cast<Magick::InterlaceType>(_imageInfo->interlace); 00329 }

void Magick::Options::interlaceType InterlaceType  interlace_  ) 
 

Definition at line 322 of file Options.cpp.

References _imageInfo.

Referenced by Magick::Image::interlaceType().

00323 { 00324 _imageInfo->interlace = interlace_; 00325 }

std::string Magick::Options::magick void   )  const
 

Definition at line 343 of file Options.cpp.

References _imageInfo.

00344 { 00345 if ( _imageInfo->magick && *_imageInfo->magick ) 00346 return std::string( _imageInfo->magick ); 00347 00348 return std::string(); 00349 }

void Magick::Options::magick const std::string &  magick_  ) 
 

Definition at line 331 of file Options.cpp.

References _imageInfo, FormatString(), GetExceptionInfo(), MagickTrue, OptionWarning, SetImageInfo(), and Magick::throwExceptionExplicit().

Referenced by Magick::Image::magick().

00332 { 00333 ExceptionInfo exception; 00334 00335 FormatString( _imageInfo->filename, "%.1024s:", magick_.c_str() ); 00336 GetExceptionInfo(&exception); 00337 SetImageInfo( _imageInfo, MagickTrue, &exception); 00338 if ( *_imageInfo->magick == '\0' ) 00339 throwExceptionExplicit( OptionWarning, 00340 "Unrecognized image format", 00341 magick_.c_str() ); 00342 }

Here is the call graph for this function:

Magick::Color Magick::Options::matteColor void   )  const
 

Definition at line 355 of file Options.cpp.

References _imageInfo, and Magick::Color.

00356 { 00357 return Magick::Color( _imageInfo->matte_color ); 00358 }

void Magick::Options::matteColor const Color matteColor_  ) 
 

Definition at line 351 of file Options.cpp.

References _imageInfo.

Referenced by Magick::Image::matteColor().

00352 { 00353 _imageInfo->matte_color = matteColor_; 00354 }

bool Magick::Options::monochrome void   )  const
 

Definition at line 364 of file Options.cpp.

References _imageInfo.

00365 { 00366 return static_cast<bool>(_imageInfo->monochrome); 00367 }

void Magick::Options::monochrome bool  monochromeFlag_  ) 
 

Definition at line 360 of file Options.cpp.

References _imageInfo, and MagickBooleanType.

Referenced by Magick::Image::monochrome().

00361 { 00362 _imageInfo->monochrome = (MagickBooleanType) monochromeFlag_; 00363 }

Options& Magick::Options::operator= const Options  )  [private]
 

Magick::Geometry Magick::Options::page void   )  const
 

Definition at line 376 of file Options.cpp.

References _imageInfo, and Magick::Geometry.

00377 { 00378 if ( _imageInfo->page ) 00379 return Geometry( _imageInfo->page ); 00380 00381 return Geometry(); 00382 }

void Magick::Options::page const Geometry pageSize_  ) 
 

Definition at line 369 of file Options.cpp.

References _imageInfo, Magick::CloneString(), Magick::Geometry::isValid(), and RelinquishMagickMemory().

Referenced by Magick::Image::page().

00370 { 00371 if ( !pageSize_.isValid() ) 00372