76 class NonOverlappingFillGradientPrimitive2D :
public FillGradientPrimitive2D
80 virtual void create2DDecomposition(Primitive2DContainer& rContainer,
81 const geometry::ViewInformation2D& rViewInformation)
const override;
85 NonOverlappingFillGradientPrimitive2D(
87 const attribute::FillGradientAttribute& rFillGradient)
88 : FillGradientPrimitive2D(rObjectRange, rFillGradient)
95 void NonOverlappingFillGradientPrimitive2D::create2DDecomposition(
96 Primitive2DContainer& rContainer,
97 const geometry::ViewInformation2D& )
const
99 if (!getFillGradient().isDefault())
101 createFill(rContainer,
false);
125 mbTextFillColor(false),
126 mbTextLineColor(false),
127 mbOverlineColor(false),
128 mbClipPolyPolygonActive(false)
157 if (
bool(nPushFlags))
159 OSL_ENSURE(
maPropertyHolders.size(),
"PropertyHolders: PUSH with no property holders (!)");
171 OSL_ENSURE(
maPropertyHolders.size(),
"PropertyHolders: POP with no property holders (!)");
270 OSL_ENSURE(
maPropertyHolders.size(),
"PropertyHolders: CURRENT with no property holders (!)");
344 if (rClipPolyPolygon.
count())
349 std::move(xRetval)));
379 OSL_ENSURE(
maTargetHolders.size(),
"TargetHolders: POP with no property holders (!)");
390 OSL_ENSURE(
maTargetHolders.size(),
"TargetHolders: CURRENT with no property holders (!)");
413 if(0 != rOrigin.X() || 0 != rOrigin.Y())
415 aMapping.
translate(rOrigin.X(), rOrigin.Y());
433 std::vector< basegfx::B2DPoint >&& rPositions,
438 if(rPositions.empty())
445 std::move(rPositions),
457 std::move(rPositions),
468 if(rLinePolygon.
count())
474 std::move(aLinePolygon),
485 if(rFillPolyPolygon.
count())
491 std::move(aFillPolyPolygon),
503 if(!rLinePolygon.
count())
506 const bool bDashDotUsed(LineStyle::Dash == rLineInfo.
GetStyle());
507 const bool bWidthUsed(rLineInfo.
GetWidth() > 1);
509 if(bDashDotUsed || bWidthUsed)
515 bWidthUsed ? rLineInfo.
GetWidth() : 0.0,
522 const double fAccumulated(std::accumulate(fDotDashArray.begin(), fDotDashArray.end(), 0.0));
524 std::move(fDotDashArray),
529 std::move(aLinePolygon),
530 std::move(aLineAttribute),
531 std::move(aStrokeAttribute)));
537 std::move(aLinePolygon),
577 for(sal_uInt32
a(0);
a < rPolyPolygon.
count();
a++)
621 aObjectTransform.
set(0, 0, rSize.
Width());
622 aObjectTransform.
set(1, 1, rSize.
Height());
623 aObjectTransform.
set(0, 2, rPoint.
X());
624 aObjectTransform.
set(1, 2, rPoint.
Y());
648 aSolid.
Erase(rMaskColor);
662 if(nStartIntens != 100)
665 aStart =
interpolate(aBlack, aStart,
static_cast<double>(nStartIntens) * 0.01);
672 if(nEndIntens != 100)
675 aEnd =
interpolate(aBlack, aEnd,
static_cast<double>(nEndIntens) * 0.01);
680 static_cast<double>(rGradient.
GetBorder()) * 0.01,
681 static_cast<double>(rGradient.
GetOfsX()) * 0.01,
682 static_cast<double>(rGradient.
GetOfsY()) * 0.01,
702 case HatchStyle::Double :
707 case HatchStyle::Triple :
734 const bool bNewActive(rClipPolyPolygon.
count());
782 rTargetHolders.
Pop();
784 if(!aSubContent.empty())
788 std::move(aSubContent)));
801 rTargetHolders.
Push();
826 rTargetHolders.
Pop();
828 if(!aSubContent.empty())
835 std::move(aSubContent),
836 std::make_shared<basegfx::BColorModifier_replace>(
844 std::move(aSubContent)));
856 rTargetHolders.
Push();
898 std::move(aAttribute)));
932 || (WallpaperStyle::Tile != eWallpaperStyle && WallpaperStyle::Scale != eWallpaperStyle))
967 rTarget.append(pBitmapWallpaperFill);
1009 rTextTransform.
scale(aFontScaling.
getX(), aFontScaling.
getY());
1015 aTextLayouterDevice.
setFont(rFont);
1040 const Point& rTextStartPosition,
1041 const OUString& rText,
1042 sal_uInt16 nTextStart,
1043 sal_uInt16 nTextLength,
1044 std::vector< double >&& rDXArray,
1045 std::vector< sal_Bool >&& rKashidaArray,
1066 aTextTransform.
translate(rTextStartPosition.
X(), rTextStartPosition.
Y());
1074 const bool bDecoratedIsNeeded(
1078 || FontEmphasisMark::NONE != (rFont.
GetEmphasisMark() & FontEmphasisMark::Style)
1079 || FontRelief::NONE != rFont.
GetRelief()
1083 if(bDecoratedIsNeeded)
1105 const bool bEmphasisMarkAbove(rFont.
GetEmphasisMark() & FontEmphasisMark::PosAbove);
1106 const bool bEmphasisMarkBelow(rFont.
GetEmphasisMark() & FontEmphasisMark::PosBelow);
1119 const bool bShadow(rFont.
IsShadow());
1129 std::move(rDXArray),
1130 std::move(rKashidaArray),
1158 std::vector(rDXArray),
1159 std::vector(rKashidaArray),
1160 std::move(aFontAttribute),
1170 aTextLayouterDevice.
setFont(rFont);
1173 double fTextWidth(0.0);
1175 if(rDXArray.empty())
1177 fTextWidth = aTextLayouterDevice.
getTextWidth(rText, nTextStart, nTextLength);
1181 fTextWidth = rDXArray.back();
1201 aTextTransform.
translate(rTextStartPosition.
X(), rTextStartPosition.
Y());
1205 aSequence[1] = pResult;
1247 const double fLineWidth(fabs(
static_cast<double>(rAction.
GetWidth())));
1249 if(fLineWidth <= 0.0)
1260 if(!(bUnderlineUsed || bStrikeoutUsed || bOverlineUsed))
1326 std::move(aFontAttribute),
1327 std::move(aLocale)));
1343 if(aTargets.empty())
1349 rTarget.append(std::move(aTargets));
1357 std::move(aTargets)));
1404 std::unique_ptr<emfplushelper::EmfPlusHelper> aEMFPlus;
1406 for(
size_t nAction(0); nAction <
nCount; nAction++)
1412 case MetaActionType::NONE :
1417 case MetaActionType::PIXEL :
1420 std::vector< basegfx::B2DPoint > aPositions;
1423 while(MetaActionType::PIXEL == pAction->
GetType() && nAction <
nCount)
1429 if(!aPositions.empty())
1439 aPositions.emplace_back(rPoint.
X(), rPoint.
Y());
1440 nAction++;
if(nAction <
nCount) pAction = rMetaFile.
GetAction(nAction);
1445 if(!aPositions.empty())
1452 case MetaActionType::POINT :
1457 std::vector< basegfx::B2DPoint > aPositions;
1459 while(MetaActionType::POINT == pAction->
GetType() && nAction <
nCount)
1463 aPositions.emplace_back(rPoint.
X(), rPoint.
Y());
1464 nAction++;
if(nAction <
nCount) pAction = rMetaFile.
GetAction(nAction);
1469 if(!aPositions.empty())
1477 case MetaActionType::LINE :
1485 while(MetaActionType::LINE == pAction->
GetType() && nAction <
nCount)
1493 if(aLinePolygon.
count())
1498 aLinePolygon.
append(aEnd);
1503 aLinePolygon.
clear();
1505 aLinePolygon.
append(aStart);
1506 aLinePolygon.
append(aEnd);
1512 aLinePolygon.
append(aStart);
1513 aLinePolygon.
append(aEnd);
1522 if (aLinePolygon.
count())
1528 case MetaActionType::RECT :
1550 case MetaActionType::ROUNDRECT :
1575 double fRadiusX((nHor * 2.0) / (aRange.
getWidth() > 0.0 ? aRange.
getWidth() : 1.0));
1576 double fRadiusY((nVer * 2.0) / (aRange.
getHeight() > 0.0 ? aRange.
getHeight() : 1.0));
1577 fRadiusX = std::clamp(fRadiusX, 0.0, 1.0);
1578 fRadiusY = std::clamp(fRadiusY, 0.0, 1.0);
1594 case MetaActionType::ELLIPSE :
1618 case MetaActionType::ARC :
1632 case MetaActionType::PIE :
1646 case MetaActionType::CHORD :
1660 case MetaActionType::POLYLINE :
1671 case MetaActionType::POLYGON :
1692 case MetaActionType::POLYPOLYGON :
1703 for(sal_uInt32 b(0); b < aPolyPolygonOutline.
count(); b++)
1707 if(aPolygonOutline.
count() > 1 && !aPolygonOutline.
isClosed())
1719 case MetaActionType::TEXT :
1723 sal_uInt32 nTextLength(pA->
GetLen());
1724 const sal_uInt32 nTextIndex(pA->
GetIndex());
1725 const sal_uInt32 nStringLength(pA->
GetText().getLength());
1727 if(nTextLength + nTextIndex > nStringLength)
1729 nTextLength = nStringLength - nTextIndex;
1734 std::vector< double > aDXArray{};
1740 std::move(aDXArray),
1748 case MetaActionType::TEXTARRAY :
1752 sal_uInt32 nTextLength(pA->
GetLen());
1753 const sal_uInt32 nTextIndex(pA->
GetIndex());
1754 const sal_uInt32 nStringLength(pA->
GetText().getLength());
1756 if(nTextLength + nTextIndex > nStringLength)
1758 nTextLength = nTextIndex > nStringLength ? 0 : nStringLength - nTextIndex;
1764 std::vector< double > aDXArray;
1768 if(!rDXArray.
empty())
1770 aDXArray.reserve(nTextLength);
1772 for(sal_uInt32
a(0);
a < nTextLength;
a++)
1774 aDXArray.push_back(
static_cast<double>(rDXArray[
a]));
1783 std::move(aDXArray),
1784 std::move(aKashidaArray),
1791 case MetaActionType::STRETCHTEXT :
1802 sal_uInt32 nTextLength(pA->
GetLen());
1803 const sal_uInt32 nTextIndex(pA->
GetIndex());
1804 const sal_uInt32 nStringLength(pA->
GetText().getLength());
1806 if(nTextLength + nTextIndex > nStringLength)
1808 nTextLength = nStringLength - nTextIndex;
1816 std::vector< double > aTextArray(
1822 if(!aTextArray.empty())
1824 const double fTextLength(aTextArray.back());
1826 if(0.0 != fTextLength && pA->
GetWidth())
1828 const double fRelative(pA->
GetWidth() / fTextLength);
1830 if(fabs(fRelative - 1.0) >= 0.035)
1834 for(
double &
a : aTextArray)
1847 std::move(aTextArray),
1855 case MetaActionType::TEXTRECT :
1861 const sal_uInt32 nStringLength(pA->
GetText().getLength());
1863 if(!rRectangle.
IsEmpty() && 0 != nStringLength)
1888 rTargetHolders.
Push();
1898 rPropertyHolders.
Pop();
1899 rTargetHolders.
Pop();
1902 if(!xSubContent.empty())
1908 std::move(xSubContent)));
1915 case MetaActionType::BMP :
1925 case MetaActionType::BMPSCALE :
1935 case MetaActionType::BMPSCALEPART :
1943 Bitmap aCroppedBitmap(rBitmap);
1948 aCroppedBitmap.
Crop(aCropRectangle);
1951 const BitmapEx aCroppedBitmapEx(aCroppedBitmap);
1957 case MetaActionType::BMPEX :
1967 case MetaActionType::BMPEXSCALE :
1977 case MetaActionType::BMPEXSCALEPART :
1985 BitmapEx aCroppedBitmapEx(rBitmapEx);
1990 aCroppedBitmapEx.
Crop(aCropRectangle);
1998 case MetaActionType::MASK :
2009 case MetaActionType::MASKSCALE :
2019 case MetaActionType::MASKSCALEPART :
2027 Bitmap aCroppedBitmap(rBitmap);
2032 aCroppedBitmap.
Crop(aCropRectangle);
2041 case MetaActionType::GRADIENT :
2078 new drawinglayer::primitive2d::NonOverlappingFillGradientPrimitive2D(
2087 std::move(aAttribute)));
2096 std::move(aOutline),
2097 std::move(xGradient)));
2104 case MetaActionType::HATCH :
2110 if(aOutline.
count())
2122 std::move(aAttribute)));
2126 std::move(aOutline),
2132 case MetaActionType::WALLPAPER :
2138 if(!aWallpaperRectangle.
IsEmpty())
2144 if(WallpaperStyle::NONE != eWallpaperStyle)
2180 case MetaActionType::CLIPREGION :
2203 case MetaActionType::ISECTRECTCLIPREGION :
2238 if(aOriginalPolyPolygon.
count())
2241 aOriginalPolyPolygon,
2247 if(aClippedPolyPolygon != aOriginalPolyPolygon)
2251 aClippedPolyPolygon,
2269 case MetaActionType::ISECTREGIONCLIPREGION :
2303 if(aOriginalPolyPolygon.
count())
2306 aOriginalPolyPolygon, aNewClipPolyPolygon,
true,
false);
2309 if(aClippedPolyPolygon != aOriginalPolyPolygon)
2325 case MetaActionType::MOVECLIPREGION :
2341 if(0 != nHor || 0 != nVer)
2361 case MetaActionType::LINECOLOR :
2374 case MetaActionType::FILLCOLOR :
2387 case MetaActionType::TEXTCOLOR :
2398 case MetaActionType::TEXTFILLCOLOR :
2402 const bool bWithColorArgument(pA->
IsSetting());
2404 if(bWithColorArgument)
2419 case MetaActionType::TEXTALIGN :
2437 case MetaActionType::MAPMODE :
2447 if(MapUnit::MapRelative == rMapMode.
GetMapUnit())
2449 aMapping = getTransformFromMapMode(rMapMode);
2458 aMapping.
scale(fConvert, fConvert);
2461 OSL_FAIL(
"implInterpretMetafile: MetaActionType::MAPMODE with unsupported MapUnit (!)");
2463 aMapping = getTransformFromMapMode(rMapMode) * aMapping;
2475 case MetaActionType::FONT :
2482 if(0 == aFontSize.
Height())
2489 aFontSize =
Size(0, 16);
2528 case MetaActionType::PUSH :
2536 case MetaActionType::POP :
2556 rPropertyHolders.
Pop();
2573 case MetaActionType::RASTEROP :
2583 case MetaActionType::Transparent :
2589 if(aOutline.
count())
2593 if(0 == nTransparence)
2598 else if(nTransparence >= 100)
2605 rTargetHolders.
Push();
2613 rTargetHolders.
Pop();
2615 if(!aSubContent.empty())
2619 std::move(aSubContent),
2620 nTransparence * 0.01));
2627 case MetaActionType::EPS :
2642 aObjectTransform.
set(0, 0, aRectangle.
GetWidth());
2644 aObjectTransform.
set(0, 2, aRectangle.
Left());
2645 aObjectTransform.
set(1, 2, aRectangle.
Top());
2660 case MetaActionType::REFPOINT :
2668 case MetaActionType::TEXTLINECOLOR :
2680 case MetaActionType::TEXTLINE :
2699 case MetaActionType::FLOATTRANSPARENT :
2719 rTargetHolders.
Push();
2724 rPropertyHolders.
Pop();
2725 rTargetHolders.
Pop();
2728 if(!xSubContent.empty())
2741 if(!aSourceRange.
equal(aTargetRange))
2744 aSubTransform.
scale(
2759 std::move(xSubContent)));
2774 std::move(xSubContent),
2787 std::move(aAttribute)));
2792 std::move(xSubContent),
2801 case MetaActionType::GRADIENTEX :
2809 case MetaActionType::LAYOUTMODE :
2816 case MetaActionType::TEXTLANGUAGE :
2823 case MetaActionType::OVERLINECOLOR :
2835 case MetaActionType::COMMENT :
2845 if (pA->
GetComment().equalsIgnoreAsciiCase(
"XGRAD_SEQ_BEGIN"))
2853 size_t b(nAction + 1);
2855 for(; !bDone && b <
nCount; b++)
2859 if(MetaActionType::GRADIENTEX == pAction->
GetType())
2863 else if(MetaActionType::COMMENT == pAction->
GetType())
2872 if(bDone && pMetaGradientExAction)
2880 if(aPolyPolygon.
count())
2895 std::move(aPolyPolygon),
2904 std::move(aAttribute)));
2909 else if (pA->
GetComment().equalsIgnoreAsciiCase(
"EMF_PLUS_HEADER_INFO"))
2914 SAL_INFO(
"drawinglayer.emf",
"Error: multiple EMF_PLUS_HEADER_INFO");
2918 SAL_INFO(
"drawinglayer.emf",
"EMF+ passed to canvas mtf renderer - header info, size: " << pA->
GetDataSize());
2928 else if (pA->
GetComment().equalsIgnoreAsciiCase(
"EMF_PLUS"))
2933 SAL_INFO(
"drawinglayer.emf",
"Error: EMF_PLUS before EMF_PLUS_HEADER_INFO");
2937 static int count = -1, limit = 0x7fffffff;
2943 if (
char *
env = getenv(
"EMF_PLUS_LIMIT"))
2946 SAL_INFO(
"drawinglayer.emf",
"EMF+ records limit: " << limit);
2950 SAL_INFO(
"drawinglayer.emf",
"EMF+ passed to canvas mtf renderer, size: " << pA->
GetDataSize());
2956 aEMFPlus->processEmfPlusData(
2969 OSL_FAIL(
"Unknown MetaFile Action (!)");
2996 while (aTargetHolders.
size() > 1)
3000 aTargetHolders.
Pop();
constexpr o3tl::Length MapToO3tlLength(MapUnit eU, o3tl::Length ePixelValue=o3tl::Length::px)
bool Crop(const tools::Rectangle &rRectPixel)
bool Crop(const tools::Rectangle &rRectPixel)
Bitmap CreateMask(const Color &rTransColor) const
Size GetSizePixel() const
bool Erase(const Color &rFillColor)
basegfx::BColor getBColor() const
bool IsTransparent() const
sal_uInt16 GetStartIntensity() const
Degree10 GetAngle() const
sal_uInt16 GetEndIntensity() const
sal_uInt16 GetOfsX() const
sal_uInt16 GetBorder() const
const Color & GetEndColor() const
sal_uInt16 GetOfsY() const
const Color & GetStartColor() const
css::awt::GradientStyle GetStyle() const
sal_uInt16 GetSteps() const
Degree10 GetAngle() const
HatchStyle GetStyle() const
tools::Long GetDistance() const
const Color & GetColor() const
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
LineStyle GetStyle() const
basegfx::B2DLineJoin GetLineJoin() const
std::vector< double > GetDotDashArray() const
css::drawing::LineCap GetLineCap() const
const Fraction & GetScaleX() const
MapUnit GetMapUnit() const
const Point & GetOrigin() const
const Fraction & GetScaleY() const
sal_uInt32 GetWidth() const
sal_Int32 GetIndex() const
const OUString & GetText() const
const Point & GetPoint() const
const Point & GetPoint() const
const OUString & GetText() const
sal_Int32 GetIndex() const
TextAlign GetTextAlign() const
sal_Int32 GetIndex() const
const KernArray & GetDXArray() const
const OUString & GetText() const
const Point & GetPoint() const
const std::vector< sal_Bool > & GetKashidaArray() const
const Color & GetColor() const
const Color & GetColor() const
LanguageType GetTextLanguage() const
const Point & GetStartPoint() const
tools::Long GetWidth() const
FontLineStyle GetUnderline() const
FontLineStyle GetOverline() const
FontStrikeout GetStrikeout() const
const Color & GetColor() const
DrawTextFlags GetStyle() const
const tools::Rectangle & GetRect() const
const OUString & GetText() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const BitmapEx & GetBitmap() const
const Color & GetColor() const
WallpaperStyle GetStyle() const
Gradient GetGradient() const
const tools::Rectangle & GetRect() const
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
void rotate(double fRadiant)
void translate(double fX, double fY)
void scale(double fX, double fY)
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
void setB2DPolygon(sal_uInt32 nIndex, const B2DPolygon &rPolygon)
void transform(const basegfx::B2DHomMatrix &rMatrix)
B2DRange getB2DRange() const
basegfx::B2DPoint const & getB2DPoint(sal_uInt32 nIndex) const
void transform(const basegfx::B2DHomMatrix &rMatrix)
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
void setClosed(bool bNew)
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
B2DPoint getCenter() const
bool isSingleColor(BColor &rSingleColor) const
bool equal(const Range2D &rRange) const
const basegfx::BColorStops & getColorStops() const
DiscreteBitmapPrimitive2D class.
FillGradientPrimitive2D class.
FillHatchPrimitive2D class.
ModifiedColorPrimitive2D class.
PointArrayPrimitive2D class.
PolyPolygonColorPrimitive2D class.
PolyPolygonColorPrimitive2D class.
PolygonHairlinePrimitive2D class.
PolygonStrokePrimitive2D class.
void append(const Primitive2DReference &)
TextDecoratedPortionPrimitive2D class.
TextLayouterDevice class.
void addTextRectActions(const tools::Rectangle &rRectangle, const OUString &rText, DrawTextFlags nStyle, GDIMetaFile &rGDIMetaFile) const
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
void setFont(const vcl::Font &rFont)
tooling methods
double getFontDescent() const
::std::vector< double > getTextArray(const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength, bool bCaret=false) const
double getFontAscent() const
TextSimplePortionPrimitive2D class.
TransparencePrimitive2D class.
UnifiedTransparencePrimitive2D class.
WallpaperBitmapPrimitive2D class.
void SetFontSize(const Size &)
FontStrikeout GetStrikeout() const
FontLineStyle GetOverline() const
FontRelief GetRelief() const
FontEmphasisMark GetEmphasisMark() const
TextAlign GetAlignment() const
const Size & GetFontSize() const
LanguageType GetLanguage() const
const Color & GetColor() const
void SetAlignment(TextAlign)
FontLineStyle GetUnderline() const
LanguageType GetCJKContextLanguage() const
bool IsWordLineMode() const
Degree10 GetOrientation() const
const Color & GetFillColor() const
basegfx::B2DPolyPolygon GetAsB2DPolyPolygon() const
helper class for graphic context
void setLayoutMode(vcl::text::ComplexTextLayoutFlags nNew)
void setFont(const vcl::Font &rFont)
bool isRasterOpInvert() const
const basegfx::B2DHomMatrix & getTransformation() const
read/write accesses
const basegfx::B2DPolyPolygon & getClipPolyPolygon() const
void setClipPolyPolygon(const basegfx::B2DPolyPolygon &rNew)
void setClipPolyPolygonActive(bool bNew)
void setLineColorActive(bool bNew)
void setTransformation(const basegfx::B2DHomMatrix &rNew)
const basegfx::BColor & getLineColor() const
MapUnit getMapUnit() const
void setFillColorActive(bool bNew)
vcl::text::ComplexTextLayoutFlags getLayoutMode() const
void setMapUnit(MapUnit eNew)
const basegfx::BColor & getFillColor() const
void setFillColor(const basegfx::BColor &rNew)
void setOverlineColorActive(bool bNew)
bool isRasterOpActive() const
bool getLineColorActive() const
void setOverlineColor(const basegfx::BColor &rNew)
vcl::PushFlags getPushFlags() const
void setTextFillColorActive(bool bNew)
bool getFillColorActive() const
const basegfx::BColor & getTextLineColor() const
LanguageType getLanguageType() const
void setRasterOp(const RasterOp &rRasterOp)
void setLineColor(const basegfx::BColor &rNew)
bool getLineOrFillActive() const
bool getTextColorActive() const
const basegfx::BColor & getTextColor() const
const basegfx::BColor & getOverlineColor() const
void setTextLineColorActive(bool bNew)
bool isRasterOpForceBlack() const
void setTextLineColor(const basegfx::BColor &rNew)
const RasterOp & getRasterOp() const
void setTextColor(const basegfx::BColor &rNew)
bool getClipPolyPolygonActive() const
bool getOverlineColorActive() const
PropertyHolder()
helper class for graphic context
const basegfx::BColor & getTextFillColor() const
const vcl::Font & getFont() const
void setTextFillColor(const basegfx::BColor &rNew)
bool getTextLineColorActive() const
void setTextColorActive(bool bNew)
void setPushFlags(vcl::PushFlags nNew)
void setLanguageType(LanguageType aNew)
bool getTextFillColorActive() const
void Push(vcl::PushFlags nPushFlags)
std::vector< PropertyHolder * > maPropertyHolders
PropertyHolders()
stack for properties
PropertyHolder & Current()
Helper class to buffer and hold a Primitive target vector.
void append(const rtl::Reference< drawinglayer::primitive2d::BasePrimitive2D > &pCandidate)
TargetHolder()
Helper class to buffer and hold a Primitive target vector.
drawinglayer::primitive2d::Primitive2DContainer getPrimitive2DSequence(const PropertyHolder &rPropertyHolder)
drawinglayer::primitive2d::Primitive2DContainer aTargets
Helper class which builds a stack on the TargetHolder class.
TargetHolders()
Helper class which builds a stack on the TargetHolder class.
std::vector< TargetHolder * > maTargetHolders
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define LANGUAGE_JAPANESE
#define SAL_INFO(area, stream)
const css::uno::Reference< css::xml::crypto::XSecurityEnvironment > & env
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
B2DPolyPolygon clipPolyPolygonOnRange(const B2DPolyPolygon &rCandidate, const B2DRange &rRange, bool bInside, bool bStroke)
B2DPolyPolygon clipPolyPolygonOnPolyPolygon(const B2DPolyPolygon &rCandidate, const B2DPolyPolygon &rClip, bool bInside, bool bStroke, size_t *pPointLimit)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
B2DPolygon createPolygonFromEllipse(const B2DPoint &rCenter, double fRadiusX, double fRadiusY, sal_uInt32 nStartQuadrant=0)
rtl::Reference< BasePrimitive2D > Primitive2DReference
TextRelief
TextRelief definition.
TextLine mapFontLineStyleToTextLine(FontLineStyle eLineStyle)
helper to convert LineStyle
TextStrikeout mapFontStrikeoutToTextStrikeout(FontStrikeout eFontStrikeout)
TextEmphasisMark
TextEmphasisMark definition.
@ TEXT_FONT_EMPHASIS_MARK_DISC
@ TEXT_FONT_EMPHASIS_MARK_CIRCLE
@ TEXT_FONT_EMPHASIS_MARK_ACCENT
@ TEXT_FONT_EMPHASIS_MARK_NONE
@ TEXT_FONT_EMPHASIS_MARK_DOT
TextLine
TextLine definition.
TextStrikeout
FontStrikeout definition.
attribute::FontAttribute getFontAttributeFromVclFont(basegfx::B2DVector &o_rSize, const vcl::Font &rFont, bool bRTL, bool bBiDiStrong)
Generate FontAttribute DataSet derived from the given VCL-Font.
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
HSLColor interpolate(const HSLColor &rFrom, const HSLColor &rTo, double t, bool bCCW)
drawinglayer::primitive2d::Primitive2DContainer interpretMetafile(const GDIMetaFile &rMetaFile, const drawinglayer::geometry::ViewInformation2D &rViewInformation)
static void createFontAttributeTransformAndAlignment(drawinglayer::attribute::FontAttribute &rFontAttribute, basegfx::B2DHomMatrix &rTextTransform, basegfx::B2DVector &rAlignmentOffset, PropertyHolder const &rProperty)
static void createFillPrimitive(const basegfx::B2DPolyPolygon &rFillPolyPolygon, TargetHolder &rTarget, PropertyHolder const &rProperties)
helper to create a PolyPolygonColorPrimitive2D based on current context
static drawinglayer::attribute::FillGradientAttribute createFillGradientAttribute(const Gradient &rGradient)
helper to convert from a VCL Gradient definition to the corresponding data for primitive representati...
static void processMetaTextAction(const Point &rTextStartPosition, const OUString &rText, sal_uInt16 nTextStart, sal_uInt16 nTextLength, std::vector< double > &&rDXArray, std::vector< sal_Bool > &&rKashidaArray, TargetHolder &rTarget, PropertyHolder const &rProperty)
helper which takes complete care for creating the needed text primitives.
static rtl::Reference< drawinglayer::primitive2d::BasePrimitive2D > CreateGradientWallpaper(const basegfx::B2DRange &rRange, const Gradient &rGradient, PropertyHolder const &rPropertyHolder)
helper to create needed data to emulate the VCL Wallpaper Metafile action.
static void createHairlinePrimitive(const basegfx::B2DPolygon &rLinePolygon, TargetHolder &rTarget, PropertyHolder const &rProperties)
helper to create a PolygonHairlinePrimitive2D based on current context
static void createPointArrayPrimitive(std::vector< basegfx::B2DPoint > &&rPositions, TargetHolder &rTarget, PropertyHolder const &rProperties, const basegfx::BColor &rBColor)
helper to create a PointArrayPrimitive2D based on current context
static void createLinePrimitive(const basegfx::B2DPolygon &rLinePolygon, const LineInfo &rLineInfo, TargetHolder &rTarget, PropertyHolder const &rProperties)
helper to create a PolygonStrokePrimitive2D based on current context
static BitmapEx createMaskBmpEx(const Bitmap &rBitmap, const Color &rMaskColor)
helper to create a regular BotmapEx from a MaskAction (definitions which use a bitmap without transpa...
static void createHairlineAndFillPrimitive(const basegfx::B2DPolygon &rPolygon, TargetHolder &rTarget, PropertyHolder const &rProperties)
helper to create needed line and fill primitives based on current context
static void createBitmapExPrimitive(const BitmapEx &rBitmapEx, const Point &rPoint, TargetHolder &rTarget, PropertyHolder const &rProperties)
helper to create DiscreteBitmapPrimitive2D based on current context.
static void HandleNewRasterOp(RasterOp aRasterOp, TargetHolders &rTargetHolders, PropertyHolders &rPropertyHolders)
helper to handle the change of RasterOp.
static rtl::Reference< drawinglayer::primitive2d::BasePrimitive2D > CreateColorWallpaper(const basegfx::B2DRange &rRange, const basegfx::BColor &rColor, PropertyHolder const &rPropertyHolder)
helper to create needed data to emulate the VCL Wallpaper Metafile action.
static void processMetaTextLineAction(const MetaTextLineAction &rAction, TargetHolder &rTarget, PropertyHolder const &rProperty)
helper which takes complete care for creating the needed textLine primitives
static void implInterpretMetafile(const GDIMetaFile &rMetaFile, TargetHolders &rTargetHolders, PropertyHolders &rPropertyHolders, const drawinglayer::geometry::ViewInformation2D &rViewInformation)
This is the main interpreter method.
static void CreateAndAppendBitmapWallpaper(basegfx::B2DRange aWallpaperRange, const Wallpaper &rWallpaper, TargetHolder &rTarget, PropertyHolder const &rProperty)
helper to create needed data to emulate the VCL Wallpaper Metafile action.
void HandleNewClipRegion(const basegfx::B2DPolyPolygon &rClipPolyPolygon, TargetHolders &rTargetHolders, PropertyHolders &rPropertyHolders)
helper to take needed action on ClipRegion change.
static drawinglayer::attribute::FillHatchAttribute createFillHatchAttribute(const Hatch &rHatch)
helper to convert from a VCL Hatch definition to the corresponding data for primitive representation
static bool isUnderlineAbove(const vcl::Font &rFont)
helper to decide UnderlineAbove for text primitives