#define MAGICKCORE_IMPLEMENTATION 1
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
-#include "Magick++/Include.h"
#include <string>
#include <string.h>
#include <stdlib.h>
#include <math.h>
+#include "Magick++/Include.h"
#include "Magick++/Options.h"
#include "Magick++/Functions.h"
#include "Magick++/Exception.h"
-#define MagickPI 3.14159265358979323846264338327950288419716939937510
#define DegreesToRadians(x) (MagickPI*(x)/180.0)
// Constructor
return Geometry();
}
-void Magick::Options::depth ( unsigned int depth_ )
+void Magick::Options::depth ( size_t depth_ )
{
_imageInfo->depth = depth_;
}
-unsigned int Magick::Options::depth ( void ) const
+size_t Magick::Options::depth ( void ) const
{
return _imageInfo->depth;
}
void Magick::Options::file ( FILE *file_ )
{
- SetImageInfoFile(_imageInfo, file_ );
+ SetImageInfoFile( _imageInfo, file_ );
}
FILE *Magick::Options::file ( void ) const
{
- return _imageInfo->file;
+ return GetImageInfoFile( _imageInfo );
}
void Magick::Options::fileName ( const std::string &fileName_ )
{
ExceptionInfo exception;
- FormatMagickString( _imageInfo->filename, MaxTextExtent, "%.1024s:", magick_.c_str() );
+ FormatLocaleString( _imageInfo->filename, MaxTextExtent, "%.1024s:", magick_.c_str() );
GetExceptionInfo(&exception);
- SetImageInfo( _imageInfo, MagickTrue, &exception);
+ SetImageInfo( _imageInfo, 1, &exception);
if ( *_imageInfo->magick == '\0' )
- throwExceptionExplicit( OptionWarning,
- "Unrecognized image format",
- magick_.c_str() );
+ throwExceptionExplicit( OptionWarning, "Unrecognized image format",
+ magick_.c_str() );
(void) DestroyExceptionInfo( &exception );
}
std::string Magick::Options::magick ( void ) const
return Geometry();
}
-void Magick::Options::quality ( unsigned int quality_ )
+void Magick::Options::quality ( size_t quality_ )
{
_imageInfo->quality = quality_;
}
-unsigned int Magick::Options::quality ( void ) const
+size_t Magick::Options::quality ( void ) const
{
return _imageInfo->quality;
}
-void Magick::Options::quantizeColors ( unsigned int colors_ )
+void Magick::Options::quantizeColors ( size_t colors_ )
{
_quantizeInfo->number_colors = colors_;
}
-unsigned int Magick::Options::quantizeColors ( void ) const
+size_t Magick::Options::quantizeColors ( void ) const
{
return _quantizeInfo->number_colors;
}
return static_cast<bool>(_imageInfo->dither);
}
-void Magick::Options::quantizeTreeDepth ( unsigned int treeDepth_ )
+void Magick::Options::quantizeTreeDepth ( size_t treeDepth_ )
{
_quantizeInfo->tree_depth = treeDepth_;
}
-unsigned int Magick::Options::quantizeTreeDepth ( void ) const
+size_t Magick::Options::quantizeTreeDepth ( void ) const
{
return _quantizeInfo->tree_depth;
}
if(strokeDashArray_)
{
// Count elements in dash array
- unsigned int x;
+ size_t x;
for (x=0; strokeDashArray_[x]; x++) ;
// Allocate elements
_drawInfo->dash_pattern =
}
// miterLimit for drawing lines, circles, ellipses, etc.
-void Magick::Options::strokeMiterLimit ( unsigned int miterLimit_ )
+void Magick::Options::strokeMiterLimit ( size_t miterLimit_ )
{
_drawInfo->miterlimit = miterLimit_;
}
-unsigned int Magick::Options::strokeMiterLimit ( void ) const
+size_t Magick::Options::strokeMiterLimit ( void ) const
{
return _drawInfo->miterlimit;
}
return _drawInfo->stroke_width;
}
-void Magick::Options::subImage ( unsigned int subImage_ )
+void Magick::Options::subImage ( size_t subImage_ )
{
_imageInfo->scene = subImage_;
}
-unsigned int Magick::Options::subImage ( void ) const
+size_t Magick::Options::subImage ( void ) const
{
return _imageInfo->scene;
}
-void Magick::Options::subRange ( unsigned int subRange_ )
+void Magick::Options::subRange ( size_t subRange_ )
{
_imageInfo->number_scenes = subRange_;
}
-unsigned int Magick::Options::subRange ( void ) const
+size_t Magick::Options::subRange ( void ) const
{
return _imageInfo->number_scenes;
}
return std::string();
}
-void Magick::Options::tileName ( const std::string &tileName_ )
-{
- if ( tileName_.length() == 0 )
- _imageInfo->tile=(char *) RelinquishMagickMemory(_imageInfo->tile);
- else
- Magick::CloneString( &_imageInfo->tile, tileName_ );
-}
-std::string Magick::Options::tileName ( void ) const
-{
- if ( _imageInfo->tile )
- return std::string( _imageInfo->tile );
- return std::string();
-}
-
// Image representation type
void Magick::Options::type ( const Magick::ImageType type_ )
{
return static_cast<bool>(_imageInfo->verbose);
}
-void Magick::Options::virtualPixelMethod ( VirtualPixelMethod virtual_pixel_method_ )
-{
- _imageInfo->virtual_pixel_method = virtual_pixel_method_;
-}
-Magick::VirtualPixelMethod Magick::Options::virtualPixelMethod ( void ) const
-{
- return static_cast<Magick::VirtualPixelMethod>(_imageInfo->virtual_pixel_method);
-}
-
void Magick::Options::view ( const std::string &view_ )
{
if ( view_.length() == 0 )