コード例 #1
0
ファイル: Geometry.cpp プロジェクト: edalquist/ImageMagick
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()));
}
コード例 #2
0
ファイル: Options.cpp プロジェクト: 0xPr0xy/ImageMagick
void Magick::Options::page ( const Magick::Geometry &pageSize_ )
{
  if ( !pageSize_.isValid() )
    _imageInfo->page=(char *) RelinquishMagickMemory(_imageInfo->page);
  else
    Magick::CloneString( &_imageInfo->page, pageSize_ );
}
コード例 #3
0
ファイル: Options.cpp プロジェクト: 0xPr0xy/ImageMagick
void Magick::Options::density ( const Magick::Geometry &density_ )
{
  if ( !density_.isValid() )
    _imageInfo->density=(char *) RelinquishMagickMemory(_imageInfo->density);
  else
    Magick::CloneString( &_imageInfo->density, density_ );
}
コード例 #4
0
ファイル: Geometry.cpp プロジェクト: 0xPr0xy/ImageMagick
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() )
	  );
}
コード例 #5
0
	}
	//==============================================================================================
	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)