Example #1
0
MagickPPExport int Magick::operator == (const Magick::Geometry& left_,
  const Magick::Geometry& right_)
{
  return((left_.aspect() == right_.aspect()) &&
    (left_.fillArea() == right_.fillArea()) &&
    (left_.greater() == right_.greater()) &&
    (left_.height() == right_.height()) &&
    (left_.isValid() == right_.isValid()) &&
    (left_.less() == right_.less()) &&
    (left_.limitPixels() == right_.limitPixels()) &&
    (left_.percent() == right_.percent()) &&
    (left_.width() == right_.width()) &&
    (left_.xOff() == right_.xOff()) &&
    (left_.yOff() == right_.yOff()));
}
Example #2
0
void Magick::Options::page ( const Magick::Geometry &pageSize_ )
{
  if ( !pageSize_.isValid() )
    _imageInfo->page=(char *) RelinquishMagickMemory(_imageInfo->page);
  else
    Magick::CloneString( &_imageInfo->page, pageSize_ );
}
Example #3
0
void Magick::Options::density ( const Magick::Geometry &density_ )
{
  if ( !density_.isValid() )
    _imageInfo->density=(char *) RelinquishMagickMemory(_imageInfo->density);
  else
    Magick::CloneString( &_imageInfo->density, density_ );
}
Example #4
0
int Magick::operator == ( const Magick::Geometry& left_,
			  const Magick::Geometry& right_ )
{
  return (
	  ( left_.isValid()   == right_.isValid() ) &&
	  ( left_.width()     == right_.width() ) &&
	  ( left_.height()    == right_.height() ) &&
	  ( left_.xOff()      == right_.xOff() ) &&
	  ( left_.yOff()      == right_.yOff() ) &&
	  ( left_.xNegative() == right_.xNegative() ) &&
	  ( left_.yNegative() == right_.yNegative() ) &&
	  ( left_.percent()   == right_.percent() ) &&
	  ( left_.aspect()    == right_.aspect() ) &&
	  ( left_.greater()   == right_.greater() ) &&
	  ( left_.less()      == right_.less() )
	  );
}
	}
	//==============================================================================================
	MagickGeometry::MagickGeometry(Rectangle rectangle)
	{
		Initialize(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, false);
	}
	//==============================================================================================
	MagickGeometry::MagickGeometry(String^ value)
	{
		Throw::IfNullOrEmpty("value", value);

		std::string geometrySpec;
		Marshaller::Marshal(value, geometrySpec);

		Magick::Geometry geometry = Magick::Geometry(geometrySpec);
		Throw::IfFalse("geometry", geometry.isValid(), "Invalid geometry specified.");

		Initialize(geometry);
	}
	//==============================================================================================
	bool MagickGeometry::operator == (MagickGeometry^ left, MagickGeometry^ right)
	{
		return Object::Equals(left, right);
	}
	//==============================================================================================
	bool MagickGeometry::operator != (MagickGeometry^ left, MagickGeometry^ right)
	{
		return !Object::Equals(left, right);
	}
	//==============================================================================================
	bool MagickGeometry::operator > (MagickGeometry^ left, MagickGeometry^ right)