From f9fc420dceb1ece2c98767da16a21aaff771f140 Mon Sep 17 00:00:00 2001 From: Tamas Bunth Date: Tue, 21 Jan 2020 19:04:13 +0100 Subject: tdf#101181 Implement glow effect on shapes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Glow effect is a color-blurred outline outside of the shape. In ooxml document it is specified with the element. The commit contains the following: - Add support for importing and exporting from ooxml documents. - Assign new properties to XShape which stores glow-related attributes. - A new 2D primitive is introduced in module 'drawinglayer' which is responsible for representing the glow primitive which is to be rendered. + A glow primitive is a clone of the original shape which has been scaled up slightly and a new color has been assigned to it. The radius of the glow effect and the color is defined in the element being imported. - A blur algorithm is introduced in module 'vcl', which is called during rendering the primitive. + The blur algorithm works on a bitmap. + Since the algorithm is CPU-intensive, the result is cached in the processor and it is recalculated only if needed. - Add support for importing and exporting glow effect to ODF format. For that, new attributes of element has been added: + loext:glow, which can have the values "visible" or "hidden" + loext:glow-radius: which holds the radius of the glow effect in cm. + loext:glow-color: holds the color of the glow effect - Tests have been added to assert properties after pptx import and export. Change-Id: I836aeb5e0f24e2c8d5725834c8c0f98083bc82e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89125 Tested-by: Jenkins Reviewed-by: Tamás Bunth --- vcl/source/outdev/bitmap.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vcl/source/outdev') diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 0e1f3979e5ba..6e707e953ab1 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -48,6 +49,9 @@ #include #include +#include +#include + void OutputDevice::DrawBitmap( const Point& rDestPt, const Bitmap& rBitmap ) { assert(!is_double_buffered_window()); -- cgit v1.2.3