diff options
author | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2009-10-22 17:29:01 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2009-10-22 17:29:01 +0200 |
commit | afc5047960fa639a4ab215abddecd8747532c2e0 (patch) | |
tree | 65d342d901e6f510a6a35d41f861523029004d05 /drawinglayer/inc/drawinglayer/primitive2d | |
parent | ece6eb1ab43ca851cb4c9e4cda848ecdcda9d0b0 (diff) | |
parent | c18e25b533b12d73ae8bc58564f9eda45c26e3b1 (diff) |
commit after rebase to DEV300m62
Diffstat (limited to 'drawinglayer/inc/drawinglayer/primitive2d')
-rw-r--r-- | drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx | 42 | ||||
-rw-r--r-- | drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx | 8 |
2 files changed, 23 insertions, 27 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx index b9639aeacc50..df09718a7582 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -76,8 +76,11 @@ namespace drawinglayer ~TextLayouterDevice(); void setFont(const Font& rFont); - void setFontAttributes(const FontAttributes& rFontAttributes, const basegfx::B2DHomMatrix& rTransform, const ::com::sun::star::lang::Locale & rLocale); - void setFontAttributes(const FontAttributes& rFontAttributes, double fFontScaleX, double fFontScaleY, const ::com::sun::star::lang::Locale & rLocale); + void setFontAttributes( + const FontAttributes& rFontAttributes, + double fFontScaleX, + double fFontScaleY, + const ::com::sun::star::lang::Locale & rLocale); double getTextHeight() const; double getOverlineHeight() const; @@ -85,9 +88,6 @@ namespace drawinglayer double getUnderlineHeight() const; double getUnderlineOffset() const; double getStrikeoutOffset() const; -#ifdef WIN32 - double getCurrentFontRelation() const; -#endif double getTextWidth( const String& rText, @@ -99,9 +99,7 @@ namespace drawinglayer const String& rText, xub_StrLen nIndex, xub_StrLen nLength, - // #i89784# added suppirt for DXArray for justified text - const ::std::vector< double >& rDXArray, - double fFontScaleWidth); + const ::std::vector< double >& rDXArray); basegfx::B2DRange getTextBoundRect( const String& rText, @@ -112,27 +110,33 @@ namespace drawinglayer } // end of namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// +// helper methods for vcl font handling namespace drawinglayer { namespace primitive2d { - // helper methods for vcl font handling + // Create a VCL-Font based on the definitions in FontAttributes + // and the given FontScaling. The FontScaling defines the FontHeight + // (fFontScaleY) and the FontWidth (fFontScaleX). The combination of + // both defines FontStretching, where no stretching happens at + // fFontScaleY == fFontScaleX Font getVclFontFromFontAttributes( const FontAttributes& rFontAttributes, double fFontScaleX, double fFontScaleY, double fFontRotation, - const ::com::sun::star::lang::Locale & rLocale, - const OutputDevice& rOutDev); - - Font getVclFontFromFontAttributes( - const FontAttributes& rFontAttributes, - const basegfx::B2DHomMatrix& rTransform, - const ::com::sun::star::lang::Locale & rLocale, - const OutputDevice& rOutDev); - - FontAttributes getFontAttributesFromVclFont(basegfx::B2DVector& rSize, const Font& rFont, bool bRTL, bool bBiDiStrong); + const ::com::sun::star::lang::Locale & rLocale); + + // Generate FontAttributes DataSet derived from the given VCL-Font. + // The FontScaling with fFontScaleY, fFontScaleX relationship (see + // above) will be set in return parameter o_rSize to allow further + // processing + FontAttributes getFontAttributesFromVclFont( + basegfx::B2DVector& o_rSize, + const Font& rFont, + bool bRTL, + bool bBiDiStrong); } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx index 14b44f80dbfe..25b11d7cbf29 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx @@ -158,14 +158,6 @@ namespace drawinglayer // the necessary VCL outline extractins, scaling adaptions and other stuff. void getTextOutlinesAndTransformation(basegfx::B2DPolyPolygonVector& rTarget, basegfx::B2DHomMatrix& rTransformation) const; - // adapts fontScale for usage with TextLayouter. Input is rScale which is the extracted - // scale from a text transformation. A copy goes to rFontScale and is modified so that - // it contains only positive scalings and XY-equal scalings to allow to get a non-X-scaled - // Vcl-Font for TextLayouter. rScale is adapted accordingly to contain the corrected scale - // which would need to be applied to e.g. outlines received from TextLayouter under - // usage of fontScale. This includes Y-Scale, X-Scale-correction and mirrorings. - void getCorrectedScaleAndFontScale(basegfx::B2DVector& rScale, basegfx::B2DVector& rFontScale) const; - // get data const basegfx::B2DHomMatrix& getTextTransform() const { return maTextTransform; } const String& getText() const { return maText; } |