summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-14 11:11:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-26 08:44:50 +0200
commitbea081b5099786e5fcadddd72c247b9a9488286a (patch)
treedd165f81e850cb9bcfa23b713bd60e3fb26d21ee /vcl/quartz
parenta488c7ad2763b944713997911c1ddb0315d8c93f (diff)
replace SalColor with Color
Change-Id: I615640a378a61cf6e44e84a647ce06bdd8a52807 Reviewed-on: https://gerrit.libreoffice.org/51239 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/salbmp.cxx8
-rw-r--r--vcl/quartz/salgdi.cxx6
-rw-r--r--vcl/quartz/salgdicommon.cxx34
3 files changed, 24 insertions, 24 deletions
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index aba40b44d8e0..5333eca2b961 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -907,7 +907,7 @@ CGImageRef QuartzSalBitmap::CreateWithMask( const QuartzSalBitmap& rMask,
/** creates an image from the given rectangle, replacing all black pixels
with nMaskColor and make all other full transparent */
CGImageRef QuartzSalBitmap::CreateColorMask( int nX, int nY, int nWidth,
- int nHeight, SalColor nMaskColor ) const
+ int nHeight, Color nMaskColor ) const
{
CGImageRef xMask = nullptr;
if (m_pUserBuffer.get() && (nX + nWidth <= mnWidth) && (nY + nHeight <= mnHeight))
@@ -922,9 +922,9 @@ CGImageRef QuartzSalBitmap::CreateColorMask( int nX, int nY, int nWidth,
{
sal_uInt32 nColor;
reinterpret_cast<sal_uInt8*>(&nColor)[0] = 0xff;
- reinterpret_cast<sal_uInt8*>(&nColor)[1] = SALCOLOR_RED( nMaskColor );
- reinterpret_cast<sal_uInt8*>(&nColor)[2] = SALCOLOR_GREEN( nMaskColor );
- reinterpret_cast<sal_uInt8*>(&nColor)[3] = SALCOLOR_BLUE( nMaskColor );
+ reinterpret_cast<sal_uInt8*>(&nColor)[1] = nMaskColor.GetRed();
+ reinterpret_cast<sal_uInt8*>(&nColor)[2] = nMaskColor.GetGreen();
+ reinterpret_cast<sal_uInt8*>(&nColor)[3] = nMaskColor.GetBlue();
sal_uInt8* pSource = m_pUserBuffer.get();
if( nY )
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index a6c9a528bff7..7ee45db62aef 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -272,10 +272,10 @@ SalGraphicsImpl* AquaSalGraphics::GetImpl() const
return nullptr;
}
-void AquaSalGraphics::SetTextColor( SalColor nSalColor )
+void AquaSalGraphics::SetTextColor( Color nColor )
{
- maTextColor = RGBAColor( nSalColor );
- // SAL_ DEBUG(std::hex << nSalColor << std::dec << "={" << maTextColor.GetRed() << ", " << maTextColor.GetGreen() << ", " << maTextColor.GetBlue() << ", " << maTextColor.GetAlpha() << "}");
+ maTextColor = RGBAColor( nColor );
+ // SAL_ DEBUG(std::hex << nColor << std::dec << "={" << maTextColor.GetRed() << ", " << maTextColor.GetGreen() << ", " << maTextColor.GetBlue() << ", " << maTextColor.GetAlpha() << "}");
}
void AquaSalGraphics::GetFontMetric(ImplFontMetricDataRef& rxFontMetric, int nFallbackLevel)
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 76644b4f0a11..11643e4f16cd 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -481,18 +481,18 @@ static void getBoundRect( sal_uInt32 nPoints, const SalPoint *pPtAry,
rHeight = nY2 - nY1 + 1;
}
-static SalColor ImplGetROPSalColor( SalROPColor nROPColor )
+static Color ImplGetROPColor( SalROPColor nROPColor )
{
- SalColor nSalColor;
+ Color nColor;
if ( nROPColor == SalROPColor::N0 )
{
- nSalColor = MAKE_SALCOLOR( 0, 0, 0 );
+ nColor = Color( 0, 0, 0 );
}
else
{
- nSalColor = MAKE_SALCOLOR( 255, 255, 255 );
+ nColor = Color( 255, 255, 255 );
}
- return nSalColor;
+ return nColor;
}
// apply the XOR mask to the target context if active and dirty
@@ -901,7 +901,7 @@ void AquaSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 )
DBG_DRAW_OPERATION_EXIT("drawLine");
}
-void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap, SalColor nMaskColor )
+void AquaSalGraphics::drawMask( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap, Color nMaskColor )
{
DBG_DRAW_OPERATION("drawMask",);
@@ -937,9 +937,9 @@ void AquaSalGraphics::drawPixel( long nX, long nY )
ImplDrawPixel( nX, nY, maLineColor );
}
-void AquaSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
+void AquaSalGraphics::drawPixel( long nX, long nY, Color nColor )
{
- const RGBAColor aPixelColor( nSalColor );
+ const RGBAColor aPixelColor( nColor );
ImplDrawPixel( nX, nY, aPixelColor );
}
@@ -1487,7 +1487,7 @@ long AquaSalGraphics::GetGraphicsWidth() const
return w;
}
-SalColor AquaSalGraphics::getPixel( long nX, long nY )
+Color AquaSalGraphics::getPixel( long nX, long nY )
{
// return default value on printers or when out of bounds
if( !mxLayer || (nX < 0) || (nX >= mnWidth) ||
@@ -1527,8 +1527,8 @@ SalColor AquaSalGraphics::getPixel( long nX, long nY )
SAL_INFO( "vcl.cg", "CGContextRelease(" << xOnePixelContext << ")" );
CGContextRelease( xOnePixelContext );
- SalColor nSalColor = MAKE_SALCOLOR( aPixel.r, aPixel.g, aPixel.b );
- return nSalColor;
+ Color nColor( aPixel.r, aPixel.g, aPixel.b );
+ return nColor;
}
void AquaSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
@@ -1838,9 +1838,9 @@ void AquaSalGraphics::SetLineColor()
}
}
-void AquaSalGraphics::SetLineColor( SalColor nSalColor )
+void AquaSalGraphics::SetLineColor( Color nColor )
{
- maLineColor = RGBAColor( nSalColor );
+ maLineColor = RGBAColor( nColor );
if( CheckContext() )
{
SAL_INFO( "vcl.cg", "CGContextSetRGBStrokeColor(" << mrContext << "," << maLineColor << ")" );
@@ -1860,9 +1860,9 @@ void AquaSalGraphics::SetFillColor()
}
}
-void AquaSalGraphics::SetFillColor( SalColor nSalColor )
+void AquaSalGraphics::SetFillColor( Color nColor )
{
- maFillColor = RGBAColor( nSalColor );
+ maFillColor = RGBAColor( nColor );
if( CheckContext() )
{
SAL_INFO( "vcl.cg", "CGContextSetRGBFillColor(" << mrContext << "," << maFillColor << ")" );
@@ -1940,7 +1940,7 @@ void AquaSalGraphics::SetROPFillColor( SalROPColor nROPColor )
{
if( ! mbPrinter )
{
- SetFillColor( ImplGetROPSalColor( nROPColor ) );
+ SetFillColor( ImplGetROPColor( nROPColor ) );
}
}
@@ -1948,7 +1948,7 @@ void AquaSalGraphics::SetROPLineColor( SalROPColor nROPColor )
{
if( ! mbPrinter )
{
- SetLineColor( ImplGetROPSalColor( nROPColor ) );
+ SetLineColor( ImplGetROPColor( nROPColor ) );
}
}