9 #define MAGICKCORE_IMPLEMENTATION 1 10 #define MAGICK_PLUSPLUS_IMPLEMENTATION 1 15 #if !defined(MAGICKCORE_WINDOWS_SUPPORT) 43 return(!(left_ == right_));
49 return(!(left_ < right_) && (left_ != right_));
61 return((left_ > right_) || (left_ == right_));
67 return((left_ < right_) || (left_ == right_));
102 : _width(geometry_._width),
103 _height(geometry_._height),
104 _xOff(geometry_._xOff),
105 _yOff(geometry_._yOff),
106 _isValid(geometry_._isValid),
107 _percent(geometry_._percent),
108 _aspect(geometry_._aspect),
109 _greater(geometry_._greater),
110 _less(geometry_._less),
111 _fillArea(geometry_._fillArea),
112 _limitPixels(geometry_._limitPixels)
154 *
this=std::string(geometry_);
161 if (
this != &geometry_)
163 _width=geometry_._width;
164 _height=geometry_._height;
165 _xOff=geometry_._xOff;
166 _yOff=geometry_._yOff;
167 _isValid=geometry_._isValid;
168 _percent=geometry_._percent;
169 _aspect=geometry_._aspect;
170 _greater=geometry_._greater;
171 _less=geometry_._less;
172 _fillArea=geometry_._fillArea;
173 _limitPixels=geometry_._limitPixels;
179 const std::string &geometry_)
182 geom[MagickPathExtent];
199 (void) CopyMagickString(geom,geometry_.c_str(),MagickPathExtent);
200 if (geom[0] !=
'-' && geom[0] !=
'+' && geom[0] !=
'x' &&
201 !isdigit(static_cast<int>(geom[0])))
203 pageptr=GetPageGeometry(geom);
206 (void) CopyMagickString(geom,pageptr,MagickPathExtent);
207 pageptr=(
char *) RelinquishMagickMemory(pageptr);
211 flags=GetGeometry(geom,&x,&y,&width_val,&height_val);
213 if (flags == NoValue)
221 if ((flags & WidthValue) != 0)
227 if ((flags & HeightValue) != 0)
233 if ((flags & XValue) != 0)
235 _xOff=
static_cast<ssize_t
>(x);
239 if ((flags & YValue) != 0)
241 _yOff=
static_cast<ssize_t
>(y);
245 if ((flags & PercentValue) != 0)
248 if ((flags & AspectValue) != 0)
251 if ((flags & LessValue) != 0)
254 if ((flags & GreaterValue) != 0)
257 if ((flags & MinimumValue) != 0)
260 if ((flags & AreaValue) != 0)
266 Magick::Geometry::operator std::string()
const 269 buffer[MagickPathExtent];
276 "Invalid geometry argument");
280 FormatLocaleString(buffer,MagickPathExtent,
"%.20g",(
double) _width);
286 FormatLocaleString(buffer,MagickPathExtent,
"%.20g",(
double) _height);
296 FormatLocaleString(buffer,MagickPathExtent,
"%.20g",(
double) _xOff);
302 FormatLocaleString(buffer,MagickPathExtent,
"%.20g",(
double) _yOff);
389 _limitPixels=limitPixels_;
394 return(_limitPixels);
439 : _width(static_cast<size_t>(rectangle_.width)),
440 _height(static_cast<size_t>(rectangle_.height)),
441 _xOff(static_cast<ssize_t>(rectangle_.x)),
442 _yOff(static_cast<ssize_t>(rectangle_.y)),
454 const MagickCore::RectangleInfo &rectangle_)
456 _width=
static_cast<size_t>(rectangle_.width),
457 _height=static_cast<size_t>(rectangle_.height),
458 _xOff=
static_cast<ssize_t
>(rectangle_.x),
459 _yOff=static_cast<ssize_t>(rectangle_.y),
464 Magick::Geometry::operator MagickCore::RectangleInfo()
const 466 RectangleInfo rectangle;
467 rectangle.
width=_width;
468 rectangle.height=_height;
477 return((left_.
x() == right_.
x()) &&
478 (left_.
y() == right_.
y()));
484 return(!(left_ == right_));
525 MagickCore::GeometryInfo
528 MagickCore::MagickStatusType
531 flags=ParseGeometry(offset_,&geometry_info);
532 _x=geometry_info.rho;
533 _y=geometry_info.sigma;
534 if ((flags & MagickCore::SigmaValue) == 0)
542 if (
this != &offset_)
552 *
this=offset_.c_str();
566 Magick::Offset::operator MagickCore::OffsetInfo()
const 577 return((left_.
x() == right_.
x()) &&
578 (left_.
y() == right_.
y()));
584 return(!(left_ == right_));
631 MagickCore::GeometryInfo
634 MagickCore::MagickStatusType
637 flags=ParseGeometry(point_,&geometry_info);
638 _x=geometry_info.rho;
639 _y=geometry_info.sigma;
640 if ((flags & MagickCore::SigmaValue) == 0)
665 *
this=point_.c_str();
669 Magick::Point::operator std::string()
const 672 buffer[MagickPathExtent];
682 FormatLocaleString(buffer,MagickPathExtent,
"%.20g",_x);
690 FormatLocaleString(buffer,MagickPathExtent,
"%.20g",(
double) _y);
const Geometry & operator=(const char *geometry_)
MagickPPExport int operator!=(const Magick::Color &left_, const Magick::Color &right_)
void width(size_t width_)
void aspect(bool aspect_)
bool fillArea(void) const
void height(size_t height_)
size_t height(void) const
bool limitPixels(void) const
const Point & operator=(const char *point_)
MagickPPExport int operator<(const Magick::Color &left_, const Magick::Color &right_)
void yOff(::ssize_t yOff_)
MagickPPExport int operator<=(const Magick::Color &left_, const Magick::Color &right_)
MagickPPExport int operator>=(const Magick::Color &left_, const Magick::Color &right_)
class MagickPPExport Geometry
void xOff(::ssize_t xOff_)
const Offset & operator=(const char *offset_)
void greater(bool greater_)
MagickPPExport void throwExceptionExplicit(const MagickCore::ExceptionType severity_, const char *reason_, const char *description_=(char *) NULL)
::ssize_t xOff(void) const
void fillArea(bool fillArea_)
::ssize_t yOff(void) const
MagickPPExport int operator>(const Magick::Color &left_, const Magick::Color &right_)
MagickPPExport int operator==(const Magick::Color &left_, const Magick::Color &right_)
void percent(bool percent_)
void isValid(bool isValid_)
void limitPixels(bool limitPixels_)