LibreOffice Module vcl (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
EMFWriter Class Reference

#include <emfwr.hxx>

Collaboration diagram for EMFWriter:
[legend]

Public Member Functions

 EMFWriter (SvStream &rStream)
 
bool WriteEMF (const GDIMetaFile &rMtf)
 

Private Member Functions

void ImplBeginRecord (sal_uInt32 nType)
 
void ImplEndRecord ()
 
void ImplBeginPlusRecord (EmfPlusRecordType nType, sal_uInt16 nFlags)
 
void ImplEndPlusRecord ()
 
void ImplPlusRecord (EmfPlusRecordType nType, sal_uInt16 nFlags)
 
void ImplBeginCommentRecord (sal_Int32 nCommentType)
 
void ImplEndCommentRecord ()
 
sal_uLong ImplAcquireHandle ()
 
void ImplReleaseHandle (sal_uLong nHandle)
 
bool ImplPrepareHandleSelect (sal_uInt32 &rHandle, sal_uLong nSelectType)
 
void ImplCheckLineAttr ()
 
void ImplCheckFillAttr ()
 
void ImplCheckTextAttr ()
 
void ImplWriteColor (const Color &rColor)
 
void ImplWriteRasterOp (RasterOp eRop)
 
void ImplWriteExtent (tools::Long nExtent)
 
void ImplWritePoint (const Point &rPoint)
 
void ImplWriteSize (const Size &rSize)
 
void ImplWriteRect (const tools::Rectangle &rRect)
 
void ImplWritePath (const tools::PolyPolygon &rPolyPoly, bool bClose)
 
void ImplWritePolygonRecord (const tools::Polygon &rPoly, bool bClose)
 
void ImplWritePolyPolygonRecord (const tools::PolyPolygon &rPolyPoly)
 
void ImplWriteBmpRecord (const Bitmap &rBmp, const Point &rPt, const Size &rSz, sal_uInt32 nROP)
 
void ImplWriteTextRecord (const Point &rPos, const OUString &rText, KernArraySpan pDXArray, sal_uInt32 nWidth)
 
void Impl_handleLineInfoPolyPolygons (const LineInfo &rInfo, const basegfx::B2DPolygon &rLinePolygon)
 
void ImplWrite (const GDIMetaFile &rMtf)
 
void WriteEMFPlusHeader (const Size &rMtfSizePix, const Size &rMtfSizeLog)
 
void ImplWritePlusEOF ()
 
void ImplWritePlusFillPolygonRecord (const tools::Polygon &rPoly, sal_uInt32 nTrans)
 
void ImplWritePlusColor (const Color &rColor, sal_uInt32 nTrans)
 
void ImplWritePlusPoint (const Point &rPoint)
 

Private Attributes

ScopedVclPtr< VirtualDevicemaVDev
 
MapMode maDestMapMode
 
SvStreamm_rStm
 
std::vector< bool > mHandlesUsed
 
sal_uLong mnHandleCount
 
sal_uLong mnRecordCount
 
sal_uLong mnRecordPos
 
sal_uLong mnRecordPlusPos
 
bool mbRecordOpen
 
bool mbRecordPlusOpen
 
bool mbLineChanged
 
sal_uInt32 mnLineHandle
 
bool mbFillChanged
 
sal_uInt32 mnFillHandle
 
bool mbTextChanged
 
sal_uInt32 mnTextHandle
 
sal_uInt32 mnHorTextAlign
 

Detailed Description

Definition at line 29 of file emfwr.hxx.

Constructor & Destructor Documentation

◆ EMFWriter()

EMFWriter::EMFWriter ( SvStream rStream)
inlineexplicit

Definition at line 89 of file emfwr.hxx.

References Create().

Member Function Documentation

◆ Impl_handleLineInfoPolyPolygons()

void EMFWriter::Impl_handleLineInfoPolyPolygons ( const LineInfo rInfo,
const basegfx::B2DPolygon rLinePolygon 
)
private

◆ ImplAcquireHandle()

sal_uLong EMFWriter::ImplAcquireHandle ( )
private

Definition at line 323 of file emfwr.cxx.

References HANDLE_INVALID, i, mHandlesUsed, mnHandleCount, nHandle, and SAL_WARN_IF.

Referenced by ImplPrepareHandleSelect().

◆ ImplBeginCommentRecord()

void EMFWriter::ImplBeginCommentRecord ( sal_Int32  nCommentType)
private

◆ ImplBeginPlusRecord()

void EMFWriter::ImplBeginPlusRecord ( EmfPlusRecordType  nType,
sal_uInt16  nFlags 
)
private

◆ ImplBeginRecord()

void EMFWriter::ImplBeginRecord ( sal_uInt32  nType)
private

◆ ImplCheckFillAttr()

void EMFWriter::ImplCheckFillAttr ( )
private

◆ ImplCheckLineAttr()

void EMFWriter::ImplCheckLineAttr ( )
private

◆ ImplCheckTextAttr()

void EMFWriter::ImplCheckTextAttr ( )
private

◆ ImplEndCommentRecord()

void EMFWriter::ImplEndCommentRecord ( )
private

◆ ImplEndPlusRecord()

void EMFWriter::ImplEndPlusRecord ( )
private

◆ ImplEndRecord()

void EMFWriter::ImplEndRecord ( )
private

◆ ImplPlusRecord()

void EMFWriter::ImplPlusRecord ( EmfPlusRecordType  nType,
sal_uInt16  nFlags 
)
private

Definition at line 159 of file emfwr.cxx.

References ImplBeginPlusRecord(), ImplEndPlusRecord(), and nType.

Referenced by ImplWrite(), ImplWritePlusEOF(), and WriteEMFPlusHeader().

◆ ImplPrepareHandleSelect()

bool EMFWriter::ImplPrepareHandleSelect ( sal_uInt32 &  rHandle,
sal_uLong  nSelectType 
)
private

◆ ImplReleaseHandle()

void EMFWriter::ImplReleaseHandle ( sal_uLong  nHandle)
private

Definition at line 342 of file emfwr.cxx.

References mHandlesUsed, nHandle, and SAL_WARN_IF.

Referenced by ImplPrepareHandleSelect().

◆ ImplWrite()

void EMFWriter::ImplWrite ( const GDIMetaFile rMtf)
private

Definition at line 975 of file emfwr.cxx.

References Gradient::AddGradientActions(), basegfx::B2DPolygon::append(), ARC, vcl::text::BiDiRtl, BMP, BMPEX, BMPEXSCALE, BMPEXSCALEPART, BMPSCALE, BMPSCALEPART, CHORD, CLIPREGION, COL_WHITE(), COMMENT, tools::PolyPolygon::Count(), Bitmap::Crop(), BitmapEx::Crop(), vcl::text::Default, ELLIPSE, EPS, Execute(), FILLCOLOR, FLOATTRANSPARENT, FONT, FRound(), GDIMetaFile::GetAction(), GDIMetaFile::GetActionSize(), BitmapEx::GetAlphaMask(), tools::Polygon::getB2DPolygon(), MetaBmpAction::GetBitmap(), MetaBmpScaleAction::GetBitmap(), MetaBmpScalePartAction::GetBitmap(), BitmapEx::GetBitmap(), MetaBmpExAction::GetBitmapEx(), MetaBmpExScaleAction::GetBitmapEx(), MetaBmpExScalePartAction::GetBitmapEx(), MetaPixelAction::GetColor(), MetaCommentAction::GetComment(), MetaCommentAction::GetData(), MetaCommentAction::GetDataSize(), GetDC, MetaBmpScalePartAction::GetDestPoint(), MetaBmpExScalePartAction::GetDestPoint(), MetaBmpScalePartAction::GetDestSize(), MetaBmpExScalePartAction::GetDestSize(), MetaTextArrayAction::GetDXArray(), MetaLineAction::GetEndPoint(), MetaArcAction::GetEndPoint(), MetaPieAction::GetEndPoint(), MetaChordAction::GetEndPoint(), MetaFloatTransparentAction::GetGDIMetaFile(), MetaGradientAction::GetGradient(), MetaHatchAction::GetHatch(), MetaRoundRectAction::GetHorzRound(), MetaTextAction::GetIndex(), MetaTextArrayAction::GetIndex(), MetaStretchTextAction::GetIndex(), MetaTextAction::GetLen(), MetaTextArrayAction::GetLen(), MetaStretchTextAction::GetLen(), MetaLineAction::GetLineInfo(), MetaPolyLineAction::GetLineInfo(), MapMode::GetOrigin(), MetaPixelAction::GetPoint(), MetaPointAction::GetPoint(), MetaTextAction::GetPoint(), MetaTextArrayAction::GetPoint(), MetaStretchTextAction::GetPoint(), MetaBmpAction::GetPoint(), MetaBmpScaleAction::GetPoint(), MetaBmpExAction::GetPoint(), MetaBmpExScaleAction::GetPoint(), MetaFloatTransparentAction::GetPoint(), MetaEPSAction::GetPoint(), MetaPolyLineAction::GetPolygon(), MetaHatchAction::GetPolyPolygon(), GDIMetaFile::GetPrefMapMode(), GDIMetaFile::GetPrefSize(), MetaRectAction::GetRect(), MetaRoundRectAction::GetRect(), MetaEllipseAction::GetRect(), MetaArcAction::GetRect(), MetaPieAction::GetRect(), MetaChordAction::GetRect(), MetaTextRectAction::GetRect(), MetaGradientAction::GetRect(), tools::Polygon::GetSize(), MetaBmpScaleAction::GetSize(), MetaBmpExScaleAction::GetSize(), MetaFloatTransparentAction::GetSize(), MetaEPSAction::GetSize(), Bitmap::GetSizePixel(), MetaBmpScalePartAction::GetSrcPoint(), MetaBmpExScalePartAction::GetSrcPoint(), MetaBmpScalePartAction::GetSrcSize(), MetaBmpExScalePartAction::GetSrcSize(), MetaLineAction::GetStartPoint(), MetaArcAction::GetStartPoint(), MetaPieAction::GetStartPoint(), MetaChordAction::GetStartPoint(), MetaEPSAction::GetSubstitute(), MetaTextAction::GetText(), MetaTextArrayAction::GetText(), MetaStretchTextAction::GetText(), MetaTextRectAction::GetText(), MetaTransparentAction::GetTransparence(), MetaAction::GetType(), MetaRoundRectAction::GetVertRound(), MetaStretchTextAction::GetWidth(), GRADIENT, GRADIENTEX, HATCH, Size::Height(), i, Impl_handleLineInfoPolyPolygons(), ImplBeginCommentRecord(), ImplBeginRecord(), ImplCheckFillAttr(), ImplCheckLineAttr(), ImplCheckTextAttr(), ImplEndCommentRecord(), ImplEndRecord(), ImplPlusRecord(), ImplWrite(), ImplWriteBmpRecord(), ImplWriteColor(), ImplWritePlusFillPolygonRecord(), ImplWritePoint(), ImplWritePolygonRecord(), ImplWritePolyPolygonRecord(), ImplWriteRasterOp(), ImplWriteRect(), ImplWriteSize(), ImplWriteTextRecord(), ISECTRECTCLIPREGION, ISECTREGIONCLIPREGION, AlphaMask::IsEmpty(), LAYOUTMODE, LINE, LINECOLOR, OutputDevice::LogicToLogic(), m_rStm, MAPMODE, MASK, MASKSCALE, MASKSCALEPART, maVDev, mbFillChanged, mbLineChanged, mbTextChanged, mnHorTextAlign, GDIMetaFile::Move(), MOVECLIPREGION, nCount, nType, PIE, PIXEL, POINT, POLYGON, POLYLINE, POLYPOLYGON, POP, PUSH, RASTEROP, RECT, REFPOINT, Bitmap::Replace(), ROUNDRECT, GDIMetaFile::Scale(), MapMode::SetOrigin(), MapMode::SetScaleX(), MapMode::SetScaleY(), Point::setX(), Point::setY(), STRETCHTEXT, TA_RIGHT, TA_RTLREADING, TEXT, TEXTALIGN, TEXTARRAY, TEXTCOLOR, TEXTFILLCOLOR, TEXTLINE, TEXTLINECOLOR, vcl::text::TextOriginLeft, vcl::text::TextOriginRight, TEXTRECT, tools::Rectangle::TopLeft(), Transparent, WALLPAPER, Size::Width(), WIN_EMR_COMMENT_EMFPLUS, WIN_EMR_ELLIPSE, WIN_EMR_INTERSECTCLIPRECT, WIN_EMR_LINETO, WIN_EMR_MOVETOEX, WIN_EMR_RECTANGLE, WIN_EMR_RESTOREDC, WIN_EMR_ROUNDRECT, WIN_EMR_SAVEDC, WIN_EMR_SETPIXELV, WIN_SRCAND, WIN_SRCCOPY, WIN_SRCPAINT, SvStream::WriteBytes(), SvStream::WriteInt32(), Point::X(), and Point::Y().

Referenced by ImplWrite(), and WriteEMF().

◆ ImplWriteBmpRecord()

void EMFWriter::ImplWriteBmpRecord ( const Bitmap rBmp,
const Point rPt,
const Size rSz,
sal_uInt32  nROP 
)
private

◆ ImplWriteColor()

void EMFWriter::ImplWriteColor ( const Color rColor)
private

◆ ImplWriteExtent()

void EMFWriter::ImplWriteExtent ( tools::Long  nExtent)
private

◆ ImplWritePath()

void EMFWriter::ImplWritePath ( const tools::PolyPolygon rPolyPoly,
bool  bClose 
)
private

◆ ImplWritePlusColor()

void EMFWriter::ImplWritePlusColor ( const Color rColor,
sal_uInt32  nTrans 
)
private

◆ ImplWritePlusEOF()

void EMFWriter::ImplWritePlusEOF ( )
private

◆ ImplWritePlusFillPolygonRecord()

void EMFWriter::ImplWritePlusFillPolygonRecord ( const tools::Polygon rPoly,
sal_uInt32  nTrans 
)
private

◆ ImplWritePlusPoint()

void EMFWriter::ImplWritePlusPoint ( const Point rPoint)
private

◆ ImplWritePoint()

void EMFWriter::ImplWritePoint ( const Point rPoint)
private

◆ ImplWritePolygonRecord()

void EMFWriter::ImplWritePolygonRecord ( const tools::Polygon rPoly,
bool  bClose 
)
private

◆ ImplWritePolyPolygonRecord()

void EMFWriter::ImplWritePolyPolygonRecord ( const tools::PolyPolygon rPolyPoly)
private

◆ ImplWriteRasterOp()

void EMFWriter::ImplWriteRasterOp ( RasterOp  eRop)
private

Definition at line 596 of file emfwr.cxx.

References ImplBeginRecord(), ImplEndRecord(), Invert, m_rStm, WIN_EMR_SETROP2, SvStream::WriteUInt32(), and Xor.

Referenced by ImplWrite(), and WriteEMF().

◆ ImplWriteRect()

void EMFWriter::ImplWriteRect ( const tools::Rectangle rRect)
private

◆ ImplWriteSize()

void EMFWriter::ImplWriteSize ( const Size rSize)
private

◆ ImplWriteTextRecord()

void EMFWriter::ImplWriteTextRecord ( const Point rPos,
const OUString &  rText,
KernArraySpan  pDXArray,
sal_uInt32  nWidth 
)
private

◆ WriteEMF()

bool EMFWriter::WriteEMF ( const GDIMetaFile rMtf)

◆ WriteEMFPlusHeader()

void EMFWriter::WriteEMFPlusHeader ( const Size rMtfSizePix,
const Size rMtfSizeLog 
)
private

Member Data Documentation

◆ m_rStm

SvStream& EMFWriter::m_rStm
private

◆ maDestMapMode

MapMode EMFWriter::maDestMapMode
private

◆ maVDev

ScopedVclPtr<VirtualDevice> EMFWriter::maVDev
private

◆ mbFillChanged

bool EMFWriter::mbFillChanged
private

Definition at line 45 of file emfwr.hxx.

Referenced by ImplCheckFillAttr(), ImplWrite(), and WriteEMF().

◆ mbLineChanged

bool EMFWriter::mbLineChanged
private

Definition at line 43 of file emfwr.hxx.

Referenced by ImplCheckLineAttr(), ImplWrite(), and WriteEMF().

◆ mbRecordOpen

bool EMFWriter::mbRecordOpen
private

Definition at line 41 of file emfwr.hxx.

Referenced by ImplBeginRecord(), ImplEndCommentRecord(), ImplEndRecord(), and WriteEMF().

◆ mbRecordPlusOpen

bool EMFWriter::mbRecordPlusOpen
private

Definition at line 42 of file emfwr.hxx.

Referenced by ImplBeginPlusRecord(), ImplEndPlusRecord(), and WriteEMF().

◆ mbTextChanged

bool EMFWriter::mbTextChanged
private

Definition at line 47 of file emfwr.hxx.

Referenced by ImplCheckTextAttr(), ImplWrite(), and WriteEMF().

◆ mHandlesUsed

std::vector<bool> EMFWriter::mHandlesUsed
private

Definition at line 36 of file emfwr.hxx.

Referenced by ImplAcquireHandle(), ImplReleaseHandle(), and WriteEMF().

◆ mnFillHandle

sal_uInt32 EMFWriter::mnFillHandle
private

Definition at line 46 of file emfwr.hxx.

Referenced by ImplCheckFillAttr(), and WriteEMF().

◆ mnHandleCount

sal_uLong EMFWriter::mnHandleCount
private

Definition at line 37 of file emfwr.hxx.

Referenced by ImplAcquireHandle(), and WriteEMF().

◆ mnHorTextAlign

sal_uInt32 EMFWriter::mnHorTextAlign
private

Definition at line 49 of file emfwr.hxx.

Referenced by ImplCheckTextAttr(), ImplWrite(), and WriteEMF().

◆ mnLineHandle

sal_uInt32 EMFWriter::mnLineHandle
private

Definition at line 44 of file emfwr.hxx.

Referenced by ImplCheckLineAttr(), and WriteEMF().

◆ mnRecordCount

sal_uLong EMFWriter::mnRecordCount
private

Definition at line 38 of file emfwr.hxx.

Referenced by ImplEndRecord(), and WriteEMF().

◆ mnRecordPlusPos

sal_uLong EMFWriter::mnRecordPlusPos
private

Definition at line 40 of file emfwr.hxx.

Referenced by ImplBeginPlusRecord(), ImplEndPlusRecord(), and WriteEMF().

◆ mnRecordPos

sal_uLong EMFWriter::mnRecordPos
private

Definition at line 39 of file emfwr.hxx.

Referenced by ImplBeginRecord(), ImplEndCommentRecord(), ImplEndRecord(), and WriteEMF().

◆ mnTextHandle

sal_uInt32 EMFWriter::mnTextHandle
private

Definition at line 48 of file emfwr.hxx.

Referenced by ImplCheckTextAttr(), and WriteEMF().


The documentation for this class was generated from the following files: