35 const OUString& rText,
36 sal_Int32 nTextPosition,
37 sal_Int32 nTextLength,
38 const std::vector< double >& rDXArray,
39 const std::vector< sal_Bool >& rKashidaArray,
49 std::vector(rDXArray),
50 std::vector(rKashidaArray),
60 if(!(bUnderlineUsed || bStrikeoutUsed || bOverlineUsed))
75 double fTextWidth(0.0);
79 fTextWidth = aTextLayouter.
getTextWidth(rText, nTextPosition, nTextLength);
83 fTextWidth = rDXArray.back() * rDecTrans.
getScale().
getX();
90 fTextWidth /= fFontScaleX;
166 rContainer.
append(std::move(aBroken));
204 if(
bHasShadow || bHasTextRelief || bHasOutline)
214 static const double fFactor(1.0 / 24.0);
215 const double fTextShadowOffset(aDecTrans.
getScale().
getY() * fFactor);
220 fTextShadowOffset, fTextShadowOffset));
235 const bool bDefaultTextColor(aBBlack ==
getFontColor());
238 if(bDefaultTextColor)
265 aTextEffectStyle2D));
284 aRetval.insert(aRetval.begin(), aShadow);
289 rContainer.
append(std::move(aRetval));
295 const OUString& rText,
296 sal_Int32 nTextPosition,
297 sal_Int32 nTextLength,
298 std::vector< double >&& rDXArray,
299 std::vector< sal_Bool >&& rKashidaArray,
301 const css::lang::Locale& rLocale,
303 const Color& rFillColor,
310 bool bUnderlineAbove,
314 bool bEmphasisMarkAbove,
315 bool bEmphasisMarkBelow,
318 :
TextSimplePortionPrimitive2D(rNewTransform, rText, nTextPosition, nTextLength,
std::move(rDXArray),
std::move(rKashidaArray), rFontAttribute, rLocale, rFontColor, false, 0, rFillColor),
319 maOverlineColor(rOverlineColor),
320 maTextlineColor(rTextlineColor),
321 meFontOverline(eFontOverline),
322 meFontUnderline(eFontUnderline),
323 meTextStrikeout(eTextStrikeout),
324 meTextEmphasisMark(eTextEmphasisMark),
325 meTextRelief(eTextRelief),
326 mbUnderlineAbove(bUnderlineAbove),
327 mbWordLineMode(bWordLineMode),
328 mbEmphasisMarkAbove(bEmphasisMarkAbove),
329 mbEmphasisMarkBelow(bEmphasisMarkBelow),
336 if(TextSimplePortionPrimitive2D::operator==(rPrimitive))
const B2DVector & getScale() const
const B2DVector & getTranslate() const
const B2DHomMatrix & getB2DHomMatrix() const
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D &rViewInformation) const
The default implementation will use getDecomposition results to create the range.
void append(const Primitive2DReference &)
Primitive2DContainer extractResult(BreakupUnit aBreakupUnit=BreakupUnit::Character)
get result
TextDecoratedPortionPrimitive2D class.
TextLine getFontOverline() const
data read access
bool getEmphasisMarkBelow() const
TextEmphasisMark getTextEmphasisMark() const
virtual sal_uInt32 getPrimitive2DID() const override
provide unique ID
const basegfx::BColor & getTextlineColor() const
TextRelief getTextRelief() const
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
compare operator
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D &rViewInformation) const override
get range
TextStrikeout getTextStrikeout() const
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
local decomposition.
void impCreateGeometryContent(Primitive2DContainer &rTarget, basegfx::utils::B2DHomMatrixBufferedOnDemandDecompose const &rDecTrans, const OUString &rText, sal_Int32 nTextPosition, sal_Int32 nTextLength, const ::std::vector< double > &rDXArray, const ::std::vector< sal_Bool > &rKashidaArray, const attribute::FontAttribute &rFontAttribute) const
helper methods
TextDecoratedPortionPrimitive2D(const basegfx::B2DHomMatrix &rNewTransform, const OUString &rText, sal_Int32 nTextPosition, sal_Int32 nTextLength, std::vector< double > &&rDXArray, std::vector< sal_Bool > &&rKashidaArray, const attribute::FontAttribute &rFontAttribute, const css::lang::Locale &rLocale, const basegfx::BColor &rFontColor, const Color &rFillColor, const basegfx::BColor &rOverlineColor, const basegfx::BColor &rTextlineColor, TextLine eFontOverline=TEXT_LINE_NONE, TextLine eFontUnderline=TEXT_LINE_NONE, bool bUnderlineAbove=false, TextStrikeout eTextStrikeout=TEXT_STRIKEOUT_NONE, bool bWordLineMode=false, TextEmphasisMark eTextEmphasisMark=TEXT_FONT_EMPHASIS_MARK_NONE, bool bEmphasisMarkAbove=true, bool bEmphasisMarkBelow=false, TextRelief eTextRelief=TEXT_RELIEF_NONE, bool bShadow=false)
constructor
TextLine getFontUnderline() const
const basegfx::BColor & getOverlineColor() const
bool getUnderlineAbove() const
bool getEmphasisMarkAbove() const
bool getWordLineMode() const
TextEffectPrimitive2D class.
TextLayouterDevice class.
void setFontAttribute(const attribute::FontAttribute &rFontAttribute, double fFontScaleX, double fFontScaleY, const css::lang::Locale &rLocale)
double getOverlineHeight() const
double getTextWidth(const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength) const
double getUnderlineHeight() const
double getOverlineOffset() const
double getStrikeoutOffset() const
double getUnderlineOffset() const
TextSimplePortionPrimitive2D class.
sal_Int32 getTextLength() const
TextSimplePortionPrimitive2D(basegfx::B2DHomMatrix aNewTransform, OUString aText, sal_Int32 nTextPosition, sal_Int32 nTextLength, std::vector< double > &&rDXArray, std::vector< sal_Bool > &&rKashidaArray, attribute::FontAttribute aFontAttribute, css::lang::Locale aLocale, const basegfx::BColor &rFontColor, bool bFilled=false, tools::Long nWidthToFill=0, const Color &rTextFillColor=COL_TRANSPARENT)
constructor
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D &rViewInformation) const override
get range
sal_Int32 getTextPosition() const
const css::lang::Locale & getLocale() const
const ::std::vector< sal_Bool > & getKashidaArray() const
const basegfx::BColor & getFontColor() const
const OUString & getText() const
const ::std::vector< double > & getDXArray() const
const attribute::FontAttribute & getFontAttribute() const
const basegfx::B2DHomMatrix & getTextTransform() const
data read access
#define PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
rtl::Reference< BasePrimitive2D > Primitive2DReference
TextEffectStyle2D
TextEffectStyle2D definition.
TextRelief
TextRelief definition.
TextEmphasisMark
TextEmphasisMark definition.
@ TEXT_FONT_EMPHASIS_MARK_NONE
TextStrikeout
FontStrikeout definition.