From: Dirk Lemstra Date: Sun, 23 Apr 2017 07:49:53 +0000 (+0200) Subject: Fixed property names of DrawableRoundRectangle. X-Git-Tag: 7.0.5-5~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97c8eaaa9f6f6e774510ff9b412bac18f03340df;p=imagemagick Fixed property names of DrawableRoundRectangle. --- diff --git a/Magick++/lib/Drawable.cpp b/Magick++/lib/Drawable.cpp index fa10ac0d0..9eb2399f2 100644 --- a/Magick++/lib/Drawable.cpp +++ b/Magick++/lib/Drawable.cpp @@ -1106,8 +1106,8 @@ Magick::DrawableRoundRectangle::~DrawableRoundRectangle ( void ) void Magick::DrawableRoundRectangle::operator() ( MagickCore::DrawingWand * context_ ) const { - DrawRoundRectangle( context_, _centerX,_centerY, _width,_hight, - _cornerWidth, _cornerHeight); + DrawRoundRectangle(context_,_upperLeftX,_upperLeftY,_lowerRightX, + _lowerRightY,_cornerWidth, _cornerHeight); } Magick::DrawableBase* Magick::DrawableRoundRectangle::copy() const { diff --git a/Magick++/lib/Magick++/Drawable.h b/Magick++/lib/Magick++/Drawable.h index 1fc06bcec..9145f19a6 100644 --- a/Magick++/lib/Magick++/Drawable.h +++ b/Magick++/lib/Magick++/Drawable.h @@ -1491,13 +1491,13 @@ private: class MagickPPExport DrawableRoundRectangle : public DrawableBase { public: - DrawableRoundRectangle ( double centerX_, double centerY_, - double width_, double hight_, + DrawableRoundRectangle ( double upperLeftX_, double upperLeftY_, + double lowerRightX_, double lowerRightY_, double cornerWidth_, double cornerHeight_ ) - : _centerX(centerX_), - _centerY(centerY_), - _width(width_), - _hight(hight_), + : _upperLeftX(upperLeftX_), + _upperLeftY(upperLeftY_), + _lowerRightX(lowerRightX_), + _lowerRightY(lowerRightY_), _cornerWidth(cornerWidth_), _cornerHeight(cornerHeight_) { } @@ -1510,40 +1510,80 @@ public: // Return polymorphic copy of object /*virtual*/ DrawableBase* copy() const; +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) + void centerX( double centerX_ ) { - _centerX = centerX_; + _upperLeftX = centerX_; } double centerX( void ) const { - return _centerX; + return _upperLeftX; } void centerY( double centerY_ ) { - _centerY = centerY_; + _upperLeftY = centerY_; } double centerY( void ) const { - return _centerY; + return _upperLeftY; } void width( double width_ ) { - _width = width_; + _lowerRightX = width_; } double width( void ) const { - return _width; + return _lowerRightX; } void hight( double hight_ ) { - _hight = hight_; + _lowerRightY = hight_; } double hight( void ) const { - return _hight; + return _lowerRightY; + } + +#endif + + void upperLeftX( double upperLeftX_ ) + { + _upperLeftX = upperLeftX_; + } + double upperLeftX( void ) const + { + return _upperLeftX; + } + + void upperLeftY( double upperLeftY_ ) + { + _upperLeftY = upperLeftY_; + } + double upperLeftY( void ) const + { + return _upperLeftY; + } + + void lowerRightX( double lowerRightX_ ) + { + _lowerRightX = lowerRightX_; + } + double lowerRightX( void ) const + { + return _lowerRightX; + } + + void lowerRightY( double lowerRightY_ ) + { + _lowerRightY = lowerRightY_; + } + double lowerRightY( void ) const + { + return _lowerRightY; } void cornerWidth( double cornerWidth_ ) @@ -1565,10 +1605,10 @@ public: } private: - double _centerX; - double _centerY; - double _width; - double _hight; + double _upperLeftX; + double _upperLeftY; + double _lowerRightX; + double _lowerRightY; double _cornerWidth; double _cornerHeight; };