summaryrefslogtreecommitdiff
path: root/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx')
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx37
1 files changed, 32 insertions, 5 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
index 23eb5dd1b36e..0cbd7e4628cb 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
@@ -47,28 +47,55 @@ namespace drawinglayer
{
namespace primitive2d
{
- class MetafilePrimitive2D : public BasePrimitive2D
+ /** MediaPrimitive2D class
+
+ This is the MetaFile representing primitive. It's geometry is defined
+ by MetaFileTransform. The content (defined by MetaFile) will be scaled
+ to the geometric definiton by using PrefMapMode and PrefSize of the
+ Metafile.
+
+ It has shown that this not always guarantees that all Metafile content
+ is inside the geometric definition, but this primitive defines that this
+ is the case to allow a getB2DRange implementation. If it cannot be
+ guaranteed that the Metafile is inside the geometric definition, it should
+ be embedded to a MaskPrimitive2D.
+
+ This primitive has no decomposition yet, so when not supported by a renderer,
+ it will not be visualized.
+
+ In the future, a decomposition implementation would be appreciated and would
+ have many advantages; Metafile would no longer have to be rendered by
+ sub-systems and a standard way for converting Metafiles would exist.
+ */
+ class MetafilePrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the geometry definition
basegfx::B2DHomMatrix maMetaFileTransform;
+
+ /// the content definition
GDIMetaFile maMetaFile;
+ protected:
+ /// local decomposition.
+ virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
MetafilePrimitive2D(
const basegfx::B2DHomMatrix& rMetaFileTransform,
const GDIMetaFile& rMetaFile);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTransform() const { return maMetaFileTransform; }
const GDIMetaFile& getMetaFile() const { return maMetaFile; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d