28#include <osl/diagnose.h>
51 static const double fDefaultFontScale(100.0);
52 rScale.
setY(1.0 / fDefaultFontScale);
53 aFontScale.setY(fDefaultFontScale);
58 aFontScale.setY(-aFontScale.getY());
77 rScale.
setX(aFontScale.getX() / aFontScale.getY());
78 aFontScale.setX(aFontScale.getY());
93 double fRotate, fShearX;
98 && aScale.
getX() != 0.0))
125 std::vector<double> aScaledDXArray =
getDXArray();
126 const double fDXArrayScale(1.0 / aScale.
getX());
128 for (
double&
a : aScaledDXArray)
151 aScale, fShearX, fRotate, aTranslate);
169 const sal_uInt32
nCount(aB2DPolyPolyVector.size());
182 rPolyPolygon.
transform(aPolygonTransform);
190 double fRotate, fShearX;
191 aPolygonTransform.
decompose(aScale, aTranslate, fRotate, fShearX);
200 rContainer.
append(std::move(aRetval));
205 sal_Int32 nTextLength, std::vector<double>&& rDXArray, std::vector<sal_Bool>&& rKashidaArray,
208 const Color& rTextFillColor)
209 : maTextTransform(
std::move(rNewTransform))
211 , mnTextPosition(nTextPosition)
212 , mnTextLength(nTextLength)
213 , maDXArray(
std::move(rDXArray))
214 , maKashidaArray(
std::move(rKashidaArray))
215 , maFontAttribute(
std::move(aFontAttribute))
216 , maLocale(
std::move(aLocale))
217 , maFontColor(rFontColor)
219 , mnWidthToFill(nWidthToFill)
222#if OSL_DEBUG_LEVEL > 0
226 "TextSimplePortionPrimitive2D with text out of range (!)");
232 return (rA.Language == rB.Language && rA.Country == rB.Country && rA.Variant == rB.Variant);
237 if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
265 double fRotate, fShearX;
290 aScale, fShearX, fRotate, aTranslate));
293 aNewRange.
transform(aRangeTransformation);
bool decompose(B2DTuple &rScale, B2DTuple &rTranslate, double &rRotate, double &rShearX) const
void transform(const basegfx::B2DHomMatrix &rMatrix)
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
PolyPolygonColorPrimitive2D class.
void append(const Primitive2DReference &)
TextEffectPrimitive2D class.
TextLayouterDevice class.
void setFontAttribute(const attribute::FontAttribute &rFontAttribute, double fFontScaleX, double fFontScaleY, const css::lang::Locale &rLocale)
basegfx::B2DRange getTextBoundRect(const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength) const
void getTextOutlines(basegfx::B2DPolyPolygonVector &, const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength, const ::std::vector< double > &rDXArray, const ::std::vector< sal_Bool > &rKashidaArray) const
TextSimplePortionPrimitive2D class.
basegfx::B2DRange maB2DRange
#i96669# internal: add simple range buffering for this primitive
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
virtual sal_uInt32 getPrimitive2DID() const override
provide unique ID
const css::lang::Locale & getLocale() const
const ::std::vector< sal_Bool > & getKashidaArray() const
tools::Long mnWidthToFill
const basegfx::BColor & getFontColor() const
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
compare operator
const OUString & getText() const
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
local decomposition.
void getTextOutlinesAndTransformation(basegfx::B2DPolyPolygonVector &rTarget, basegfx::B2DHomMatrix &rTransformation) const
get text outlines as polygons and their according ObjectTransformation.
const ::std::vector< double > & getDXArray() const
const attribute::FontAttribute & getFontAttribute() const
Color maTextFillColor
The fill color of the text.
const basegfx::B2DHomMatrix & getTextTransform() const
data read access
#define PRIMITIVE2D_ID_TEXTSIMPLEPORTIONPRIMITIVE2D
double getLength(const B2DPolygon &rCandidate)
B2DHomMatrix createScaleShearXRotateTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fShearX, double fRadiant, double fTranslateX, double fTranslateY)
B2DTuple absolute(const B2DTuple &rTup)
::std::vector< B2DPolyPolygon > B2DPolyPolygonVector
rtl::OString decompose(rtl::OString const &type, sal_Int32 *rank=nullptr, std::vector< rtl::OString > *arguments=nullptr)
bool LocalesAreEqual(const css::lang::Locale &rA, const css::lang::Locale &rB)
small helper to have a compare operator for Locale
const ::Color maTextFillColor