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 (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, const long *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 30 of file emfwr.hxx.

Constructor & Destructor Documentation

EMFWriter::EMFWriter ( SvStream rStream)
inlineexplicit

Definition at line 90 of file emfwr.hxx.

References Create().

Member Function Documentation

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

Definition at line 323 of file emfwr.cxx.

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

Referenced by ImplPrepareHandleSelect().

void EMFWriter::ImplBeginCommentRecord ( sal_Int32  nCommentType)
private
void EMFWriter::ImplBeginPlusRecord ( EmfPlusRecordType  nType,
sal_uInt16  nFlags 
)
private
void EMFWriter::ImplBeginRecord ( sal_uInt32  nType)
private
void EMFWriter::ImplCheckFillAttr ( )
private
void EMFWriter::ImplCheckLineAttr ( )
private
void EMFWriter::ImplCheckTextAttr ( )
private
void EMFWriter::ImplEndCommentRecord ( )
private
void EMFWriter::ImplEndPlusRecord ( )
private
void EMFWriter::ImplEndRecord ( )
private
void EMFWriter::ImplPlusRecord ( EmfPlusRecordType  nType,
sal_uInt16  nFlags 
)
private

Definition at line 159 of file emfwr.cxx.

References ImplBeginPlusRecord(), and ImplEndPlusRecord().

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

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

Definition at line 342 of file emfwr.cxx.

References mHandlesUsed, and SAL_WARN_IF.

Referenced by ImplPrepareHandleSelect().

void EMFWriter::ImplWrite ( const GDIMetaFile rMtf)
private

Definition at line 948 of file emfwr.cxx.

References basegfx::B2DPolygon::append(), ARC, BiDiRtl, BMP, BMPEX, BMPEXSCALE, BMPEXSCALEPART, BMPSCALE, BMPSCALEPART, CHORD, CLIPREGION, COL_WHITE(), COMMENT, tools::PolyPolygon::Count(), BitmapEx::Crop(), Default, ELLIPSE, EPS, Execute, FILLCOLOR, FLOATTRANSPARENT, FONT, FRound(), GDIMetaFile::GetAction(), GDIMetaFile::GetActionSize(), tools::Polygon::getB2DPolygon(), BitmapEx::GetBitmap(), MetaBmpAction::GetBitmap(), MetaBmpScaleAction::GetBitmap(), MetaBmpScalePartAction::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(), BitmapEx::GetMask(), 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(), 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(), MetaAction::GetType(), MetaRoundRectAction::GetVertRound(), MetaStretchTextAction::GetWidth(), GRADIENT, GRADIENTEX, HATCH, i, Impl_handleLineInfoPolyPolygons(), ImplBeginCommentRecord(), ImplBeginRecord(), ImplCheckFillAttr(), ImplCheckLineAttr(), ImplCheckTextAttr(), ImplEndCommentRecord(), ImplEndRecord(), ImplPlusRecord(), ImplWriteBmpRecord(), ImplWriteColor(), ImplWritePlusFillPolygonRecord(), ImplWritePoint(), ImplWritePolygonRecord(), ImplWritePolyPolygonRecord(), ImplWriteRasterOp(), ImplWriteRect(), ImplWriteSize(), ImplWriteTextRecord(), ISECTRECTCLIPREGION, ISECTREGIONCLIPREGION, LAYOUTMODE, LINE, LINECOLOR, OutputDevice::LogicToLogic(), m_rStm, MAPMODE, MASK, MASKSCALE, MASKSCALEPART, maVDev, mbFillChanged, mbLineChanged, mbTextChanged, mnHorTextAlign, MOVECLIPREGION, nType, PIE, PIXEL, POINT, POLYGON, POLYLINE, POLYPOLYGON, POP, PUSH, RASTEROP, RECT, REFPOINT, Bitmap::Replace(), ROUNDRECT, STRETCHTEXT, TA_RIGHT, TA_RTLREADING, TEXT, TEXTALIGN, TEXTARRAY, TEXTCOLOR, TEXTFILLCOLOR, TEXTLINE, TEXTLINECOLOR, TextOriginLeft, 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 WriteEMF().

void EMFWriter::ImplWriteBmpRecord ( const Bitmap rBmp,
const Point rPt,
const Size rSz,
sal_uInt32  nROP 
)
private
void EMFWriter::ImplWriteColor ( const Color rColor)
private
void EMFWriter::ImplWriteExtent ( long  nExtent)
private
void EMFWriter::ImplWritePath ( const tools::PolyPolygon rPolyPoly,
bool  bClose 
)
private
void EMFWriter::ImplWritePlusColor ( const Color rColor,
sal_uInt32  nTrans 
)
private
void EMFWriter::ImplWritePlusEOF ( )
private
void EMFWriter::ImplWritePlusFillPolygonRecord ( const tools::Polygon rPoly,
sal_uInt32  nTrans 
)
private
void EMFWriter::ImplWritePlusPoint ( const Point rPoint)
private

Definition at line 217 of file emfwr.cxx.

References m_rStm, maDestMapMode, maVDev, and SvStream::WriteUInt16().

Referenced by ImplWritePlusFillPolygonRecord().

void EMFWriter::ImplWritePoint ( const Point rPoint)
private
void EMFWriter::ImplWritePolygonRecord ( const tools::Polygon rPoly,
bool  bClose 
)
private
void EMFWriter::ImplWritePolyPolygonRecord ( const tools::PolyPolygon rPolyPoly)
private
void EMFWriter::ImplWriteRasterOp ( RasterOp  eRop)
private

Definition at line 573 of file emfwr.cxx.

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

Referenced by ImplWrite(), and WriteEMF().

void EMFWriter::ImplWriteRect ( const tools::Rectangle rRect)
private
void EMFWriter::ImplWriteSize ( const Size rSize)
private
void EMFWriter::ImplWriteTextRecord ( const Point rPos,
const OUString &  rText,
const long *  pDXArray,
sal_uInt32  nWidth 
)
private
bool EMFWriter::WriteEMF ( const GDIMetaFile rMtf)
void EMFWriter::WriteEMFPlusHeader ( const Size rMtfSizePix,
const Size rMtfSizeLog 
)
private

Member Data Documentation

SvStream& EMFWriter::m_rStm
private
MapMode EMFWriter::maDestMapMode
private
ScopedVclPtr<VirtualDevice> EMFWriter::maVDev
private
bool EMFWriter::mbFillChanged
private

Definition at line 46 of file emfwr.hxx.

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

bool EMFWriter::mbLineChanged
private

Definition at line 44 of file emfwr.hxx.

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

bool EMFWriter::mbRecordOpen
private

Definition at line 42 of file emfwr.hxx.

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

bool EMFWriter::mbRecordPlusOpen
private

Definition at line 43 of file emfwr.hxx.

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

bool EMFWriter::mbTextChanged
private

Definition at line 48 of file emfwr.hxx.

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

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

Definition at line 37 of file emfwr.hxx.

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

sal_uInt32 EMFWriter::mnFillHandle
private

Definition at line 47 of file emfwr.hxx.

Referenced by ImplCheckFillAttr(), and WriteEMF().

sal_uLong EMFWriter::mnHandleCount
private

Definition at line 38 of file emfwr.hxx.

Referenced by ImplAcquireHandle(), and WriteEMF().

sal_uInt32 EMFWriter::mnHorTextAlign
private

Definition at line 50 of file emfwr.hxx.

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

sal_uInt32 EMFWriter::mnLineHandle
private

Definition at line 45 of file emfwr.hxx.

Referenced by ImplCheckLineAttr(), and WriteEMF().

sal_uLong EMFWriter::mnRecordCount
private

Definition at line 39 of file emfwr.hxx.

Referenced by ImplEndRecord(), and WriteEMF().

sal_uLong EMFWriter::mnRecordPlusPos
private

Definition at line 41 of file emfwr.hxx.

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

sal_uLong EMFWriter::mnRecordPos
private

Definition at line 40 of file emfwr.hxx.

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

sal_uInt32 EMFWriter::mnTextHandle
private

Definition at line 49 of file emfwr.hxx.

Referenced by ImplCheckTextAttr(), and WriteEMF().


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