LibreOffice Module drawinglayer (master) 1
Classes | Functions
wmfemfhelper Namespace Reference

Classes

class  PropertyHolder
 helper class for graphic context More...
 
class  PropertyHolders
 stack for properties More...
 
class  TargetHolder
 Helper class to buffer and hold a Primitive target vector. More...
 
class  TargetHolders
 Helper class which builds a stack on the TargetHolder class. More...
 

Functions

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 More...
 
static void createHairlinePrimitive (const basegfx::B2DPolygon &rLinePolygon, TargetHolder &rTarget, PropertyHolder const &rProperties)
 helper to create a PolygonHairlinePrimitive2D based on current context More...
 
static void createFillPrimitive (const basegfx::B2DPolyPolygon &rFillPolyPolygon, TargetHolder &rTarget, PropertyHolder const &rProperties)
 helper to create a PolyPolygonColorPrimitive2D based on current context More...
 
static void createLinePrimitive (const basegfx::B2DPolygon &rLinePolygon, const LineInfo &rLineInfo, TargetHolder &rTarget, PropertyHolder const &rProperties)
 helper to create a PolygonStrokePrimitive2D based on current context More...
 
static void createHairlineAndFillPrimitive (const basegfx::B2DPolygon &rPolygon, TargetHolder &rTarget, PropertyHolder const &rProperties)
 helper to create needed line and fill primitives based on current context More...
 
static void createHairlineAndFillPrimitive (const basegfx::B2DPolyPolygon &rPolyPolygon, TargetHolder &rTarget, PropertyHolder const &rProperties)
 helper to create needed line and fill primitives based on current context More...
 
static void createBitmapExPrimitive (const BitmapEx &rBitmapEx, const Point &rPoint, TargetHolder &rTarget, PropertyHolder const &rProperties)
 helper to create DiscreteBitmapPrimitive2D based on current context. More...
 
static void createBitmapExPrimitive (const BitmapEx &rBitmapEx, const Point &rPoint, const Size &rSize, TargetHolder &rTarget, PropertyHolder const &rProperties)
 helper to create BitmapPrimitive2D based on current context More...
 
static BitmapEx createMaskBmpEx (const Bitmap &rBitmap, const Color &rMaskColor)
 helper to create a regular BotmapEx from a MaskAction (definitions which use a bitmap without transparence but define one of the colors as transparent) More...
 
static drawinglayer::attribute::FillGradientAttribute createFillGradientAttribute (const Gradient &rGradient)
 helper to convert from a VCL Gradient definition to the corresponding data for primitive representation More...
 
static drawinglayer::attribute::FillHatchAttribute createFillHatchAttribute (const Hatch &rHatch)
 helper to convert from a VCL Hatch definition to the corresponding data for primitive representation More...
 
void HandleNewClipRegion (const basegfx::B2DPolyPolygon &rClipPolyPolygon, TargetHolders &rTargetHolders, PropertyHolders &rPropertyHolders)
 helper to take needed action on ClipRegion change. More...
 
static void HandleNewRasterOp (RasterOp aRasterOp, TargetHolders &rTargetHolders, PropertyHolders &rPropertyHolders)
 helper to handle the change of RasterOp. More...
 
static rtl::Reference< drawinglayer::primitive2d::BasePrimitive2DCreateColorWallpaper (const basegfx::B2DRange &rRange, const basegfx::BColor &rColor, PropertyHolder const &rPropertyHolder)
 helper to create needed data to emulate the VCL Wallpaper Metafile action. More...
 
static rtl::Reference< drawinglayer::primitive2d::BasePrimitive2DCreateGradientWallpaper (const basegfx::B2DRange &rRange, const Gradient &rGradient, PropertyHolder const &rPropertyHolder)
 helper to create needed data to emulate the VCL Wallpaper Metafile action. More...
 
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. More...
 
static bool isUnderlineAbove (const vcl::Font &rFont)
 helper to decide UnderlineAbove for text primitives More...
 
static void createFontAttributeTransformAndAlignment (drawinglayer::attribute::FontAttribute &rFontAttribute, basegfx::B2DHomMatrix &rTextTransform, basegfx::B2DVector &rAlignmentOffset, PropertyHolder const &rProperty)
 
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. More...
 
static void processMetaTextLineAction (const MetaTextLineAction &rAction, TargetHolder &rTarget, PropertyHolder const &rProperty)
 helper which takes complete care for creating the needed textLine primitives More...
 
