diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2020-12-24 10:13:09 +1100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-26 19:23:42 +0100 |
commit | 43978d8f25a41c20c72d93cc3cb972c93c52674a (patch) | |
tree | 27dff744dc494a4ca500de87a2d1ede886e08090 /vcl/source/outdev | |
parent | a5c1a64555ed0aebc2610ae874bff4713be366a7 (diff) |
tools: add Color::IsTransparent()
This removes the need for OutputDevice::ImplIsColorTransparent().
Change-Id: I8f98199c5ce1c171c453b6897f27eacbd53f1eea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108248
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/outdevstate.cxx | 7 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 3 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 3 |
3 files changed, 5 insertions, 8 deletions
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 7b1a22a9ce54..9760e309dad8 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -28,7 +28,6 @@ #include <vcl/settings.hxx> #include <outdev.h> -#include <outdata.hxx> #include <salgdi.hxx> OutDevState::OutDevState() @@ -334,7 +333,7 @@ void OutputDevice::SetFillColor( const Color& rColor ) DrawModeFlags::GrayFill | DrawModeFlags::NoFill | DrawModeFlags::SettingsFill ) ) { - if( !ImplIsColorTransparent( aColor ) ) + if( !aColor.IsTransparent() ) { if( mnDrawMode & DrawModeFlags::BlackFill ) { @@ -363,7 +362,7 @@ void OutputDevice::SetFillColor( const Color& rColor ) if ( mpMetaFile ) mpMetaFile->AddAction( new MetaFillColorAction( aColor, true ) ); - if ( ImplIsColorTransparent( aColor ) ) + if ( aColor.IsTransparent() ) { if ( mbFillColor ) { @@ -411,7 +410,7 @@ void OutputDevice::SetLineColor( const Color& rColor ) if( mpMetaFile ) mpMetaFile->AddAction( new MetaLineColorAction( aColor, true ) ); - if( ImplIsColorTransparent( aColor ) ) + if( aColor.IsTransparent() ) { if ( mbLineColor ) { diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index c23f93b5ddfb..8b8c5363a2cc 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -40,7 +40,6 @@ #include <vcl/toolkit/controllayout.hxx> #include <config_fuzzers.h> -#include <outdata.hxx> #include <outdev.h> #include <salgdi.hxx> #include <svdata.hxx> @@ -714,7 +713,7 @@ void OutputDevice::SetTextFillColor() void OutputDevice::SetTextFillColor( const Color& rColor ) { Color aColor( rColor ); - bool bTransFill = ImplIsColorTransparent( aColor ); + bool bTransFill = aColor.IsTransparent(); if ( !bTransFill ) { diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 1fc443511270..5944c9777299 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -31,7 +31,6 @@ #include <vcl/settings.hxx> #include <vcl/virdev.hxx> -#include <outdata.hxx> #include <salgdi.hxx> #include <bitmapwriteaccess.hxx> @@ -84,7 +83,7 @@ Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) const DrawModeFlags::GrayLine | DrawModeFlags::SettingsLine ) ) { - if( !ImplIsColorTransparent( aColor ) ) + if( !aColor.IsTransparent() ) { if( nDrawMode & DrawModeFlags::BlackLine ) { |