Commit Graph
611 Commits
Author SHA1 Message Date
Luboš Luňák 565824df07 fix dashed line info conversion for metafile (tdf#136957)
My previous change had two problems:
- It didn't handle correctly the case when something repeated,
  such as dash-dot-dot.
- The rounding when setting lengths was a left-over from my first
  attempt when LineInfo used integers and not floats.

Change-Id: I914241590b1ddec22df04c05dfe65e76e921ee52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114940
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-01 00:17:46 +02:00
Luboš Luňák b71d9a6d15 do not apply line dashing in drawinglayer (tdf#136957)
basegfx::utils::applyLineDashing() is not as good as the actual
VCL backend dashing, and there are some rounding errors because of
all the canvas transformation matrices or whatever, which leads
to the drawing problem. So use LineInfo to carry the dashing
information.
As a part of this change, also make LineInfo use doubles instead
of ints. The use of transformation matrices means that the values
may be fractional and less than one.

Change-Id: Ia5ac7d266cab344b7137052c81fbd96c1ce28003
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114710
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-29 16:05:53 +02:00
Noel Grandin 988e282731 loplugin:constantparam
Change-Id: I1d518bef47c838d03d8526a6a8fffd36d2ee68d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-17 16:49:38 +02:00
Tomaž Vajngerl 88a177f827 vcl: remove GetBitCount and GetColorCount from Bitmap{Ex}
We can cast the PixelFormat enum to int for the same information
and we can use the enum to reduce ambiguity when possible.

Change-Id: I6ea648139465568cdeb12e5f5f75c7b609365bf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113188
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-04-02 06:28:39 +02:00
Mike Kaganski a0656ec6fc const OUString -> const OUStringLiteral
Mostly automated rewrite

Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-25 10:06:26 +01:00
Noel ebe1f639cf loplugin:unusedmethods
Change-Id: I851eba4ca80eac9ee5896df53fbcd0f5ad125763
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112433
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-14 08:11:55 +01:00
Luboš Luňák af5ff9ee32 use VCL API rather than manually apply numeric alpha change
Change-Id: I500b3ad3d8229b792b7394a9e1b2f51fa9b1af2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112251
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-03-10 11:30:35 +01:00
Luboš Luňák 6b8c157a0b make RenderMaskPrimitive2DPixel() clip using clipping (tdf#140797)
The original implementation had this peculiar idea of implementing
clipping using transparency, which slows everything down, because
contents need to be copied and then alpha-blended. Keep that only
for when edges of the clip are to be smoothed.
As a side-effect this also seems to fix tdf#115843 again.
The commit also adjusts the test for tdf#133477 to not rely
on the rounding introduced by the optimization from tdf#115843.

Change-Id: Iebae5996159cf9f17066205985c5b591abdae105
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111966
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-03-08 13:46:36 +01:00
Antje Kazimiers fda6ca70c2 tdf#39674 Replace Quadrat
Change-Id: Icdc27fa9ab33a6c5a442760a9491e82000883ef1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110177
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-01 15:59:28 +01:00
Noel Grandin ef7f98ff3c transparency->alpha in BitmapEx
Change-Id: I631f4ca5a2bdcb8c7691a9a8c71d3de15377213b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109390
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16 09:00:25 +01:00
Noel 502f6372ae transparency->alpha in GraphicAttr
Change-Id: I1fe9311871724ff8b7b8960f5dba6e890198565c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109211
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-13 14:36:27 +01:00
Noel d765ec2295 transparency->alpha in tools::Color
this just changes the Get/Set methods, the constructor and internal
representation of Color is not changed.

Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-12 17:38:53 +01:00
Noel Grandin 88c0e46e13 custom literal for Degree10
Change-Id: Id13869138a622e62d9ffebf2c89bddccda6aff01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108238
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-24 12:00:07 +01:00
Andrea Gelmini 5cf7d31589 Fix typo
Change-Id: I1790f37a3d0a6d4921f819b27c29cc6ee59ce00c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107854
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2020-12-17 18:36:48 +01:00
Armin Le Grand (allotropia) bcb8d2d3a0 tdf#131281 Always draw FormControls when TiledRendering
When FormControls are not in layout mode it would be necessary
to have real VCL ChildWindows in the client (usually the office).
While this is done in the office itself and thus the visualization
of FormControls (and their usage) is guaranteed, this is currently
not the case for existing clients of TiledRendering.

The big solution would be an API for the TiledRendering client
to get infos for FormControls and create these locally (what would
allow to have these editable/interactive and in the style of the
client system). As long as this is not the case, I add this fallback
to render the FormControls as content to the tiles to get them
visualized at all.

Change-Id: I0f7a5e7dc028373145a6a19b639ce82bdafc149d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107735
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-12-16 13:49:21 +01:00
Philipp Hofer 4391c275df tdf#123936 Formatting files in module drawinglayer with clang-format
Change-Id: I2dd9c385c89f05026227e82ce85cecbe36e2c51c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105662
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-13 08:16:46 +01:00
Noel Grandin 242320d303 new loplugin:reducevarscope
Change-Id: Iefe922c2e0d605114d54673d63eccc5e4abd545d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102143
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-10 17:11:00 +01:00
Gabor Kelemen 433e60eb52 tdf#42949 Fix new IWYU warnings in directories d*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I8f3cd05dbd86bd22fd84d767adc44fc2b0c89404
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105468
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-09 16:04:18 +01:00
Stephan Bergmann 40fa3a61ac Extend loplugin:elidestringvar to OString
(In VisitVarDecl, filtering out AbstractConditionalOperator avoids an unhelpful

> ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:63:32: error: replace single use of literal 'rtl::OString' variable with a literal [loplugin:elidestringvar]
>             aXmlWriter.content(sPdfConformance);
>                                ^~~~~~~~~~~~~~~
> ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:52:21: note: literal 'rtl::OString' variable defined here [loplugin:elidestringvar]
>             OString sPdfConformance = (mnPDF_A == 1) ? "A" : "B";
>             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

)

Change-Id: I7d0410f04827d79b4b526752917c37d33cad2671
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104911
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-28 08:03:52 +01:00
Noel 6436302f40 convert some more long -> tools::Long
grepping for stuff in template params this time

Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28 07:21:59 +01:00
Noel 4fbd638605 switching long to a 64-bit type on 64-bit windows
(*) create a rewriting plugin to do most of the work, heavily
    based on the fakebool plugin
(*) but there are still a number of "long"s in the codebase
    that will need to be done by hand
(*) the plugin needs lots of handholding, due to needing to
    add #include and update macros

Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26 07:35:36 +01:00
Noel Grandin 0fb58a1ff1 new tools::Degree10 strong typedef
partly to flush some use of "long" out the codebase,
but also to make it obvious which units are being used
for angle values.

Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21 08:13:05 +02:00
Luboš Luňák 4deadc3c78 disentangle AA and B2D use in VCL drawing
A number of powerful functions using B2D polygons such as
OutputDevice::DrawPolyLineDirect() were used only if AA was enabled.
So e.g. dashing for an AA-ed polyline could be drawn directly
using the function, but with AA disabled had to be done manually
by a number of polygon operations. Which doesn't make much sense,
surely these powerful functions can also draw without AA if set so
(and indeed that's mostly the case). And DrawPolyLineDirect() even
had a flag to bypass the check.
So simply try to use B2D-based drawing whenever possible, AA or not.
The previous commit had already changed the naming of the AA option
to not include B2D in the name.

This seems to come from https://bz.apache.org/ooo/show_bug.cgi?id=88795,
which doesn't explain why AA only. There are other bugreports such as
https://bz.apache.org/ooo/show_bug.cgi?id=101491 and
https://bz.apache.org/ooo/show_bug.cgi?id=98289 that are related, but
there I cannot see any difference with this patch. And all unit tests
pass.

Change-Id: Ibb5938e8fff9b7452bac4bf12ed3e42fd3e5d645
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103354
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-09-29 09:54:42 +02:00
Luboš Luňák 76597aa62a rename for disentangling AA and B2D use in VCL drawing
This renames AntialiasingFlags::EnableB2dDraw to just Enable,
and the AntiAliasB2DDraw names to just AntiAlias. This is
in preparation for a second commit that will actually separate
the AA and B2D functionality of these flags.

Change-Id: I9cc215c5752dfabce41e00e19d9074fc8dc3d4de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103416
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-28 13:35:42 +02:00
Luboš Luňák 6965bb07bb forward axial and radial gradient types to VCL too
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>
2020-09-25 19:36:26 +02:00
Tomaž Vajngerl 20c09d351e use vcl lin. gradient drawing in drawinglayer + cairo impl.
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>
2020-09-25 19:35:35 +02:00
George Bateman 91230736fc tdf#124176 Use #pragma once in drawinglayer
This commit was carried out by a Python script, source of which
is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97.

Change-Id: I196a60fda0fa88ea2d9ac438d5e9234fde46fb18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102574
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-13 17:50:29 +02:00
Mike Kaganski 4e3e65087c Move the validity check before color manipulations
Change-Id: Id4a7a15b7b88df888d2cd224e375c839c59b882f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102301
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-09-09 16:09:39 +02:00
Andrea Gelmini fc78ae850e Fix typo
Change-Id: Ie584ee9bece01ea92f5cc9f21a402ae9e8319710
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102189
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-07 20:38:45 +02:00
Caolán McNamara 10a6583fa9 fix warning of OutputDevice::Push calls != OutputDevice::Pop calls
Change-Id: I8f6a3756d48b1727f9ac64c2e162be148e1c61d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102183
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-07 17:27:50 +02:00
Andrea Gelmini 0775b90892 Fix typos
Change-Id: I473956d570feac508e52a3e52cc26cc154f4dc56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101627
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2020-08-29 11:43:54 +02:00
Mike Kaganski 5bf71c698f Deduplicate some code
Change-Id: I37c492adef30db748eaa975247d386dcd953257b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100949
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-08-20 07:18:25 +02:00
Andrea Gelmini d44a5250a4 Fix typos
Change-Id: I9d55e4478d8cf3047b4ccac88e06fdc87e68e6ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100871
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2020-08-18 20:05:00 +02:00
A_GAN b6e508fc47 tdf#134052:shadow appears solid instead of blurry in presentation mode
Add shadow primitive id into the switch case to run
ProcessPrimitive2DOnPixelProcessor function.

Change-Id: I059771ba4c56eca50c74aad81c4dec193b454dca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100861
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-08-17 21:02:36 +02:00
Noel Grandin e67657d521 loplugin:simplifybool more
look for expressions like
    !(a && !b)
which can be expanded out

Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14 18:03:06 +02:00
Mike Kaganski bf021c369f tdf#135500: always use transparent and clear content vdev in impBufferDevice
This removes the only place that hadn't used transparent impBufferDevice
yet - in VclProcessor2D::RenderMaskPrimitive2DPixel. Not clearing the vdev
made it draw on whatever garbage was left there from previous paints when
the buffer was taken from maFreeBuffers in VDevBuffer::alloc, so since this
was also the only place left that didn't clear the buffer explicitly, this
makes the clear unconditional in impBufferDevice ctor.

Also this makes sure to clear proper rectangle in VDevBuffer::alloc, and to
clear mpAlphaVDev in OutputDevice::Erase.

Change-Id: I7c1c0cc510a92628f19020b3faf0c0cd81f5a599
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100674
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-08-14 01:00:04 +02:00
Stephan Bergmann ab81dc6d57 -Werror=redundant-move
...now that GCC 11 trunk implements P1155R3 since <https://gcc.gnu.org/git/
?p=gcc.git;a=commit;h=1722e2013f05f1f1f99379dbaa0c0df356da731f> "c++: Implement
C++20 implicit move changes. [PR91427]", at least in -std=c++20 mode

Change-Id: Ie3c8f391fe4a6a99144ab35b2b29214ac5413fc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99999
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-03 18:13:59 +02:00
Luboš Luňák 1db7decf3f limit bitmap size for glow/softedge effects to visible area (tdf#134237)
When zooming in the bitmap can become huge, requiring a lot
of processing, most of it not being used.

Change-Id: I0a4907f5cf23ab7316fed8568924fe76c744b81a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97872
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-07-20 12:40:17 +02:00
Noel Grandin 589134377d loplugin:constantparam
Change-Id: I54f0e2864cb4ef00fea8f9e4369a1f76721e7503
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97369
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-29 11:57:20 +02:00
Mike Kaganski 0a618246fc tdf#134134: consider color modifier stack when pixel-processing
Add initial color stack as an optional processor ctor argument,
so that it wouldn't be possibe to modify it after construction
from outside randomly (which could break the stack state).

Change-Id: I8aae4b806531fa61cc67def865297f5de1cf0755
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96684
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-19 13:06:56 +02:00
A_GAN b435c4fe82 Add process function to create the blur shadow
Create processShadowPrimitive2D function which uses the blur radius
from the shadow primitive to generate mask for the shadow bitmap.

Change-Id: Iba86bdbe1728153d866dd559a1b12eb5570ced51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95859
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-15 11:55:53 +02:00
Mike Kaganski cefad27ee8 Add TODOs
Change-Id: I6ab5840487f7676d5070ea4be00272f13dd47f96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95162
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-30 10:06:32 +02:00
Mike Kaganski 7f8f7e7284 tdf#101181: disable antialiasing for mask
Since we need objects' bounds here, antialiasing them would make the
resulting non-fully-transparent areas thicker, thus making the effect
also thicker. Disable it here; also slightly increases performance.

We can't do that for soft edge: the effect draws all its children as
bitmap, so disabling AA would make all children areas unaffected by
soft edge to have worse image quality.

Change-Id: Ifc9a60ec7894bfe9d0209e04532c9ca0a1eb3867
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95096
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-29 11:25:57 +02:00
Mike Kaganski 8c84448feb Use buffer with alpha in VclProcessor2D::RenderUnifiedTransparencePrimitive2D
This allows UnifiedTransparencePrimitive2D to produce truly transparent image,
usable later in the stack - specifically by glow and soft edge effect.

Change-Id: I27e9bfbfb9c60856bc3fad1a483623c90d5cabff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94969
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-29 06:26:16 +02:00
Mike Kaganski c9f4952b98 tdf#101181: use buffer device with alpha in glow effect
Change-Id: Iddc94a5cfdee03befdf245ee086a872f0bfaf7a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95051
Tested-by: Jenkins
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-29 06:25:48 +02:00
Mike Kaganski 9dcbf7b009 tdf#49247, tdf#101181: output glow and soft edge effects to metafile
Change-Id: Ie660ae372fc0b5f97f685b6d1e82b9e8a12e7e30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94192
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-29 06:25:23 +02:00
Mike Kaganski d5a995c029 Use buffer with alpha in VclProcessor2D::RenderTransparencePrimitive2D
This allows TransparencePrimitive2D to produce truly transparent image,
usable later in the stack - specifically by soft edge effect.

Change-Id: I54e6f9a8fd196247b1130446af3d21b082820f01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95038
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-29 06:25:05 +02:00
Mike Kaganski 425125e31f tdf#49247: Reimplement soft edges to keep object transparency
So the objects that were semi-transparent don't become opaque upon
applying soft edge effect. This requires that the objects are
actually semi-transparent, so that we can get alpha mask from bitmap

Change-Id: Ic4af9bea19e5e71139d3f065797583f7c7c78815
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95034
Tested-by: Jenkins
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-29 06:24:53 +02:00
Mike Kaganski d4bfa55209 Allow creation of virtual device with alpha as content of impBufferDevice
impBufferDevice now can create its mpContent with alpha; that is used
when painting, blending mpContent's alpha with mpMask/mpAlpha/fTrans.

That allows to paint to the buffer device and get actual transparency
of the painted objects in one pass, to process further (e.g., modify
transparency separately, or use it to get mask).

Required for subsequent soft edge effect improvement

Change-Id: If19c160581ce9a515d86222dd2fab06f746df2da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95030
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-29 06:23:57 +02:00
Mike Kaganski 2cfe93da83 tdf#49247, tdf#101181: don't rely on automatic scaling of alpha mask
Scale it back explicitly in ProcessAndBlurAlphaMask

Change-Id: I8e8a58c117d8b59db40b416edadc559b47dc300a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95021
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-29 06:23:37 +02:00