summaryrefslogtreecommitdiff
path: root/svx/inc
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de (CIB)>2018-02-23 16:57:41 +0100
committerArmin Le Grand <Armin.Le.Grand@cib.de (CIB)>2018-03-17 23:15:49 +0100
commitd1027af3c74529827d53e8cf7b0d42a0ee47d1ba (patch)
tree488efdfb60e5e9bd01af54679872a8b91b0e14c4 /svx/inc
parent9886a69c472f212d88f11cfa0f3835e5dcf485b2 (diff)
OperationSmiley: Added support for using same FillGeometry
It is now possible to use a single FillGeometry to fill objects that are made of multiple filled objects (e.g. CustomShapes) so that they look as using a single fill. This is used for CustomShapes, but may later be 'extended' to be used for more cases. The basic functionality was already in the primitives, but had to be added to SDrObject due to these being used for CustomShapeVisualization (currently - would be better to change this to primitives, too). Change-Id: I1d9fb158191a9ec663e46f3911213be2f3d88986
Diffstat (limited to 'svx/inc')
-rw-r--r--svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
index b60e9b3df565..e165344b26c1 100644
--- a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
@@ -40,20 +40,36 @@ namespace drawinglayer
attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute;
basegfx::B2DPolyPolygon maUnitPolyPolygon;
+ // OperationSmiley: Added to be able to define a FillGeometry different from local
+ // geometry. It is ignored when empty and/or equal to UnitPolyPolygon.
+ // If used and there is a fill, object's geomery (maUnitPolyPolygon) will be filled,
+ // but UnitDefinitionPolyPolygon will be used to define the FillStyle. Thus when
+ // using the 'same' UnitDefinitionPolyPolygon for multiple definitions,
+ // all filled stuff using it will fit seamless together.
+ // 'same' is in quotes since it is a UnitPolygon, so being relative to the
+ // unit polygon of the local geometry (UnitPolyPolygon). The definition is complete
+ // when applying the also given transfomation (maTransform)
+ basegfx::B2DPolyPolygon maUnitDefinitionPolyPolygon;
+
protected:
// local decomposition.
virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override;
public:
+ // OperationSmiley: Extended to UnitDefinitionPolyPolygon, but when needed
+ // a 2nd version without can be defined that just does not set the
+ // maUnitDefinitionPolyPolygon or set equal to UnitPolyPolygon
SdrPathPrimitive2D(
const basegfx::B2DHomMatrix& rTransform,
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute,
- const basegfx::B2DPolyPolygon& rUnitPolyPolygon);
+ const basegfx::B2DPolyPolygon& rUnitPolyPolygon,
+ const basegfx::B2DPolyPolygon& rUnitDefinitionPolyPolygon);
// data access
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; }
const basegfx::B2DPolyPolygon& getUnitPolyPolygon() const { return maUnitPolyPolygon; }
+ const basegfx::B2DPolyPolygon& getUnitDefinitionPolyPolygon() const { return maUnitDefinitionPolyPolygon; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;