diff options
author | Tamas Bunth <tamas.bunth@collabora.co.uk> | 2020-01-21 19:04:13 +0100 |
---|---|---|
committer | Tamás Bunth <btomi96@gmail.com> | 2020-03-03 15:52:47 +0100 |
commit | f9fc420dceb1ece2c98767da16a21aaff771f140 (patch) | |
tree | 299b9c856a3567ee85af11b7b314d2d02a03420b /svx/source/unodraw/unoprov.cxx | |
parent | 224ab38f747dcafe711c10b54ad53c52bda9e41d (diff) |
tdf#101181 Implement glow effect on shapes
Glow effect is a color-blurred outline outside of the shape. In ooxml
document it is specified with the <a:glow> element.
The commit contains the following:
- Add support for importing and exporting <a:glow> 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 <a:glow>
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 <style:graphic-properties> 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 <btomi96@gmail.com>
Diffstat (limited to 'svx/source/unodraw/unoprov.cxx')
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 639b8c798d39..67406c63ba40 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -68,6 +68,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxShapePropertyMap() SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES + GLOW_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -91,6 +92,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxTextShapePropertyMap() SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES_NO_SHEAR LINKTARGET_PROPERTIES + GLOW_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -115,6 +117,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxConnectorPropertyMap() SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES + GLOW_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -139,6 +142,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxDimensioningPropertyMap() SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES + GLOW_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -163,6 +167,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxCirclePropertyMap() SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES + GLOW_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -189,6 +194,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxPolyPolygonPropertyMap() SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES + GLOW_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -218,6 +224,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxGraphicObjectPropertyMap() MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES + GLOW_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES // #FontWork# @@ -368,6 +375,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxAllPropertyMap() { static SfxItemPropertyMapEntry const aAllPropertyMap_Impl[] = { + GLOW_PROPERTIES SHADOW_PROPERTIES LINE_PROPERTIES LINE_PROPERTIES_START_END @@ -430,6 +438,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxOle2PropertyMap() SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES + GLOW_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES FONTWORK_PROPERTIES @@ -681,6 +690,7 @@ static SfxItemPropertyMapEntry const * ImplGetSvxCustomShapePropertyMap() SHAPE_DESCRIPTOR_PROPERTIES MISC_OBJ_PROPERTIES LINKTARGET_PROPERTIES + GLOW_PROPERTIES SHADOW_PROPERTIES TEXT_PROPERTIES {OUString("UserDefinedAttributes"), SDRATTR_XMLATTRIBUTES, cppu::UnoType<css::container::XNameContainer>::get(), 0, 0}, @@ -759,6 +769,7 @@ static comphelper::PropertyMapEntry const * ImplGetSvxDrawingDefaultsPropertyMap { static comphelper::PropertyMapEntry const aSvxDrawingDefaultsPropertyMap_Impl[] = { + GLOW_PROPERTIES SHADOW_PROPERTIES LINE_PROPERTIES_DEFAULTS FILL_PROPERTIES_BMP |