static void implInterpretMetafile (const GDIMetaFile &rMetaFile, TargetHolders &rTargetHolders, PropertyHolders &rPropertyHolders, const drawinglayer::geometry::ViewInformation2D &rViewInformation)
 This is the main interpreter method. More...
 
drawinglayer::primitive2d::Primitive2DContainer interpretMetafile (const GDIMetaFile &rMetaFile, const drawinglayer::geometry::ViewInformation2D &rViewInformation)
 

Function Documentation

◆ CreateAndAppendBitmapWallpaper()

static void wmfemfhelper::CreateAndAppendBitmapWallpaper ( basegfx::B2DRange  aWallpaperRange,
const Wallpaper rWallpaper,
TargetHolder rTarget,
PropertyHolder const &  rProperty 
)
static

helper to create needed data to emulate the VCL Wallpaper Metafile action.

It is a quite mighty action. This helper decides if color and/or gradient background is needed for the wanted bitmap fill and then creates the needed WallpaperBitmapPrimitive2D. This primitive was created for this purpose and takes over all needed logic of orientations and tiling.

Definition at line 920 of file wmfemfhelper.cxx.

References vcl::unotools::b2DRectangleFromRectangle(), CreateColorWallpaper(), CreateGradientWallpaper(), Color::getBColor(), Wallpaper::GetBitmap(), Wallpaper::GetColor(), Wallpaper::GetGradient(), Wallpaper::GetRect(), Wallpaper::GetStyle(), wmfemfhelper::PropertyHolder::getTransformation(), BitmapEx::IsAlpha(), tools::Rectangle::IsEmpty(), Wallpaper::IsGradient(), basegfx::B2DHomMatrix::isIdentity(), Wallpaper::IsRect(), Color::IsTransparent(), and rTarget.

Referenced by implInterpretMetafile().

◆ createBitmapExPrimitive() [1/2]

static void wmfemfhelper::createBitmapExPrimitive ( const BitmapEx rBitmapEx,
const Point rPoint,
const Size rSize,
TargetHolder rTarget,
PropertyHolder const &  rProperties 
)
static

helper to create BitmapPrimitive2D based on current context

Definition at line 609 of file wmfemfhelper.cxx.

References wmfemfhelper::PropertyHolder::getTransformation(), Size::Height(), BitmapEx::IsEmpty(), rTarget, basegfx::B2DHomMatrix::set(), Size::Width(), Point::X(), and Point::Y().

◆ createBitmapExPrimitive() [2/2]

static void wmfemfhelper::createBitmapExPrimitive ( const BitmapEx rBitmapEx,
const Point rPoint,
TargetHolder rTarget,
PropertyHolder const &  rProperties 
)
static

helper to create DiscreteBitmapPrimitive2D based on current context.

The DiscreteBitmapPrimitive2D is especially created for this usage since no other usage defines a bitmap visualisation based on top-left position and size in pixels. At the end it will create a view-dependent transformed embedding of a BitmapPrimitive2D.

Definition at line 590 of file wmfemfhelper.cxx.

References wmfemfhelper::PropertyHolder::getTransformation(), BitmapEx::IsEmpty(), rTarget, Point::X(), and Point::Y().

Referenced by implInterpretMetafile().

◆ CreateColorWallpaper()

static rtl::Reference< drawinglayer::primitive2d::BasePrimitive2D > wmfemfhelper::CreateColorWallpaper ( const basegfx::B2DRange rRange,
const basegfx::BColor rColor,
PropertyHolder const &  rPropertyHolder 
)
static

helper to create needed data to emulate the VCL Wallpaper Metafile action.

It is a quite mighty action. This helper is for simple color filled background.

Definition at line 863 of file wmfemfhelper.cxx.

References basegfx::utils::createPolygonFromRect(), wmfemfhelper::PropertyHolder::getTransformation(), and basegfx::B2DPolygon::transform().

Referenced by CreateAndAppendBitmapWallpaper(), CreateGradientWallpaper(), and implInterpretMetafile().

◆ createFillGradientAttribute()

static drawinglayer::attribute::FillGradientAttribute wmfemfhelper::createFillGradientAttribute ( const Gradient rGradient)
static

◆ createFillHatchAttribute()

static drawinglayer::attribute::FillHatchAttribute wmfemfhelper::createFillHatchAttribute ( const Hatch rHatch)
static

helper to convert from a VCL Hatch definition to the corresponding data for primitive representation

