summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-26 17:13:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-28 07:34:27 +0100
commite2cb154195fdc2ffccdb6f5e87cae8b29640b3eb (patch)
tree7c3d53d78e0867aa879b98d84211d1e73602520f /vcl/headless
parent0ea41fea75cd1ac1d81fa57c4411e75a6b4001f0 (diff)
convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/svpgdi.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 2c6dd2486ff5..a532ce7c2358 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -123,7 +123,7 @@ namespace
void Toggle1BitTransparency(const BitmapBuffer& rBuf)
{
- assert(rBuf.maPalette.GetBestIndex(BitmapColor(Color(COL_BLACK))) == 0);
+ assert(rBuf.maPalette.GetBestIndex(BitmapColor(COL_BLACK)) == 0);
// TODO: make upper layers use standard alpha
if (getCairoFormat(rBuf) == CAIRO_FORMAT_A1)
{
@@ -329,7 +329,7 @@ namespace
pAlphaBits.reset( new unsigned char[nImageSize] );
memcpy(pAlphaBits.get(), pMaskBuf->mpBits, nImageSize);
- const sal_Int32 nBlackIndex = pMaskBuf->maPalette.GetBestIndex(BitmapColor(Color(COL_BLACK)));
+ const sal_Int32 nBlackIndex = pMaskBuf->maPalette.GetBestIndex(BitmapColor(COL_BLACK));
if (nBlackIndex == 0)
{
// TODO: make upper layers use standard alpha
@@ -1073,7 +1073,7 @@ void SvpSalGraphics::applyColor(cairo_t *cr, SalColor aColor)
}
else
{
- double fSet = aColor == COL_BLACK ? 1.0 : 0.0;
+ double fSet = aColor == sal_uInt32(COL_BLACK) ? 1.0 : 0.0;
cairo_set_source_rgba(cr, 1, 1, 1, fSet);
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
}
@@ -1301,8 +1301,8 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh
if (GetBitCount() == 1)
{
aPal.SetEntryCount(2);
- aPal[0] = Color(COL_BLACK);
- aPal[1] = Color(COL_WHITE);
+ aPal[0] = COL_BLACK;
+ aPal[1] = COL_WHITE;
}
if (!pBitmap->Create(Size(nWidth, nHeight), GetBitCount(), aPal))