From f77524954702f52fe3cd3f40edac539f6a7170dc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 8 Oct 2017 12:32:58 +0200 Subject: 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 Reviewed-by: Noel Grandin --- cppcanvas/source/mtfrenderer/implrenderer.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cppcanvas/source/mtfrenderer') diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index f5e59ed6359c..144246de2e2f 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -2902,14 +2902,12 @@ namespace cppcanvas tools::calcLogic2PixelAffineTransform( aStateStack.getState().mapModeTransform, *aVDev.get() ); - ColorSharedPtr pColor( getCanvas()->createColor() ); - { ::cppcanvas::internal::OutDevState& rState = aStateStack.getState(); // setup default text color to black rState.textColor = rState.textFillColor = - rState.textLineColor = pColor->getDeviceColor( 0x000000FF ); + rState.textLineColor = tools::intSRGBAToDoubleSequence( 0x000000FF ); } // apply overrides from the Parameters struct @@ -2917,13 +2915,13 @@ namespace cppcanvas { ::cppcanvas::internal::OutDevState& rState = aStateStack.getState(); rState.isFillColorSet = true; - rState.fillColor = pColor->getDeviceColor( *rParams.maFillColor ); + rState.fillColor = tools::intSRGBAToDoubleSequence( *rParams.maFillColor ); } if( rParams.maLineColor.is_initialized() ) { ::cppcanvas::internal::OutDevState& rState = aStateStack.getState(); rState.isLineColorSet = true; - rState.lineColor = pColor->getDeviceColor( *rParams.maLineColor ); + rState.lineColor = tools::intSRGBAToDoubleSequence( *rParams.maLineColor ); } if( rParams.maTextColor.is_initialized() ) { @@ -2932,7 +2930,7 @@ namespace cppcanvas rState.isTextLineColorSet = true; rState.textColor = rState.textFillColor = - rState.textLineColor = pColor->getDeviceColor( *rParams.maTextColor ); + rState.textLineColor = tools::intSRGBAToDoubleSequence( *rParams.maTextColor ); } if( rParams.maFontName.is_initialized() || rParams.maFontWeight.is_initialized() || -- cgit