Definition at line 691 of file wmfemfhelper.cxx.

References drawinglayer::attribute::Double, Hatch::GetAngle(), Color::getBColor(), Hatch::GetColor(), Hatch::GetDistance(), Hatch::GetStyle(), drawinglayer::attribute::Single, toRadians(), and drawinglayer::attribute::Triple.

Referenced by implInterpretMetafile().

◆ createFillPrimitive()

static void wmfemfhelper::createFillPrimitive ( const basegfx::B2DPolyPolygon rFillPolyPolygon,
TargetHolder rTarget,
PropertyHolder const &  rProperties 
)
static

◆ createFontAttributeTransformAndAlignment()

static void wmfemfhelper::createFontAttributeTransformAndAlignment ( drawinglayer::attribute::FontAttribute rFontAttribute,
basegfx::B2DHomMatrix rTextTransform,
basegfx::B2DVector rAlignmentOffset,
PropertyHolder const &  rProperty 
)
static

◆ CreateGradientWallpaper()

static rtl::Reference< drawinglayer::primitive2d::BasePrimitive2D > wmfemfhelper::CreateGradientWallpaper ( const basegfx::B2DRange rRange,
const Gradient rGradient,
PropertyHolder const &  rPropertyHolder 
)
static

helper to create needed data to emulate the VCL Wallpaper Metafile action.

It is a quite mighty action. This helper is for gradient filled background.

Definition at line 879 of file wmfemfhelper.cxx.

References CreateColorWallpaper(), createFillGradientAttribute(), drawinglayer::attribute::FillGradientAttribute::getColorStops(), wmfemfhelper::PropertyHolder::getTransformation(), basegfx::B2DHomMatrix::isIdentity(), and basegfx::BColorStops::isSingleColor().

Referenced by CreateAndAppendBitmapWallpaper(), and implInterpretMetafile().

◆ createHairlineAndFillPrimitive() [1/2]

static void wmfemfhelper::createHairlineAndFillPrimitive ( const basegfx::B2DPolygon rPolygon,
TargetHolder rTarget,
PropertyHolder const &  rProperties 
)
static

helper to create needed line and fill primitives based on current context

Definition at line 548 of file wmfemfhelper.cxx.

References createFillPrimitive(), createHairlinePrimitive(), wmfemfhelper::PropertyHolder::getFillColorActive(), wmfemfhelper::PropertyHolder::getLineColorActive(), and rTarget.

Referenced by implInterpretMetafile().

◆ createHairlineAndFillPrimitive() [2/2]

static void wmfemfhelper::createHairlineAndFillPrimitive ( const basegfx::B2DPolyPolygon rPolyPolygon,
TargetHolder rTarget,
PropertyHolder const &  rProperties 
)
static

◆ createHairlinePrimitive()

static void wmfemfhelper::createHairlinePrimitive ( const basegfx::B2DPolygon rLinePolygon,
TargetHolder rTarget,
PropertyHolder const &  rProperties 
)
static

◆ createLinePrimitive()

static void wmfemfhelper::createLinePrimitive ( const basegfx::B2DPolygon rLinePolygon,
const LineInfo rLineInfo,
TargetHolder rTarget,
PropertyHolder const &  rProperties 
)
static

◆ createMaskBmpEx()

static BitmapEx wmfemfhelper::createMaskBmpEx ( const Bitmap rBitmap,
const Color rMaskColor 
)
static

helper to create a regular BotmapEx from a MaskAction (definitions which use a bitmap without transparence but define one of the colors as transparent)

Definition at line 638 of file wmfemfhelper.cxx.

References COL_WHITE(), Bitmap::CreateMask(), Bitmap::Erase(), Bitmap::GetSizePixel(), and vcl::N8_BPP.

Referenced by implInterpretMetafile().

◆ createPointArrayPrimitive()

static void wmfemfhelper::createPointArrayPrimitive ( std::vector< basegfx::B2DPoint > &&  rPositions,
TargetHolder rTarget,
PropertyHolder const &  rProperties,
const basegfx::BColor rBColor 
)
static

helper to create a PointArrayPrimitive2D based on current context

Definition at line 432 of file wmfemfhelper.cxx.

References wmfemfhelper::PropertyHolder::getTransformation(), basegfx::B2DHomMatrix::isIdentity(), and rTarget.

Referenced by implInterpretMetafile().

◆ HandleNewClipRegion()

