Loading...
Searching...
No Matches
Magick::Point Class Reference

## Public Member Functions

| Point (const char *point_)
| Point (const Point &point_)
| Point (const std::string &point_)
| Point (double x_, double y_)
| Point (double xy_)
const Point & | operator= (const char *point_)
const Point & | operator= (double xy_)
Point & | operator= (const Point &point_)
const Point & | operator= (const std::string &point_)
| operator std::string () const
bool | isValid () const
double | x (void) const
double | y (void) const

## Private Attributes

double | _x
double | _y

## Detailed Description

Definition at line 208 of file Geometry.h.

## Constructor & Destructor Documentation

## Point() [1/6]

Magick::Point::Point | ( | void |  | ) |

Definition at line 589 of file Geometry.cpp.

: _x(0.0),
_y(0.0)
{
}

## Point() [2/6]

Magick::Point::Point | ( | const char * | point_ | ) |

Definition at line 595 of file Geometry.cpp.

: _x(0.0),
_y(0.0)
{
*this=point_; // Use assignment operator
}

## Point() [3/6]

Magick::Point::Point | ( | const Point & | point_ | ) |

Definition at line 602 of file Geometry.cpp.

: _x(point_._x),
_y(point_._y)
{
}

## Point() [4/6]

Magick::Point::Point | ( | const std::string & | point_ | ) |

Definition at line 608 of file Geometry.cpp.

: _x(0.0),
_y(0.0)
{
*this=point_; // Use assignment operator
}

## Point() [5/6]

Magick::Point::Point | ( | double | x_,
|  | double | y_
| ) |  |

Definition at line 615 of file Geometry.cpp.

: _x(x_),
_y(y_)
{
}

## Point() [6/6]

Magick::Point::Point | ( | double | xy_ | ) |

Definition at line 621 of file Geometry.cpp.

: _x(xy_),
_y(xy_)
{
}

## ~Point()

Magick::Point::~Point | ( | void |  | ) |

Definition at line 627 of file Geometry.cpp.

{
}

## Member Function Documentation

## isValid()

bool Magick::Point::isValid | ( | void |  | ) | const

Definition at line 698 of file Geometry.cpp.

{
return(_x > 0.0);
}

## operator std::string()

Magick::Point::operator std::string | ( |  | ) | const

Definition at line 671 of file Geometry.cpp.

{
char
buffer[MagickPathExtent];
string
point;
if (_x < 0.0)
point+="-";
else
point+="+";
FormatLocaleString(buffer,MagickPathExtent,"%.20g",_x);
point+=buffer;
if (_y < 0.0)
point+="x-";
else
point+="x+";
FormatLocaleString(buffer,MagickPathExtent,"%.20g",(double) _y);
point+=buffer;
return(point);
}

## operator=() [1/4]

const Magick::Point & Magick::Point::operator= | ( | const char * | point_ | ) |

Definition at line 631 of file Geometry.cpp.

{
MagickCore::GeometryInfo
geometry_info;
MagickCore::MagickStatusType
flags;
flags=ParseGeometry(point_,&geometry_info);
_x=geometry_info.rho;
_y=geometry_info.sigma;
if ((flags & MagickCore::SigmaValue) == 0)
_y=_x;
return(*this);
}

## operator=() [2/4]

Magick::Point & Magick::Point::operator= | ( | const Point & | point_ | ) |

Definition at line 654 of file Geometry.cpp.

{
// If not being set to ourself
if (this != &point_)
{
_x=point_._x;
_y=point_._y;
}
return(*this);
}

## operator=() [3/4]

const Magick::Point & Magick::Point::operator= | ( | const std::string & | point_ | ) |

Definition at line 665 of file Geometry.cpp.

{
*this=point_.c_str();
return(*this);
}

## operator=() [4/4]

const Magick::Point & Magick::Point::operator= | ( | double | xy_ | ) |

Definition at line 647 of file Geometry.cpp.

{
_x=xy_;
_y=xy_;
return(*this);
}

## x()

double Magick::Point::x | ( | void |  | ) | const

Definition at line 703 of file Geometry.cpp.

{
return(_x);
}

## y()

double Magick::Point::y | ( | void |  | ) | const

Definition at line 708 of file Geometry.cpp.

{
return(_y);
}

## Field Documentation

## _x

double Magick::Point::_x

private

Definition at line 258 of file Geometry.h.

## _y

double Magick::Point::_y

private

Definition at line 259 of file Geometry.h.

The documentation for this class was generated from the following files:

- /build/imagemagick-icbe39/imagemagick-7.1.2.3+dfsg1/Magick++/lib/Magick++/Geometry.h
- /build/imagemagick-icbe39/imagemagick-7.1.2.3+dfsg1/Magick++/lib/Geometry.cpp