summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authordante <dante19031999@gmail.com>2020-11-08 14:32:57 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-11 06:51:22 +0100
commitf3b52717e85621d3b4ee1c6d69700e2a0cca8efc (patch)
treeaa4df032b1ab661ad19b3ebc2e8e2c59babb4b07 /vcl/source/outdev
parent3d90997fb6f232d8008df4d166d7b97b869c200f (diff)
Improved starmath color
Color.hxx has now documentation ( even if it is quite obvious if you know RGB standar ). Color.hxx has been reordered in more coherent order, but kept format. Some changes on Color.hxx dynamics. Color.hxx starmath colors list Now colors are managed by starmathdatabse. The path is open for simple addition of colors, there are no more infinite switches with color tokens here and there. To add a color, just put it in Color.hxx and register it in starmathdatabse.cxx. Do not forget to change array size in starmathdatabase.hxx. Now mathml supports RGB colors in #RRGGBB format ( import and export ). New colors have been added. Only the HTML Css1 are available via UI. New colors will be added. I intend to finish Css2 and dvipsnames ( latex colors ) on posterior patches. RGBA command has been unlocked for compatibility reasons. However will be displayed as RGB. Added color #RRGGBB. Improved qa color test on mathml to test RGB on mathml. TODO for someone on the UI team: - Add a color picker. - If it is a color with name: - It will add in the code "color " + starmathdatabase::Identify_Color_DVIPSNAMES( colorvalue ).pIdent +" " - If not: - It will add in the code "color " + starmathdatabase::Identify_Color_DVIPSNAMES( colorvalue ).pIdent +" "+ colorvalue.getRed() +" "+ colorvalue.getGreen() +" "+ colorvalue.getBlue() +" " - Note that those will habe eType with value TRGB or TRGBA. Change-Id: I47af37bd191b3099e8e6e08e7a5fb1a8a227bbf2 Change-Id: If971473ddcc34739439818dba9a62ca3494a4473 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/bitmap.cxx6
-rw-r--r--vcl/source/outdev/transparent.cxx6
2 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 7b6e8ab6be91..7a6615fa4bac 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -879,11 +879,11 @@ public:
nAlpha = (nAlphaLine1 + nMapFY * ((nAlphaLine2 >> 7) - (nAlphaLine1 >> 7))) >> 7;
- *pDestScanline = ColorChannelMerge(*pDestScanline, nColor1, nAlpha);
+ *pDestScanline = color::ColorChannelMerge(*pDestScanline, nColor1, nAlpha);
pDestScanline++;
- *pDestScanline = ColorChannelMerge(*pDestScanline, nColor2, nAlpha);
+ *pDestScanline = color::ColorChannelMerge(*pDestScanline, nColor2, nAlpha);
pDestScanline++;
- *pDestScanline = ColorChannelMerge(*pDestScanline, nColor3, nAlpha);
+ *pDestScanline = color::ColorChannelMerge(*pDestScanline, nColor3, nAlpha);
pDestScanline++;
pDestScanline++;
}
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 283cf70dd021..58242661a2ac 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -595,9 +595,9 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
}
if( ( *pRScan & cBit ) == cBlack )
{
- pWScan[ 0 ] = ColorChannelMerge( pWScan[ 0 ], nB, cTrans );
- pWScan[ 1 ] = ColorChannelMerge( pWScan[ 1 ], nG, cTrans );
- pWScan[ 2 ] = ColorChannelMerge( pWScan[ 2 ], nR, cTrans );
+ pWScan[ 0 ] = color::ColorChannelMerge( pWScan[ 0 ], nB, cTrans );
+ pWScan[ 1 ] = color::ColorChannelMerge( pWScan[ 1 ], nG, cTrans );
+ pWScan[ 2 ] = color::ColorChannelMerge( pWScan[ 2 ], nR, cTrans );
}
}
}