void wmfemfhelper::HandleNewClipRegion ( const basegfx::B2DPolyPolygon rClipPolyPolygon,
TargetHolders rTargetHolders,
PropertyHolders rPropertyHolders 
)

◆ HandleNewRasterOp()

static void wmfemfhelper::HandleNewRasterOp ( RasterOp  aRasterOp,
TargetHolders rTargetHolders,
PropertyHolders rPropertyHolders 
)
static

helper to handle the change of RasterOp.

It takes care of encapsulating all current geometry to the current RasterOp (if changed) and needs to be called on any RasterOp change. It will also start a new geometry target to embrace to the new RasterOp if a changing RasterOp is used. Currently, RasterOp::Xor and RasterOp::Invert are supported using InvertPrimitive2D, and RasterOp::N0 by using a ModifiedColorPrimitive2D to force to black paint

Definition at line 811 of file wmfemfhelper.cxx.

References wmfemfhelper::TargetHolder::append(), wmfemfhelper::TargetHolders::Current(), wmfemfhelper::PropertyHolders::Current(), wmfemfhelper::TargetHolder::getPrimitive2DSequence(), wmfemfhelper::PropertyHolder::isRasterOpActive(), wmfemfhelper::PropertyHolder::isRasterOpForceBlack(), wmfemfhelper::TargetHolders::Pop(), wmfemfhelper::TargetHolders::Push(), wmfemfhelper::PropertyHolder::setRasterOp(), wmfemfhelper::TargetHolder::size(), and wmfemfhelper::TargetHolders::size().

Referenced by implInterpretMetafile().

◆ implInterpretMetafile()

static void wmfemfhelper::implInterpretMetafile ( const GDIMetaFile rMetaFile,
TargetHolders rTargetHolders,
PropertyHolders rPropertyHolders,
const drawinglayer::geometry::ViewInformation2D rViewInformation 
)
static

This is the main interpreter method.

It is designed to handle the given Metafile completely inside the given context and target. It may use and modify the context and target. This design allows to call itself recursively which adapted contexts and targets as e.g. needed for the MetaActionType::FLOATTRANSPARENT where the content is expressed as a metafile as sub-content.

This interpreter is as free of VCL functionality as possible. It uses VCL data classes (else reading the data would not be possible), but e.g. does NOT use a local OutputDevice as most other MetaFile interpreters/exporters do to hold and work with the current context. This is necessary to be able to get away from the strong internal VCL-binding.

It tries to combine e.g. pixel and/or point actions and to stitch together single line primitives where possible (which is not trivial with the possible line geometry definitions).

It tries to handle clipping no longer as Regions and spans of Rectangles, but as PolyPolygon ClipRegions with (where possible) high precision by using the best possible data quality from the Region. The vcl::Region is unavoidable as data container, but nowadays allows the transport of Polygon-based clip regions. Where this is not used, a Polygon is constructed from the vcl::Region ranges. All primitive clipping uses the MaskPrimitive2D with Polygon-based clipping.

I have marked the single MetaActions with:

SIMPLE, DONE: Simple, e.g nothing to do or value setting in the context

CHECKED, WORKS WELL: Thoroughly tested with extra written test code which created a replacement Metafile just to test this action in various combinations

NEEDS IMPLEMENTATION: Not implemented and asserted, but also no usage found, neither in own Metafile creations, nor in EMF/WMF imports (checked with a whole bunch of critical EMF/WMF bugdocs)

For more comments, see the single action implementations.

SIMPLE, DONE

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

The original OutputDevice::DrawRect paints nothing when nHor or nVer is zero; but just because the tools::Polygon operator creating the rounding does produce nonsense. I assume this an error and create an unrounded rectangle in that case (implicit in createPolygonFromRect)

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL: Simply same as MetaActionType::BMP

CHECKED, WORKS WELL: Simply same as MetaActionType::BMPSCALE

CHECKED, WORKS WELL: Simply same as MetaActionType::BMPSCALEPART

CHECKED, WORKS WELL: Simply same as MetaActionType::BMP

Huh, no it isn't!?

CHECKED, WORKS WELL: Simply same as MetaActionType::BMPSCALE

CHECKED, WORKS WELL: Simply same as MetaActionType::BMPSCALEPART

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

SIMPLE, DONE

SIMPLE, DONE

SIMPLE, DONE

CHECKED, WORKS WELL

SIMPLE, DONE

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

CHECKED, WORKS WELL

SIMPLE, DONE

SIMPLE, DONE

CHECKED, WORKS WELL

CHECKED, WORKS WELL

