diff options
Diffstat (limited to 'include/cppcanvas')
-rw-r--r-- | include/cppcanvas/canvas.hxx | 2 | ||||
-rw-r--r-- | include/cppcanvas/color.hxx | 30 | ||||
-rw-r--r-- | include/cppcanvas/polypolygon.hxx | 6 | ||||
-rw-r--r-- | include/cppcanvas/renderer.hxx | 8 |
4 files changed, 17 insertions, 29 deletions
diff --git a/include/cppcanvas/canvas.hxx b/include/cppcanvas/canvas.hxx index b7d39ca473fe..425d38e44213 100644 --- a/include/cppcanvas/canvas.hxx +++ b/include/cppcanvas/canvas.hxx @@ -83,8 +83,6 @@ namespace cppcanvas */ virtual ::basegfx::B2DPolyPolygon const* getClip() const = 0; - virtual ColorSharedPtr createColor() const = 0; - virtual CanvasSharedPtr clone() const = 0; virtual void clear() const = 0; diff --git a/include/cppcanvas/color.hxx b/include/cppcanvas/color.hxx index 0a5477cfa995..2f735e52b638 100644 --- a/include/cppcanvas/color.hxx +++ b/include/cppcanvas/color.hxx @@ -27,44 +27,34 @@ namespace cppcanvas { - class Color - { - public: - /** Color in the sRGB color space, plus alpha channel - - The four bytes of the sal_uInt32 are allocated as follows - to the color channels and alpha: 0xRRGGBBAA. - */ - typedef sal_uInt32 IntSRGBA; - - virtual ~Color() {} - - virtual css::uno::Sequence< double > getDeviceColor( IntSRGBA aSRGBA ) const = 0; - }; + /** Color in the sRGB color space, plus alpha channel - typedef std::shared_ptr< ::cppcanvas::Color > ColorSharedPtr; + The four bytes of the sal_uInt32 are allocated as follows + to the color channels and alpha: 0xRRGGBBAA. + */ + typedef sal_uInt32 IntSRGBA; - inline sal_uInt8 getRed( Color::IntSRGBA nCol ) + inline sal_uInt8 getRed( IntSRGBA nCol ) { return static_cast<sal_uInt8>( (nCol&0xFF000000U) >> 24U ); } - inline sal_uInt8 getGreen( Color::IntSRGBA nCol ) + inline sal_uInt8 getGreen( IntSRGBA nCol ) { return static_cast<sal_uInt8>( (nCol&0x00FF0000U) >> 16U ); } - inline sal_uInt8 getBlue( Color::IntSRGBA nCol ) + inline sal_uInt8 getBlue( IntSRGBA nCol ) { return static_cast<sal_uInt8>( (nCol&0x0000FF00U) >> 8U ); } - inline sal_uInt8 getAlpha( Color::IntSRGBA nCol ) + inline sal_uInt8 getAlpha( IntSRGBA nCol ) { return static_cast<sal_uInt8>( nCol&0x000000FFU ); } - inline Color::IntSRGBA makeColor( sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue, sal_uInt8 nAlpha ) + inline IntSRGBA makeColor( sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue, sal_uInt8 nAlpha ) { return (nRed << 24U)|(nGreen << 16U)|(nBlue << 8U)|nAlpha; } diff --git a/include/cppcanvas/polypolygon.hxx b/include/cppcanvas/polypolygon.hxx index 04fae838d18c..869301652329 100644 --- a/include/cppcanvas/polypolygon.hxx +++ b/include/cppcanvas/polypolygon.hxx @@ -58,13 +58,13 @@ namespace cppcanvas /** Set polygon fill color */ - virtual void setRGBAFillColor( Color::IntSRGBA ) = 0; + virtual void setRGBAFillColor( IntSRGBA ) = 0; /** Set polygon line color */ - virtual void setRGBALineColor( Color::IntSRGBA ) = 0; + virtual void setRGBALineColor( IntSRGBA ) = 0; /** Get polygon line color */ - virtual Color::IntSRGBA getRGBALineColor() const = 0; + virtual IntSRGBA getRGBALineColor() const = 0; virtual void setStrokeWidth( const double& rStrokeWidth ) = 0; virtual double getStrokeWidth() const = 0; diff --git a/include/cppcanvas/renderer.hxx b/include/cppcanvas/renderer.hxx index 51b5085ca455..113bda783f20 100644 --- a/include/cppcanvas/renderer.hxx +++ b/include/cppcanvas/renderer.hxx @@ -100,16 +100,16 @@ namespace cppcanvas struct Parameters { /// Optionally forces the fill color attribute for all actions - ::boost::optional< Color::IntSRGBA > maFillColor; + ::boost::optional< IntSRGBA > maFillColor; /// Optionally forces the line color attribute for all actions - ::boost::optional< Color::IntSRGBA > maLineColor; + ::boost::optional< IntSRGBA > maLineColor; /// Optionally forces the text color attribute for all actions - ::boost::optional< Color::IntSRGBA > maTextColor; + ::boost::optional< IntSRGBA > maTextColor; /// Optionally forces the given fontname for all text actions - ::boost::optional< OUString > maFontName; + ::boost::optional< OUString > maFontName; /** Optionally transforms all text output actions with the given matrix (in addition to the overall canvas |