summaryrefslogtreecommitdiffstats
path: root/include/cppcanvas
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-10-08 12:32:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-09 21:05:09 +0200
commitf77524954702f52fe3cd3f40edac539f6a7170dc (patch)
tree99c885b2ce6eb703d7d1cceab1196e8527154613 /include/cppcanvas
parenttdf#112931 always signal AllUserEventsProcessed (diff)
downloadcore-f77524954702f52fe3cd3f40edac539f6a7170dc.tar.gz
core-f77524954702f52fe3cd3f40edac539f6a7170dc.zip
remove cppcanvas Color class
which actually does nothing useful. Looks like it was originally intended to be used to implement color profiles, but since nothing has happened on that front since it was created, safe to say it never will. Probably not the right place in the graphics stack to do it anyhow. Change-Id: I36990db4036e3b4b2b75261fc430028562a6dbd9 Reviewed-on: https://gerrit.libreoffice.org/43240 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/cppcanvas')
-rw-r--r--include/cppcanvas/canvas.hxx2
-rw-r--r--include/cppcanvas/color.hxx30
-rw-r--r--include/cppcanvas/polypolygon.hxx6
-rw-r--r--include/cppcanvas/renderer.hxx8
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