SIMPLE, DONE

SIMPLE, DONE

SIMPLE, DONE

SIMPLE, DONE

CHECKED, WORKS WELL

Definition at line 1397 of file wmfemfhelper.cxx.

References a, drawinglayer::primitive2d::TextLayouterDevice::addTextRectActions(), basegfx::B2DPolygon::append(), wmfemfhelper::TargetHolder::append(), vcl::unotools::b2DRectangleFromRectangle(), basegfx::B2DPolygon::clear(), basegfx::utils::clipPolyPolygonOnPolyPolygon(), basegfx::utils::clipPolyPolygonOnRange(), vcl::CLIPREGION, COL_BLACK(), COL_TRANSPARENT(), o3tl::convert(), basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), count, CreateAndAppendBitmapWallpaper(), createBitmapExPrimitive(), CreateColorWallpaper(), createFillGradientAttribute(), createFillHatchAttribute(), createFillPrimitive(), CreateGradientWallpaper(), createHairlineAndFillPrimitive(), createHairlinePrimitive(), createLinePrimitive(), createMaskBmpEx(), createPointArrayPrimitive(), basegfx::utils::createPolygonFromEllipse(), basegfx::utils::createPolygonFromRect(), basegfx::utils::createTranslateB2DHomMatrix(), Bitmap::Crop(), BitmapEx::Crop(), wmfemfhelper::TargetHolders::Current(), wmfemfhelper::PropertyHolders::Current(), KernArray::empty(), env, basegfx::Range2D< typename TYPE, typename TRAITS >::equal(), basegfx::fTools::equalZero(), GDIMetaFile::GetAction(), GDIMetaFile::GetActionSize(), vcl::Font::GetAlignment(), basegfx::B2DPolygon::getB2DPoint(), tools::Polygon::getB2DPolygon(), basegfx::B2DPolyPolygon::getB2DPolygon(), tools::PolyPolygon::getB2DPolyPolygon(), basegfx::B2DPolyPolygon::getB2DRange(), Color::getBColor(), MetaBmpAction::GetBitmap(), MetaBmpScaleAction::GetBitmap(), MetaBmpScalePartAction::GetBitmap(), MetaMaskAction::GetBitmap(), MetaMaskScaleAction::GetBitmap(), MetaMaskScalePartAction::GetBitmap(), MetaBmpExAction::GetBitmapEx(), MetaBmpExScaleAction::GetBitmapEx(), MetaBmpExScalePartAction::GetBitmapEx(), basegfx::B2DRange::getCenter(), wmfemfhelper::PropertyHolder::getClipPolyPolygon(), wmfemfhelper::PropertyHolder::getClipPolyPolygonActive(), vcl::Font::GetColor(), MetaFillColorAction::GetColor(), MetaLineColorAction::GetColor(), MetaMaskAction::GetColor(), MetaMaskScaleAction::GetColor(), MetaMaskScalePartAction::GetColor(), MetaOverlineColorAction::GetColor(), MetaPixelAction::GetColor(), MetaTextColorAction::GetColor(), MetaTextFillColorAction::GetColor(), MetaTextLineColorAction::GetColor(), Wallpaper::GetColor(), drawinglayer::attribute::FillGradientAttribute::getColorStops(), MetaCommentAction::GetComment(), MetaCommentAction::GetData(), MetaCommentAction::GetDataSize(), MetaBmpExScalePartAction::GetDestPoint(), MetaBmpScalePartAction::GetDestPoint(), MetaMaskScalePartAction::GetDestPoint(), MetaBmpExScalePartAction::GetDestSize(), MetaBmpScalePartAction::GetDestSize(), MetaMaskScalePartAction::GetDestSize(), MetaTextArrayAction::GetDXArray(), MetaArcAction::GetEndPoint(), MetaChordAction::GetEndPoint(), MetaLineAction::GetEndPoint(), MetaPieAction::GetEndPoint(), vcl::Font::GetFillColor(), MetaPushAction::GetFlags(), MetaFontAction::GetFont(), wmfemfhelper::PropertyHolder::getFont(), vcl::Font::GetFontSize(), MetaFloatTransparentAction::GetGDIMetaFile(), MetaFloatTransparentAction::GetGradient(), MetaGradientAction::GetGradient(), MetaGradientExAction::GetGradient(), Wallpaper::GetGradient(), MetaHatchAction::GetHatch(), basegfx::Range2D< typename TYPE, typename TRAITS >::getHeight(), tools::Rectangle::GetHeight(), MetaMoveClipRegionAction::GetHorzMove(), MetaRoundRectAction::GetHorzRound(), MetaStretchTextAction::GetIndex(), MetaTextAction::GetIndex(), MetaTextArrayAction::GetIndex(), MetaTextArrayAction::GetKashidaArray(), MetaLayoutModeAction::GetLayoutMode(), MetaStretchTextAction::GetLen(), MetaTextAction::GetLen(), MetaTextArrayAction::GetLen(), wmfemfhelper::PropertyHolder::getLineColor(), wmfemfhelper::PropertyHolder::getLineColorActive(), MetaLineAction::GetLineInfo(), MetaPolyLineAction::GetLineInfo(), wmfemfhelper::PropertyHolder::getLineOrFillActive(), MetaEPSAction::GetLink(), MetaMapModeAction::GetMapMode(), MapMode::GetMapUnit(), wmfemfhelper::PropertyHolder::getMapUnit(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinY(), MapMode::GetOrigin(), MetaBmpAction::GetPoint(), MetaBmpExAction::GetPoint(), MetaBmpExScaleAction::GetPoint(), MetaBmpScaleAction::GetPoint(), MetaEPSAction::GetPoint(), MetaFloatTransparentAction::GetPoint(), MetaMaskAction::GetPoint(), MetaMaskScaleAction::GetPoint(), MetaPixelAction::GetPoint(), MetaPointAction::GetPoint(), MetaStretchTextAction::GetPoint(), MetaTextAction::GetPoint(), MetaTextArrayAction::GetPoint(), MetaPolygonAction::GetPolygon(), MetaPolyLineAction::GetPolygon(), MetaGradientExAction::GetPolyPolygon(), MetaHatchAction::GetPolyPolygon(), MetaPolyPolygonAction::GetPolyPolygon(), MetaTransparentAction::GetPolyPolygon(), GDIMetaFile::GetPrefMapMode(), GDIMetaFile::GetPrefSize(), wmfemfhelper::TargetHolder::getPrimitive2DSequence(), wmfemfhelper::PropertyHolder::getPushFlags(), MetaRasterOpAction::GetRasterOp(), wmfemfhelper::PropertyHolder::getRasterOp(), MetaArcAction::GetRect(), MetaChordAction::GetRect(), MetaEllipseAction::GetRect(), MetaGradientAction::GetRect(), MetaISectRectClipRegionAction::GetRect(), MetaPieAction::GetRect(), MetaRectAction::GetRect(), MetaRoundRectAction::GetRect(), MetaTextRectAction::GetRect(), MetaWallpaperAction::GetRect(), MetaClipRegionAction::GetRegion(), MetaISectRegionClipRegionAction::GetRegion(), MetaBmpExScaleAction::GetSize(), MetaBmpScaleAction::GetSize(), MetaEPSAction::GetSize(), MetaFloatTransparentAction::GetSize(), MetaMaskScaleAction::GetSize(), MetaBmpExScalePartAction::GetSrcPoint(), MetaBmpScalePartAction::GetSrcPoint(), MetaMaskScalePartAction::GetSrcPoint(), MetaBmpExScalePartAction::GetSrcSize(), MetaBmpScalePartAction::GetSrcSize(), MetaMaskScalePartAction::GetSrcSize(), MetaArcAction::GetStartPoint(), MetaChordAction::GetStartPoint(), MetaLineAction::GetStartPoint(), MetaPieAction::GetStartPoint(), MetaTextRectAction::GetStyle(), Wallpaper::GetStyle(), MetaEPSAction::GetSubstitute(), MetaStretchTextAction::GetText(), MetaTextAction::GetText(), MetaTextArrayAction::GetText(), MetaTextRectAction::GetText(), MetaTextAlignAction::GetTextAlign(), drawinglayer::primitive2d::TextLayouterDevice::getTextArray(), wmfemfhelper::PropertyHolder::getTextColorActive(), MetaTextLanguageAction::GetTextLanguage(), wmfemfhelper::PropertyHolder::getTransformation(), MetaTransparentAction::GetTransparence(), MetaAction::GetType(), MetaMoveClipRegionAction::GetVertMove(), MetaRoundRectAction::GetVertRound(), MetaWallpaperAction::GetWallpaper(), basegfx::Range2D< typename TYPE, typename TRAITS >::getWidth(), tools::Rectangle::GetWidth(), MetaStretchTextAction::GetWidth(), HandleNewClipRegion(), HandleNewRasterOp(), Size::Height(), implInterpretMetafile(), o3tl::invalid, Wallpaper::IsBitmap(), MetaClipRegionAction::IsClipping(), basegfx::B2DPolygon::isClosed(), basegfx::Range2D< typename TYPE, typename TRAITS >::isEmpty(), tools::Rectangle::IsEmpty(), Bitmap::IsEmpty(), BitmapEx::IsEmpty(), vcl::Region::IsEmpty(), Wallpaper::IsGradient(), basegfx::B2DHomMatrix::isIdentity(), wmfemfhelper::PropertyHolder::isRasterOpActive(), wmfemfhelper::PropertyHolder::isRasterOpInvert(), MetaFillColorAction::IsSetting(), MetaLineColorAction::IsSetting(), MetaOverlineColorAction::IsSetting(), MetaTextFillColorAction::IsSetting(), MetaTextLineColorAction::IsSetting(), basegfx::BColorStops::isSingleColor(), Color::IsTransparent(), tools::Rectangle::Left(), OutputDevice::LogicToLogic(), basegfx::BColor::luminance(), MapToO3tlLength(), nCount, wmfemfhelper::TargetHolders::Pop(), wmfemfhelper::PropertyHolders::Pop(), processMetaTextAction(), processMetaTextLineAction(), wmfemfhelper::TargetHolders::Push(), wmfemfhelper::PropertyHolders::Push(), wmfemfhelper::PropertyHolders::PushDefault(), vcl::RASTEROP, SAL_INFO, basegfx::B2DHomMatrix::scale(), basegfx::B2DHomMatrix::set(), vcl::Font::SetAlignment(), basegfx::B2DPolyPolygon::setB2DPolygon(), basegfx::B2DPolygon::setClosed(), wmfemfhelper::PropertyHolder::setFillColor(), wmfemfhelper::PropertyHolder::setFillColorActive(), wmfemfhelper::PropertyHolder::setFont(), drawinglayer::primitive2d::TextLayouterDevice::setFont(), vcl::Font::SetFontSize(), wmfemfhelper::PropertyHolder::setLanguageType(), wmfemfhelper::PropertyHolder::setLayoutMode(), wmfemfhelper::PropertyHolder::setLineColor(), wmfemfhelper::PropertyHolder::setLineColorActive(), wmfemfhelper::PropertyHolder::setMapUnit(), wmfemfhelper::PropertyHolder::setOverlineColor(), wmfemfhelper::PropertyHolder::setOverlineColorActive(), wmfemfhelper::PropertyHolder::setTextColor(), wmfemfhelper::PropertyHolder::setTextColorActive(), wmfemfhelper::PropertyHolder::setTextFillColor(), wmfemfhelper::PropertyHolder::setTextFillColorActive(), wmfemfhelper::PropertyHolder::setTextLineColor(), wmfemfhelper::PropertyHolder::setTextLineColorActive(), wmfemfhelper::PropertyHolder::setTransformation(), tools::Rectangle::Top(), basegfx::B2DRange::transform(), basegfx::B2DPolyPolygon::transform(), basegfx::B2DHomMatrix::translate(), Size::Width(), Point::X(), and Point::Y().

Referenced by implInterpretMetafile(), and interpretMetafile().

◆ interpretMetafile()

drawinglayer::primitive2d::Primitive2DContainer wmfemfhelper::interpretMetafile ( const GDIMetaFile rMetaFile,
const drawinglayer::geometry::ViewInformation2D rViewInformation 
)

◆ isUnderlineAbove()

static bool wmfemfhelper::isUnderlineAbove ( const vcl::Font rFont)
static

helper to decide UnderlineAbove for text primitives

Definition at line 982 of file wmfemfhelper.cxx.

References vcl::Font::GetCJKContextLanguage(), vcl::Font::GetLanguage(), vcl::Font::IsVertical(), and LANGUAGE_JAPANESE.

Referenced by processMetaTextAction().

◆ processMetaTextAction()

static void wmfemfhelper::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 
)
static

