summaryrefslogtreecommitdiff
path: root/drawinglayer
AgeCommit message (Collapse)AuthorFilesLines
2021-05-21properly draw only parts of FillGradientPrimitive2D (tdf#139000)Luboš Luňák1-8/+16
The size of the whole gradient is getDefinitionRange(), while getOutputRange() gives the area of it to draw. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115923 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 9bf9fea0afadef0912d38f0d08b2bf2959569100) Change-Id: I85dd7fe51bcc9c332a6fb0e6748d5ac89266b910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115954 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-28forward axial and radial gradient types to VCL tooLuboš Luňák1-2/+9
VCL's drawGradient() can handle them all, at least using a fallback algorithm. And drawinglayer doesn't know which of them are handled directly by the VCL backend used. A catch is that the rendering of tdf#133477 is different, so keep using drawinglayer for the affected gradient types until somebody fixes that. Change-Id: I1719c67c15752c6d1c3431ddfa797ac94d039555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103376 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 6965bb07bb33429a7663a3f3ebe58ed89c4327d9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103427 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-28use vcl lin. gradient drawing in drawinglayer + cairo impl.Tomaž Vajngerl2-0/+74
This adds a divert for drawing of linear gradients drawing, which can be implemented natively with a much higher quality and speed. This also adds a implementation of drawing linear gradients with cairo. Change-Id: I8c39915c3579e6eb88cdce8ae4ac9694ffdb4957 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103374 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 20c09d351ee060bdde13d92d2bf86dd998cdb0cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103425 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-09tdf#127471 Remove font width scaling hackSamuel Mehrbrodt1-14/+0
Which causes distorted fonts in certain cases (see bug report). Fix was suggested by Ilhan Yesil at https://bugs.documentfoundation.org/show_bug.cgi?id=127471#c6 Change-Id: Ie644f56f0835ffad9230f981d2927d6b4c17453d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100970 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 8891a2fc2a4bf86add68691b7ac167a07a8add84) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101960 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-23tdf#130478 Enhance Dashed line drawing on all systemsArmin Le Grand (Collabora)2-65/+29
For more info and explanation including state of process information and discussion(s) see task please. Adding corrections for gerrit build Change-Id: Ie10fb8093a86459dee80db5ab4355b47e46c1f8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88130 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-05-12tdf#129916 svx: fix origin of scaled shadowMiklos Vajna1-1/+19
We assumed that the top left corner is the origin for scaling, but that is not necessarily the case. The intention is that the shadow direction can be determined from its x and y offset, and the origin is the opposite corner of the shape. (cherry picked from commit e21d522dddce2590ed435890ae8d5fe39658a71a) Conflicts: svx/CppunitTest_svx_unit.mk Change-Id: I6759302767d20739b6e2be79d379740dd06f70f5
2020-05-12tdf#130058 Import shadow size.Gülşah Köse1-1/+13
Change-Id: Ie1cee377a33567088fb76ea47f0e6fc51d47f0fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92188 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93419 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-08drawinglayer: handle more primitives in the xml dumpMiklos Vajna1-1/+62
In preparation of writing a test for semi-transparent shape text. Change-Id: I2dac94a6cd9da48de9a5e407ceab78fb8be933d7 Reviewed-on: https://gerrit.libreoffice.org/83264 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit b6d794e14e65697fbf47a5b425d9d264e26e0161)
2020-03-27tdf#89901 corectly interpret COL_TRANSPARENTArmin Le Grand1-2/+4
in wmfemfhelper when converting Metafile to sequence of Prmitives. In the MetafileActions MetaLineColorAction and MetaFillColorAction usage of COL_TRANSPARENT must switch off line draw/resp. fill Change-Id: Id5754773c06b7f4aa8824dce9b8b9e7e526e6067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91061 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> (cherry picked from commit 5b14a18f4748c7b09b432cfae5577c966213a80b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91171 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-12-28tdf#125901: apply color modifiers when drawing hatchAndrés Maldonado1-2/+2
With this fix, the shadow of a shape with a Hatching fill is no longer the same color as the hatching (in full screen mode) Change-Id: I979866e748b5caf2ccafc8a6084ffdb46bc8122c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/73964 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 9c64e8a2948c379c537ee0882afa57882facb26e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85864 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-12-18tdf#129459 drawinglayer: fill shapes with solid color brushChris Sherlock2-24/+35
EMF+ shapes were not filling when the brush style is a solid color. This patch fixes this issue. Change-Id: I6a2b12e514af9a85f50198dceee642fac8df2f1b Reviewed-on: https://gerrit.libreoffice.org/85343 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> (cherry picked from commit e356b371373ed6d047efac9913bc69cb2bfa0105) Reviewed-on: https://gerrit.libreoffice.org/85363 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-11-21tdf#42112 Add support for Custom Line CapBartosz Kosiorek2-7/+92
original patch updated by Chris Sherlock Change-Id: Ie68c3cc40d2c7263a0f786a973da77b00e4cbeb8 Reviewed-on: https://gerrit.libreoffice.org/82564 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> (cherry picked from commit d15518584a3197e4b8318d0176352a0584f42167) Reviewed-on: https://gerrit.libreoffice.org/83297 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2019-11-06loplugin:unusedvariablecheck tweak to find more stuffNoel Grandin1-6/+0
but leave the tweak commented out, since it generates false positives Change-Id: Iaf3f92414d2618f8780561f98765e33e282afe0c Reviewed-on: https://gerrit.libreoffice.org/82121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18make bin/update_pch.s always include code in trivial #if'sLuboš Luňák1-1/+4
E.g. #ifdef LIBO_INTERNAL_ONLY is always true for code that builds with our PCHs. Change-Id: I3cf311ea3621b909105754cfea2cb0116b8b67f5 Reviewed-on: https://gerrit.libreoffice.org/80961 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-08loplugin:redundantpointerops simplify *p.get()Noel Grandin2-2/+2
Change-Id: I12517651fb3f777fd08e384992bb3e84b340ad85 Reviewed-on: https://gerrit.libreoffice.org/80382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-23do not require $(SRCDIR) in every gb_Library_set_precompiled_headerLuboš Luňák1-1/+1
Change-Id: I7b3a22584bb2e4d501f509ffcd80929feed23a4c Reviewed-on: https://gerrit.libreoffice.org/79360 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-19tdf#94765: SVGIO: Look for gradient/pattern ids once the file...Xisco Fauli1-2/+15
... is completely parsed it might happen the element's id the url points to hasn't been parsed yet Change-Id: Ia92c9188de5d23f2f992846aa91f3f936aeefacb Reviewed-on: https://gerrit.libreoffice.org/79118 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-09-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I4671d0f13e67b1272fd7c24bb6a2a7679c75f20b Reviewed-on: https://gerrit.libreoffice.org/78797 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-01Fix typosAndrea Gelmini2-2/+2
Change-Id: I00d678ce942401fa3e53e5c0e159c747a4be6b0b Reviewed-on: https://gerrit.libreoffice.org/78367 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-24loplugin:returnconstval in desktop..formsNoel Grandin2-2/+2
Change-Id: I268e352e4e3054d1c1a8e61e52d91fd99794b359 Reviewed-on: https://gerrit.libreoffice.org/78057 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20loplugin:constvars in drawinglayer..frameworkNoel Grandin2-2/+2
Change-Id: I6e62229fdc38f49f766a306f5264afafe9acefa5 Reviewed-on: https://gerrit.libreoffice.org/77774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet1-1/+1
in cppuhelper, desktop, drawinglayer, embeddedobj, extensions Change-Id: I4c970f08c0723299f79c9e18bc71b7372a7092e4 Reviewed-on: https://gerrit.libreoffice.org/77636 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-09Fix typosAndrea Gelmini1-1/+1
Change-Id: I994f656b0828c9c7ea1463b86cd692f847d01e7e Reviewed-on: https://gerrit.libreoffice.org/77126 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): drawinglayerStephan Bergmann4-87/+87
Change-Id: Ibe4f11a289fd7f1f7f2caf30a825a91d665cfcdb Reviewed-on: https://gerrit.libreoffice.org/76684 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-26Be careful not to add empty rect representation to contour polypolygonStephan Bergmann1-2/+5
The implementation of TextSimplePortionPrimitive2D::getB2DRange in drawinglayer/source/primitive2d/textprimitive2d.cxx can return an empty B2DRange (which is represented internally as a huge square with DBL_MIN/MAX coordindates) and adding that to maExtractedContour would later cause > include/tools/helpers.hxx:76:44: runtime error: 1.79769e+308 is outside the range of representable values of type 'long' > #0 in FRound(double) at include/tools/helpers.hxx:76:44 > #1 in ImplPolygon::ImplPolygon(basegfx::B2DPolygon const&) at tools/source/generic/poly.cxx:474:30 > #2 in tools::Polygon::Polygon(basegfx::B2DPolygon const&) at tools/source/generic/poly.cxx:1849:72 > #3 in TextRanger::TextRanger(basegfx::B2DPolyPolygon const&, basegfx::B2DPolyPolygon const*, unsigned short, unsigned short, unsigned short, bool, bool, bool) at editeng/source/misc/txtrange.cxx:67:40 > #4 in std::_MakeUniq<TextRanger>::__single_object std::make_unique<TextRanger, basegfx::B2DPolyPolygon&, basegfx::B2DPolyPolygon*, int, unsigned short, unsigned short, bool, bool, bool>(basegfx::B2DPolyPolygon&, basegfx::B2DPolyPolygon*&&, int&&, unsigned short&&, unsigned short&&, bool&&, bool&&, bool&&) at /home/sbergman/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/10.0.0/../../../../include/c++/10.0.0/bits/unique_ptr.h:930:34 > #5 in SwContourCache::ContourRect(SwFormat const*, SdrObject const*, SwTextFrame const*, SwRect const&, long, bool) at sw/source/core/text/txtfly.cxx:252:13 when processing such a DBL_MAX = 1.79769e+308 coordinate while loading doc/ooo106646-2.doc (i.e., 3sem-program-electricity_and_magnetism.doc attached at <https://bz.apache.org/ooo/show_bug.cgi?id=106646#c13>). Change-Id: I7bcdf7fdb3a756d7fab0543697efeb8f92ceddb7 Reviewed-on: https://gerrit.libreoffice.org/76261 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-16cid#1448352 silence Arguments in wrong orderCaolán McNamara1-0/+1
Change-Id: I5c8627df362708933594fd8c94aa6125c0e27b10 Reviewed-on: https://gerrit.libreoffice.org/75664 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-06cid#1448352 Arguments in wrong orderNoel Grandin1-1/+1
Change-Id: I3f7a8aab6608b3ab891fc9ab20448549be3d3dd7 Reviewed-on: https://gerrit.libreoffice.org/75140 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-03Remove some unused includesMiklos Vajna1-1/+0
See tdf#42949 for motivation. Change-Id: I89c082d62409b40c8472b865cc60b0d10923c9c1 Reviewed-on: https://gerrit.libreoffice.org/75015 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-01Improve the looks of a wave line by draw it with bezier curvesTomaž Vajngerl1-3/+3
This adds drawing the wave line (typically used to underline the wrongly spelled words) with bezier curves. Previously the wave lines were drawn with drawing pixels, which didn't look that good, especially on HiDPI display, so the looks of wave lines now is therefor much better. The creation of the wave line as a polygon has been added to the basegfx module, so it can be reused if needed. In addition, everytime we draw the waveline, we have to enable antialiasing, to have a much better quality of the curves. By default the antialiasing is disabled for some reason. This also adds ScopedStates.hxx file which currently includes ScopedAntialiasing, which sets the antialiasing to a certain state for the time the object is in scope, and then sets it back to the original state. Change-Id: I4b866fc5d69725eb7f6f78a1acf4176b1205aa73 Reviewed-on: https://gerrit.libreoffice.org/74810 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-06-25improve loplugin:simplifyconstructNoel Grandin2-4/+4
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-21drawinglayer: disable multi-threaded rendering in sceneprimitive2dMiklos Vajna1-1/+1
It seems this is not stable yet: - https://dev-builds.libreoffice.org/crashtest/27e3ed0d25735603d2c82744e3a8f5f3e0a8d043/backtraces/task395-core.16181.backtrace.txt - https://ci.libreoffice.org/job/gerrit_linux_gcc_release/35032/console Go back to disabling that by default for now. Change-Id: I6cd870d2661bfb99b8ed5008c2542fede05ae8c8 Reviewed-on: https://gerrit.libreoffice.org/74513 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-06-17Add comphelper::getUnoTunnelImplementation templateArkadiy Illarionov1-1/+1
Use it instead of classname::getImplementation from UNO3_GETIMPLEMENTATION_* Change-Id: Ifcc8cfcd6369c576250008c76ce31ba79ea3a596 Reviewed-on: https://gerrit.libreoffice.org/74107 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-11Fix typoAndrea Gelmini1-1/+1
Change-Id: Icd14f92ae0e71b5f2b3cbff32e056352a6bb13a1 Reviewed-on: https://gerrit.libreoffice.org/73790 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-11Fix typoAndrea Gelmini1-1/+1
Change-Id: I905e172e9014f6039cde41a61a0c33b2cd52034f Reviewed-on: https://gerrit.libreoffice.org/73791 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-10tdf#125730: Shadow has the same color as the hatching fillXisco Fauli1-45/+54
Regression from 5c23459245f566831383934dd64d19e002bfcfcb If statement was removed while getOptionsDrawinglayer().IsAntiAliasing() condition still stands Change-Id: I33baf1975436d0f917d14bf5df8232dafba92793 Reviewed-on: https://gerrit.libreoffice.org/73762 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-04tdf#39593 remove IMPL_XUNOTUNNEL* macrosArkadiy Illarionov1-1/+1
Replace with UNO3_GETIMPLEMENTATION* macros. Replace single usage of IMPL_XUNOTUNNEL_MINIMAL with it's body. Change-Id: I7d4ad76399b999ebb2178ecf57edcf6bd2aa6c3e Reviewed-on: https://gerrit.libreoffice.org/73424 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-22New loplugin:dataStephan Bergmann2-3/+3
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-20Fix typosAndrea Gelmini1-1/+1
Change-Id: I4922f95ebc38e80e471139880ed894eda89402a8 Reviewed-on: https://gerrit.libreoffice.org/72142 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-05-19Fix typoAndrea Gelmini1-1/+1
Change-Id: I89b3231799586fec7924b6e1999a68cfe801db6f Reviewed-on: https://gerrit.libreoffice.org/72536 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-19Fix typoAndrea Gelmini1-1/+1
Change-Id: I557632d3b90a8c2d3d1aedf6c2b7550b9fee6bcb Reviewed-on: https://gerrit.libreoffice.org/72535 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-18Fix typoAndrea Gelmini1-1/+1
Change-Id: I6767316c630f479c6dc6ccb961865811ce8a2e0d Reviewed-on: https://gerrit.libreoffice.org/72509 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-18Fix typoAndrea Gelmini1-1/+1
Change-Id: Ia50e867c10b1389b97ecf3dd7f61c169288e38ba Reviewed-on: https://gerrit.libreoffice.org/72507 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-18Fix typoAndrea Gelmini1-6/+6
Change-Id: I7d033be3ca275d2d8fd19f937b1b1bc482ff8869 Reviewed-on: https://gerrit.libreoffice.org/72510 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-18Fix typoAndrea Gelmini1-3/+3
Change-Id: If570c55ac75c209d0b0b7331a0775ee38fa37c85 Reviewed-on: https://gerrit.libreoffice.org/72511 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-18Fix typoAndrea Gelmini1-1/+1
Change-Id: Ica307778196293ab948b28363f08f2a1358a92a3 Reviewed-on: https://gerrit.libreoffice.org/72508 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-18Fix typoAndrea Gelmini1-2/+2
Change-Id: Ibf50359ffa345ca1adbe4a093f63cff427aa79f3 Reviewed-on: https://gerrit.libreoffice.org/72505 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-18Fix typoAndrea Gelmini1-1/+1
Change-Id: I1951c8734204d23a49845b8548562bd1c92bcf74 Reviewed-on: https://gerrit.libreoffice.org/72506 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-15Fix typoAndrea Gelmini1-1/+1
Change-Id: I1e3ce93fb4aa475fb73a2521a0127d37a5b84dc1 Reviewed-on: https://gerrit.libreoffice.org/72326 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-14Revert "drawinglayer: avoid AA for hairline polygons built from ...Miklos Vajna2-20/+0
.. hori/vert lines only" This reverts commit f8b4d371eddd27594d549fb00294c01229a9bd24. Tomaz considers this ugly and it's no longer needed since commit 93abdf39b01bb7b404dc09ef37369a4350fb0d10 (sw lok: assume no windows in SwLayoutFrame::PaintSwFrame(), 2019-05-14). Conflicts: basegfx/test/B2DPolygonTest.cxx Change-Id: Ia9b29921ff3e5d82085e1abf9f39c172357a5e13 Reviewed-on: https://gerrit.libreoffice.org/72297 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-13Make BitmapColor inherit from / merge into ColorJan-Marek Glogowski1-1/+1
BitmapColor itself is kept to distingish the Color usage as part of a color palette, which continues to store the offset in the blue value. The original special mbIndex handling is long gone since commit 1fefdd6f3b41 ("Alpha channel in BitmapColor - change bIndex to alpha"), so there is no data difference. This also results in the following changes: * now has a basic_ostream<charT, traits>& operator<< (that was my actual starting point... for an other bug fix) * there is a minimal difference for GetLiminance BGR(29,151,76) => BGR(28,151,77) * no more return values for Merge and Invert (previously returning *this) * replaces all GetBlueOrIndex with GetIndex This leaves one "problematic" part: the GetColorError handling. At first glance it should probably be virtual. The Color variant is less strict then the BitmapColor one - for whatever reason. BitmapColor is always used to search for the best match in a Palette. Currently I'm simply leaving both variants. Would be nice to have an explict for functions here. Change-Id: I251ba3024a1d60f2a9d9fde9cd0a60f08e8322a7 Reviewed-on: https://gerrit.libreoffice.org/72181 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>