summaryrefslogtreecommitdiff
path: root/include/cppcanvas/color.hxx
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/color.hxx
parent6d7191a9bbbae1421edc7d94dccc040f622bc227 (diff)
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/color.hxx')
-rw-r--r--include/cppcanvas/color.hxx30
1 files changed, 10 insertions, 20 deletions
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;
}