helper which takes complete care for creating the needed text primitives.

It takes care of decorated stuff and all the geometry adaptations needed

Definition at line 1039 of file wmfemfhelper.cxx.

References createFontAttributeTransformAndAlignment(), basegfx::utils::createPolygonFromRect(), vcl::Font::GetEmphasisMark(), vcl::Font::GetFillColor(), wmfemfhelper::PropertyHolder::getFont(), drawinglayer::primitive2d::TextLayouterDevice::getFontAscent(), drawinglayer::primitive2d::TextLayouterDevice::getFontDescent(), wmfemfhelper::PropertyHolder::getLanguageType(), LanguageTag::getLocale(), vcl::Font::GetOrientation(), vcl::Font::GetOverline(), wmfemfhelper::PropertyHolder::getOverlineColor(), wmfemfhelper::PropertyHolder::getOverlineColorActive(), vcl::Font::GetRelief(), vcl::Font::GetStrikeout(), wmfemfhelper::PropertyHolder::getTextColor(), wmfemfhelper::PropertyHolder::getTextFillColor(), wmfemfhelper::PropertyHolder::getTextFillColorActive(), wmfemfhelper::PropertyHolder::getTextLineColor(), wmfemfhelper::PropertyHolder::getTextLineColorActive(), drawinglayer::primitive2d::TextLayouterDevice::getTextWidth(), wmfemfhelper::PropertyHolder::getTransformation(), vcl::Font::GetUnderline(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), basegfx::B2DHomMatrix::isIdentity(), vcl::Font::IsShadow(), isUnderlineAbove(), vcl::Font::IsWordLineMode(), LINESTYLE_NONE, drawinglayer::primitive2d::mapFontLineStyleToTextLine(), drawinglayer::primitive2d::mapFontStrikeoutToTextStrikeout(), basegfx::fTools::more(), basegfx::B2DHomMatrix::rotate(), rTarget, drawinglayer::primitive2d::TextLayouterDevice::setFont(), STRIKEOUT_NONE, drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_ACCENT, drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_CIRCLE, drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_DISC, drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_DOT, drawinglayer::primitive2d::TEXT_FONT_EMPHASIS_MARK_NONE, drawinglayer::primitive2d::TEXT_LINE_NONE, drawinglayer::primitive2d::TEXT_RELIEF_EMBOSSED, drawinglayer::primitive2d::TEXT_RELIEF_ENGRAVED, drawinglayer::primitive2d::TEXT_RELIEF_NONE, toRadians(), basegfx::B2DPolygon::transform(), basegfx::B2DHomMatrix::translate(), Point::X(), and Point::Y().

