diff options
author | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-06-17 18:02:36 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-06-17 18:02:36 +0200 |
commit | 12f9037a5313240ce598b17369bf002f0f7fd9f2 (patch) | |
tree | 7828ae6c6f8bebf3a9a1f82cca8e13e6a6ec68b5 /drawinglayer/inc | |
parent | f288b50cef4d2a13cfb100af3a71f14b171d066a (diff) | |
parent | bf8660708144ccb693063a20954f64a66a1c979d (diff) |
aw083: added aw082 due to possible conflicts in vclmetafileprocessor2d.cxx
Diffstat (limited to 'drawinglayer/inc')
-rw-r--r-- | drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx | 45 | ||||
-rw-r--r-- | drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx | 14 |
2 files changed, 52 insertions, 7 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx index 0f426c6ad2ba..6c67bded2b17 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx @@ -62,11 +62,48 @@ namespace drawinglayer To get better text quality, it is suggested to handle tis primitive directly in a renderer. In that case, e.g. hintings on the system can be supported. + + @param maTextTransform + The text transformation contains the text start position (always baselined) + as translation, the FontSize as scale (where width relative to height defines + font scaling and width == height means no font scaling) and the font rotation + and shear. + When shear is used and a renderer does not support it, it may be better to use + the decomposition which will do everything correctly. Same is true for mirroring + which would be expressed as negative scalings. + + @param rText + The text to be used. Only a part may be used, but a bigger part of the string + may be necessary for correct layouting (e.g. international) + + @param aTextPosition + The index to the first character to use from rText + + @param aTextLength + The number of characters to use from rText + + @param rDXArray + The distances between the characters. This parameter may be empty, in that case + the renderer is responsible to do something useful. If it is given, it has to be of + the size aTextLength. Its values are in logical coordinates and describe the + distance for each character to use. This is independent from the font width which + is given with maTextTransform. The first value is the offset to use from the start + point in FontCoordinateSystem X-Direction (given by maTextTransform) to the start + point of the second character + + @param rFontAttribute + The font definition + + @param rLocale + The locale to use + + @param rFontColor + The font color to use */ class TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D { private: - /// text range transformation from unit range ([0.0 .. 1.0]) to text range + /// text transformation (FontCoordinateSystem) basegfx::B2DHomMatrix maTextTransform; /// The text, used from maTextPosition up to maTextPosition + maTextLength @@ -78,10 +115,10 @@ namespace drawinglayer /// The length for maText usage, starting from maTextPosition xub_StrLen maTextLength; - /// The DX array scale-independent in unit coordinates + /// The DX array in logic units ::std::vector< double > maDXArray; - /// The font to use + /// The font definition attribute::FontAttribute maFontAttribute; /// The Locale for the text @@ -90,7 +127,7 @@ namespace drawinglayer /// font color basegfx::BColor maFontColor; - /// #i96669# add simple range buffering for this primitive + /// #i96669# internal: add simple range buffering for this primitive basegfx::B2DRange maB2DRange; protected: diff --git a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx index 23d8e7edd913..93ebfeab48e7 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx @@ -54,9 +54,12 @@ namespace drawinglayer class Shadow3DExtractingProcessor : public BaseProcessor3D { private: + /// typedef for data handling + typedef std::vector< primitive2d::BasePrimitive2D* > BasePrimitive2DVector; + /// result holding vector (2D) and target vector for stacking (inited to &maPrimitive2DSequence) - primitive2d::Primitive2DSequence maPrimitive2DSequence; - primitive2d::Primitive2DSequence* mpPrimitive2DSequence; + BasePrimitive2DVector maPrimitive2DSequence; + BasePrimitive2DVector* mpPrimitive2DSequence; /// object transformation for scene for 2d definition basegfx::B2DHomMatrix maObjectTransformation; @@ -93,6 +96,10 @@ namespace drawinglayer */ virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); + /// helper to convert from BasePrimitive2DVector to primitive2d::Primitive2DSequence + const primitive2d::Primitive2DSequence getPrimitive2DSequenceFromBasePrimitive2DVector( + const BasePrimitive2DVector& rVector) const; + public: Shadow3DExtractingProcessor( const geometry::ViewInformation3D& rViewInformation, @@ -100,9 +107,10 @@ namespace drawinglayer const basegfx::B3DVector& rLightNormal, double fShadowSlant, const basegfx::B3DRange& rContained3DRange); + virtual ~Shadow3DExtractingProcessor(); /// data read access - const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; } + const primitive2d::Primitive2DSequence getPrimitive2DSequence() const; const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } const basegfx::B3DHomMatrix& getWorldToEye() const { return maWorldToEye; } const basegfx::B3DHomMatrix& getEyeToView() const { return maEyeToView; } |