Referenced by implInterpretMetafile().

◆ processMetaTextLineAction()

static void wmfemfhelper::processMetaTextLineAction ( const MetaTextLineAction rAction,
TargetHolder rTarget,
PropertyHolder const &  rProperty 
)
static

helper which takes complete care for creating the needed textLine primitives

Definition at line 1242 of file wmfemfhelper.cxx.

References createFontAttributeTransformAndAlignment(), wmfemfhelper::PropertyHolder::getFont(), wmfemfhelper::PropertyHolder::getLanguageType(), LanguageTag::getLocale(), MetaTextLineAction::GetOverline(), wmfemfhelper::PropertyHolder::getOverlineColor(), drawinglayer::primitive2d::TextLayouterDevice::getOverlineHeight(), drawinglayer::primitive2d::TextLayouterDevice::getOverlineOffset(), MetaTextLineAction::GetStartPoint(), MetaTextLineAction::GetStrikeout(), drawinglayer::primitive2d::TextLayouterDevice::getStrikeoutOffset(), wmfemfhelper::PropertyHolder::getTextColor(), wmfemfhelper::PropertyHolder::getTextLineColor(), wmfemfhelper::PropertyHolder::getTransformation(), MetaTextLineAction::GetUnderline(), drawinglayer::primitive2d::TextLayouterDevice::getUnderlineHeight(), drawinglayer::primitive2d::TextLayouterDevice::getUnderlineOffset(), MetaTextLineAction::GetWidth(), basegfx::B2DHomMatrix::isIdentity(), drawinglayer::primitive2d::mapFontLineStyleToTextLine(), drawinglayer::primitive2d::mapFontStrikeoutToTextStrikeout(), rTarget, drawinglayer::primitive2d::TextLayouterDevice::setFont(), drawinglayer::primitive2d::TEXT_LINE_NONE, drawinglayer::primitive2d::TEXT_STRIKEOUT_NONE, drawinglayer::primitive2d::TEXT_STRIKEOUT_SLASH, drawinglayer::primitive2d::TEXT_STRIKEOUT_X, basegfx::B2DHomMatrix::translate(), Point::X(), and Point::Y().

Referenced by implInterpretMetafile().