LibreOffice Module vcl (master)  1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
Printer Class Reference

#include <print.hxx>

Inheritance diagram for Printer:
[legend]
Collaboration diagram for Printer:
[legend]

Public Member Functions

VCL_DLLPRIVATE void ImplStartPage ()
 
VCL_DLLPRIVATE void ImplEndPage ()
 
void DrawGradientEx (OutputDevice *pOut, const tools::Rectangle &rRect, const Gradient &rGradient)
 
virtual Bitmap GetBitmap (const Point &rSrcPt, const Size &rSize) const override
 
 Printer ()
 
 Printer (const JobSetup &rJobSetup)
 
 Printer (const QueueInfo &rQueueInfo)
 
 Printer (const OUString &rPrinterName)
 
virtual ~Printer () override
 
virtual void dispose () override
 
const OUString & GetName () const
 
const OUString & GetDriverName () const
 
bool IsDefPrinter () const
 
bool IsDisplayPrinter () const
 
bool IsValid () const
 
sal_uInt32 GetCapabilities (PrinterCapType nType) const
 
bool HasSupport (PrinterSupport eFeature) const
 
bool SetJobSetup (const JobSetup &rSetup)
 
const JobSetupGetJobSetup () const
 
bool Setup (weld::Window *pWindow, PrinterSetupMode eMode=PrinterSetupMode::DocumentGlobal)
 
bool SetPrinterProps (const Printer *pPrinter)
 
Color GetBackgroundColor () const override
 
VCL_DLLPRIVATE void SetPrinterOptions (const PrinterOptions &rOptions)
 SetPrinterOptions is used internally only now. More...
 
const PrinterOptionsGetPrinterOptions () const
 
bool SetOrientation (Orientation eOrient)
 
Orientation GetOrientation () const
 
void SetDuplexMode (DuplexMode)
 
DuplexMode GetDuplexMode () const
 
bool SetPaperBin (sal_uInt16 nPaperBin)
 
sal_uInt16 GetPaperBin () const
 
void SetPaper (Paper ePaper)
 
bool SetPaperSizeUser (const Size &rSize)
 
bool SetPaperSizeUser (const Size &rSize, bool bMatchNearest)
 
Paper GetPaper () const
 
int GetPaperInfoCount () const
 
const PaperInfoGetPaperInfo (int nPaper) const
 
sal_uInt16 GetPaperBinCount () const
 
OUString GetPaperBinName (sal_uInt16 nPaperBin) const
 
bool GetPrinterSettingsPreferred () const
 
void SetPrinterSettingsPreferred (bool bPaperSizeFromSetup)
 
const SizeGetPaperSizePixel () const
 
Size GetPaperSize () const
 
Size GetPaperSize (int nPaper)
 
const PointGetPageOffsetPixel () const
 
Point GetPageOffset () const
 
void SetCopyCount (sal_uInt16 nCopy, bool bCollate)
 
sal_uInt16 GetCopyCount () const
 
bool IsCollateCopy () const
 
bool IsPrinting () const
 
bool IsJobActive () const
 
virtual bool HasMirroredGraphics () const override
 
virtual void DrawOutDev (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize) override
 
virtual void DrawOutDev (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize, const OutputDevice &rOutDev) override
 
virtual void CopyArea (const Point &rDestPt, const Point &rSrcPt, const Size &rSrcSize, bool bWindowInvalidate=false) override
 
- Public Member Functions inherited from OutputDevice
SAL_DLLPRIVATE sal_Int32 GetDPIX () const
 Get the output device's DPI x-axis value. More...
 
SAL_DLLPRIVATE sal_Int32 GetDPIY () const
 Get the output device's DPI y-axis value. More...
 
SAL_DLLPRIVATE void SetDPIX (sal_Int32 nDPIX)
 
SAL_DLLPRIVATE void SetDPIY (sal_Int32 nDPIY)
 
float GetDPIScaleFactor () const
 
sal_Int32 GetDPIScalePercentage () const
 
OutDevType GetOutDevType () const
 
virtual bool IsVirtual () const
 
bool SupportsOperation (OutDevSupportType) const
 Query an OutputDevice to see whether it supports a specific operation. More...
 
void SetExtOutDevData (vcl::ExtOutDevData *pExtOutDevData)
 
vcl::ExtOutDevDataGetExtOutDevData () const
 
void DrawPixel (const Point &rPt)
 
void DrawPixel (const Point &rPt, const Color &rColor)
 
Color GetPixel (const Point &rPt) const
 
void DrawRect (const tools::Rectangle &rRect)
 
void DrawRect (const tools::Rectangle &rRect, sal_uLong nHorzRount, sal_uLong nVertRound)
 
void DrawCheckered (const Point &rPos, const Size &rSize, sal_uInt32 nLen=8, Color aStart=COL_WHITE, Color aEnd=COL_BLACK)
 Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd. More...
 
void DrawGrid (const tools::Rectangle &rRect, const Size &rDist, DrawGridFlags nFlags)
 
void Invert (const tools::Rectangle &rRect, InvertFlags nFlags=InvertFlags::NONE)
 
void Invert (const tools::Polygon &rPoly, InvertFlags nFlags=InvertFlags::NONE)
 
void DrawEllipse (const tools::Rectangle &rRect)
 
void DrawArc (const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
 
void DrawPie (const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
 
void DrawChord (const tools::Rectangle &rRect, const Point &rStartPt, const Point &rEndPt)
 
SystemTextLayoutData GetSysTextLayoutData (const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex, sal_Int32 nLen, const long *pDXAry) const
 OutputDevice::GetSysTextLayoutData. More...
 
SAL_DLLPRIVATE bool ImplIsAntiparallel () const
 
SAL_DLLPRIVATE void ReMirror (Point &rPoint) const
 
SAL_DLLPRIVATE void ReMirror (tools::Rectangle &rRect) const
 
SAL_DLLPRIVATE void ReMirror (vcl::Region &rRegion) const
 
SAL_DLLPRIVATE bool ImplIsRecordLayout () const
 
std::unique_ptr< SalLayoutImplLayout (const OUString &, sal_Int32 nIndex, sal_Int32 nLen, const Point &rLogicPos=Point(0, 0), long nLogicWidth=0, const long *pLogicDXArray=nullptr, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
 
SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs (OUString &, const sal_Int32 nIndex, const sal_Int32 nLen, DeviceCoordinate nPixelWidth, const DeviceCoordinate *pPixelDXArray, SalLayoutFlags flags=SalLayoutFlags::NONE, vcl::TextLayoutCache const *=nullptr) const
 
SAL_DLLPRIVATE std::unique_ptr< SalLayoutImplGlyphFallbackLayout (std::unique_ptr< SalLayout >, ImplLayoutArgs &) const
 
SAL_DLLPRIVATE std::unique_ptr< SalLayoutgetFallbackLayout (LogicalFontInstance *pLogicalFont, int nFallbackLevel, ImplLayoutArgs &rLayoutArgs) const
 
virtual void EnableRTL (bool bEnable=true)
 
bool IsRTLEnabled () const
 
bool GetTextIsRTL (const OUString &, sal_Int32 nIndex, sal_Int32 nLen) const
 
bool IsNativeControlSupported (ControlType nType, ControlPart nPart) const
 Query the platform layer for control support. More...
 
bool HitTestNativeScrollbar (ControlPart nPart, const tools::Rectangle &rControlRegion, const Point &aPos, bool &rIsInside) const
 Query the native control to determine if it was acted upon. More...
 
bool DrawNativeControl (ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption)
 Request rendering of a particular control and/or part. More...
 
bool GetNativeControlRegion (ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
 Query the native control's actual drawing region (including adornment) More...
 
bool DrawEPS (const Point &rPt, const Size &rSz, const GfxLink &rGfxLink, GDIMetaFile *pSubst=nullptr)
 
SalGraphics const * GetGraphics () const
 Get the graphic context that the output device uses to draw on. More...
 
SalGraphicsGetGraphics ()
 
void SetConnectMetaFile (GDIMetaFile *pMtf)
 
GDIMetaFileGetConnectMetaFile () const
 
virtual void SetSettings (const AllSettings &rSettings)
 
const AllSettingsGetSettings () const
 
SystemGraphicsData GetSystemGfxData () const
 
bool SupportsCairo () const
 
cairo::SurfaceSharedPtr CreateSurface (const cairo::CairoSurfaceSharedPtr &rSurface) const
 Create Surface from given cairo surface. More...
 
cairo::SurfaceSharedPtr CreateSurface (int x, int y, int width, int height) const
 Create surface with given dimensions. More...
 
cairo::SurfaceSharedPtr CreateBitmapSurface (const BitmapSystemData &rData, const Size &rSize) const
 Create Surface for given bitmap data. More...
 
css::uno::Any GetNativeSurfaceHandle (cairo::SurfaceSharedPtr &rSurface, const basegfx::B2ISize &rSize) const
 Return native handle for underlying surface. More...
 
css::uno::Any GetSystemGfxDataAny () const
 
void SetRefPoint ()
 
void SetRefPoint (const Point &rRefPoint)
 
const PointGetRefPoint () const
 
bool IsRefPoint () const
 
virtual sal_uInt16 GetBitCount () const
 
Size GetOutputSizePixel () const
 
long GetOutputWidthPixel () const
 
long GetOutputHeightPixel () const
 
long GetOutOffXPixel () const
 
long GetOutOffYPixel () const
 
void SetOutOffXPixel (long nOutOffX)
 
void SetOutOffYPixel (long nOutOffY)
 
Size GetOutputSize () const
 
css::uno::Reference< css::awt::XGraphics > CreateUnoGraphics ()
 
std::vector< VCLXGraphics * > * GetUnoGraphicsList () const
 
std::vector< VCLXGraphics * > * CreateUnoGraphicsList ()
 
virtual void Flush ()
 
void Push (PushFlags nFlags=PushFlags::ALL)
 
void Pop ()
 
sal_uInt32 GetGCStackDepth () const
 
void EnableOutput (bool bEnable=true)
 
bool IsOutputEnabled () const
 
bool IsDeviceOutputNecessary () const
 
void SetAntialiasing (AntialiasingFlags nMode)
 
AntialiasingFlags GetAntialiasing () const
 
void SetDrawMode (DrawModeFlags nDrawMode)
 
DrawModeFlags GetDrawMode () const
 
void SetLayoutMode (ComplexTextLayoutFlags nTextLayoutMode)
 
ComplexTextLayoutFlags GetLayoutMode () const
 
void SetDigitLanguage (LanguageType)
 
LanguageType GetDigitLanguage () const
 
void SetRasterOp (RasterOp eRasterOp)
 
RasterOp GetRasterOp () const
 
void SetOutDevViewType (OutDevViewType eOutDevViewType)
 If this OutputDevice is used for displaying a Print Preview the OutDevViewType should be set to 'OutDevViewType::PrintPreview'. More...
 
OutDevViewType GetOutDevViewType () const
 
void SetLineColor ()
 
void SetLineColor (const Color &rColor)
 
const ColorGetLineColor () const
 
bool IsLineColor () const
 
void SetFillColor ()
 
void SetFillColor (const Color &rColor)
 
const ColorGetFillColor () const
 
bool IsFillColor () const
 
void SetBackground ()
 
void SetBackground (const Wallpaper &rBackground)
 
virtual void SaveBackground (VirtualDevice &rSaveDevice, const Point &rPos, const Size &rSize, const Size &rBackgroundSize) const
 
const WallpaperGetBackground () const
 
bool IsBackground () const
 
void SetFont (const vcl::Font &rNewFont)
 
const vcl::FontGetFont () const
 
vcl::Region GetClipRegion () const
 
void SetClipRegion ()
 
void SetClipRegion (const vcl::Region &rRegion)
 
bool SelectClipRegion (const vcl::Region &, SalGraphics *pGraphics=nullptr)
 
bool IsClipRegion () const
 
void MoveClipRegion (long nHorzMove, long nVertMove)
 
void IntersectClipRegion (const tools::Rectangle &rRect)
 
void IntersectClipRegion (const vcl::Region &rRegion)
 
virtual vcl::Region GetActiveClipRegion () const
 
void DrawLine (const Point &rStartPt, const Point &rEndPt)
 
void DrawLine (const Point &rStartPt, const Point &rEndPt, const LineInfo &rLineInfo)
 
void DrawPolyLine (const tools::Polygon &rPoly)
 Render the given polygon as a line stroke. More...
 
void DrawPolyLine (const basegfx::B2DPolygon &, double fLineWidth=0.0, basegfx::B2DLineJoin eLineJoin=basegfx::B2DLineJoin::Round, css::drawing::LineCap eLineCap=css::drawing::LineCap_BUTT, double fMiterMinimumAngle=basegfx::deg2rad(15.0))
 
void DrawPolyLine (const tools::Polygon &rPoly, const LineInfo &rLineInfo)
 Render the given polygon as a line stroke. More...
 
bool DrawPolyLineDirect (const basegfx::B2DHomMatrix &rObjectTransform, const basegfx::B2DPolygon &rB2DPolygon, double fLineWidth=0.0, double fTransparency=0.0, basegfx::B2DLineJoin eLineJoin=basegfx::B2DLineJoin::NONE, css::drawing::LineCap eLineCap=css::drawing::LineCap_BUTT, double fMiterMinimumAngle=basegfx::deg2rad(15.0), bool bBypassAACheck=false)
 
void DrawPolygon (const tools::Polygon &rPoly)
 Render the given polygon. More...
 
void DrawPolygon (const basegfx::B2DPolygon &)
 
void DrawPolyPolygon (const tools::PolyPolygon &rPolyPoly)
 Render the given poly-polygon. More...
 
void DrawPolyPolygon (const basegfx::B2DPolyPolygon &)
 
void DrawGradient (const tools::Rectangle &rRect, const Gradient &rGradient)
 
void DrawGradient (const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient)
 
void AddGradientActions (const tools::Rectangle &rRect, const Gradient &rGradient, GDIMetaFile &rMtf)
 
void DrawHatch (const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch)
 
void AddHatchActions (const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch, GDIMetaFile &rMtf)
 
void DrawHatch (const tools::PolyPolygon &rPolyPoly, const Hatch &rHatch, bool bMtf)
 
void DrawWallpaper (const tools::Rectangle &rRect, const Wallpaper &rWallpaper)
 
void Erase ()
 
void Erase (const tools::Rectangle &rRect)
 
void DrawText (const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
 
void DrawText (const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::NONE, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, vcl::ITextLayout *_pTextLayout=nullptr)
 
void ImplDrawText (SalLayout &)
 
void ImplDrawTextBackground (const SalLayout &)
 
void DrawCtrlText (const Point &rPos, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, DrawTextFlags nStyle=DrawTextFlags::Mnemonic, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr)
 
void DrawTextLine (const Point &rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove=false)
 
void ImplDrawTextLine (long nBaseX, long nX, long nY, DeviceCoordinate nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove)
 
void ImplDrawTextLines (SalLayout &, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bWordLine, bool bUnderlineAbove)
 
void DrawWaveLine (const Point &rStartPos, const Point &rEndPos, long nLineWidth=1)
 
bool ImplDrawRotateText (SalLayout &)
 
tools::Rectangle GetTextRect (const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
 
bool GetTextBoundRect (tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
 Return the exact bounding rectangle of rStr. More...
 
tools::Rectangle ImplGetTextBoundRect (const SalLayout &)
 
bool GetTextOutline (tools::PolyPolygon &, const OUString &rStr, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr) const
 
bool GetTextOutlines (PolyPolyVector &, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr) const
 
bool GetTextOutlines (basegfx::B2DPolyPolygonVector &rVector, const OUString &rStr, sal_Int32 nBase, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr) const
 
OUString GetEllipsisString (const OUString &rStr, long nMaxWidth, DrawTextFlags nStyle=DrawTextFlags::EndEllipsis) const
 
long GetCtrlTextWidth (const OUString &rStr, const SalLayoutGlyphs *pLayoutCache=nullptr) const
 
void AddTextRectActions (const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, GDIMetaFile &rMtf)
 Generate MetaTextActions for the text rect. More...
 
void SetTextColor (const Color &rColor)
 
const ColorGetTextColor () const
 
void SetTextFillColor ()
 
void SetTextFillColor (const Color &rColor)
 
Color GetTextFillColor () const
 
bool IsTextFillColor () const
 
void SetTextLineColor ()
 
void SetTextLineColor (const Color &rColor)
 
const ColorGetTextLineColor () const
 
bool IsTextLineColor () const
 
void SetOverlineColor ()
 
void SetOverlineColor (const Color &rColor)
 
const ColorGetOverlineColor () const
 
bool IsOverlineColor () const
 
void SetTextAlign (TextAlign eAlign)
 
TextAlign GetTextAlign () const
 
long GetTextWidth (const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
 Width of the text. More...
 
long GetTextHeight () const
 Height where any character of the current font fits; in logic coordinates. More...
 
float approximate_char_width () const
 
float approximate_digit_width () const
 
void DrawTextArray (const Point &rStartPt, const OUString &rStr, const long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, SalLayoutFlags flags=SalLayoutFlags::NONE, const SalLayoutGlyphs *pLayoutCache=nullptr)
 
long GetTextArray (const OUString &rStr, long *pDXAry, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
 
void GetCaretPositions (const OUString &, long *pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, const SalLayoutGlyphs *pGlyphs=nullptr) const
 
void DrawStretchText (const Point &rStartPt, sal_uLong nWidth, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1)
 
sal_Int32 GetTextBreak (const OUString &rStr, long nTextWidth, sal_Int32 nIndex, sal_Int32 nLen=-1, long nCharExtra=0, vcl::TextLayoutCache const *=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
 
sal_Int32 GetTextBreak (const OUString &rStr, long nTextWidth, sal_Unicode nExtraChar, sal_Int32 &rExtraCharPos, sal_Int32 nIndex, sal_Int32 nLen, long nCharExtra, vcl::TextLayoutCache const *=nullptr) const
 
FontMetric GetDevFont (int nDevFontIndex) const
 
int GetDevFontCount () const
 
bool IsFontAvailable (const OUString &rFontName) const
 
Size GetDevFontSize (const vcl::Font &rFont, int nSizeIndex) const
 
int GetDevFontSizeCount (const vcl::Font &) const
 
bool AddTempDevFont (const OUString &rFileURL, const OUString &rFontName)
 
void RefreshFontData (const bool bNewFontLists)
 
FontMetric GetFontMetric () const
 
FontMetric GetFontMetric (const vcl::Font &rFont) const
 
bool GetFontCharMap (FontCharMapRef &rxFontCharMap) const
 
bool GetFontCapabilities (vcl::FontCapabilities &rFontCapabilities) const
 
bool GetFontFeatures (std::vector< vcl::font::Feature > &rFontFeatures) const
 
SystemFontData GetSysFontData (int nFallbacklevel) const
 Retrieve detailed font information in platform independent structure. More...
 
SAL_DLLPRIVATE void ImplGetEmphasisMark (tools::PolyPolygon &rPolyPoly, bool &rPolyLine, tools::Rectangle &rRect1, tools::Rectangle &rRect2, long &rYOff, long &rWidth, FontEmphasisMark eEmphasis, long nHeight)
 
bool GetGlyphBoundRects (const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, MetricVector &rVector)
 
sal_Int32 HasGlyphs (const vcl::Font &rFont, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1) const
 
long GetMinKashida () const
 
sal_Int32 ValidateKashidas (const OUString &rTxt, sal_Int32 nIdx, sal_Int32 nLen, sal_Int32 nKashCount, const sal_Int32 *pKashidaPos, sal_Int32 *pKashidaPosDropped) const
 
SAL_DLLPRIVATE void ImplInitFontList () const
 
SAL_DLLPRIVATE void ImplUpdateFontData ()
 
void DrawBitmap (const Point &rDestPt, const Bitmap &rBitmap)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const Bitmap& rBitmap, MetaActionType nAction = MetaActionType::BMPSCALEPART) More...
 
void DrawBitmap (const Point &rDestPt, const Size &rDestSize, const Bitmap &rBitmap)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const Bitmap& rBitmap, MetaActionType nAction = MetaActionType::BMPSCALEPART) More...
 
void DrawBitmap (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, const Bitmap &rBitmap, MetaActionType nAction=MetaActionType::BMPSCALEPART)
 
void DrawBitmapEx (const Point &rDestPt, const BitmapEx &rBitmapEx)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const BitmapEx& rBitmapEx, MetaActionType nAction = MetaActionType::BMPEXSCALEPART) More...
 
void DrawBitmapEx (const Point &rDestPt, const Size &rDestSize, const BitmapEx &rBitmapEx)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPtPixel, const Size& rSecSizePixel, const BitmapEx& rBitmapEx, MetaActionType nAction = MetaActionType::BMPEXSCALEPART) More...
 
void DrawBitmapEx (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, const BitmapEx &rBitmapEx, MetaActionType nAction=MetaActionType::BMPEXSCALEPART)
 
void DrawImage (const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. virtual void DrawImage( const Point& rPos, const Size& rSize, const Image& rImage, sal_uInt16 nStyle = 0) More...
 
void DrawImage (const Point &rPos, const Size &rSize, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
 
BitmapEx GetBitmapEx (const Point &rSrcPt, const Size &rSize) const
 Query extended bitmap (with alpha channel, if available). More...
 
void DrawTransformedBitmapEx (const basegfx::B2DHomMatrix &rTransformation, const BitmapEx &rBitmapEx)
 Draw BitmapEx transformed. More...
 
void DrawShadowBitmapEx (const BitmapEx &rBitmapEx,::Color aShadowColor)
 
bool RemoveTransparenciesFromMetaFile (const GDIMetaFile &rInMtf, GDIMetaFile &rOutMtf, long nMaxBmpDPIX, long nMaxBmpDPIY, bool bReduceTransparency, bool bTransparencyAutoMode, bool bDownsampleBitmaps, const Color &rBackground=COL_TRANSPARENT)
 helper method removing transparencies from a metafile (e.g. More...
 
SAL_DLLPRIVATE void ImplPrintTransparent (const Bitmap &rBmp, const Bitmap &rMask, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel)
 
SAL_DLLPRIVATE Color ImplDrawModeToColor (const Color &rColor) const
 
void DrawTransparent (const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent)
 
void DrawTransparent (const basegfx::B2DHomMatrix &rObjectTransform, const basegfx::B2DPolyPolygon &rB2DPolyPoly, double fTransparency)
 
void DrawTransparent (const GDIMetaFile &rMtf, const Point &rPos, const Size &rSize, const Gradient &rTransparenceGradient)
 
void DrawMask (const Point &rDestPt, const Bitmap &rBitmap, const Color &rMaskColor)
 
void DrawMask (const Point &rDestPt, const Size &rDestSize, const Bitmap &rBitmap, const Color &rMaskColor)
 
void DrawMask (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, const Bitmap &rBitmap, const Color &rMaskColor, MetaActionType nAction)
 
void EnableMapMode (bool bEnable=true)
 
bool IsMapModeEnabled () const
 
void SetMapMode ()
 
virtual void SetMapMode (const MapMode &rNewMapMode)
 
void SetRelativeMapMode (const MapMode &rNewMapMode)
 
const MapModeGetMapMode () const
 
basegfx::B2DHomMatrix GetViewTransformation () const
 
basegfx::B2DHomMatrix GetInverseViewTransformation () const
 
basegfx::B2DHomMatrix GetViewTransformation (const MapMode &rMapMode) const
 
basegfx::B2DHomMatrix GetInverseViewTransformation (const MapMode &rMapMode) const
 
void SetPixelOffset (const Size &rOffset)
 Set an offset in pixel. More...
 
Size GetPixelOffset () const
 Get the offset in pixel. More...
 
Point LogicToPixel (const Point &rLogicPt) const
 
Size LogicToPixel (const Size &rLogicSize) const
 
tools::Rectangle LogicToPixel (const tools::Rectangle &rLogicRect) const
 
tools::Polygon LogicToPixel (const tools::Polygon &rLogicPoly) const
 
tools::PolyPolygon LogicToPixel (const tools::PolyPolygon &rLogicPolyPoly) const
 
basegfx::B2DPolyPolygon LogicToPixel (const basegfx::B2DPolyPolygon &rLogicPolyPoly) const
 
vcl::Region LogicToPixel (const vcl::Region &rLogicRegion) const
 
Point LogicToPixel (const Point &rLogicPt, const MapMode &rMapMode) const
 
Size LogicToPixel (const Size &rLogicSize, const MapMode &rMapMode) const
 
tools::Rectangle LogicToPixel (const tools::Rectangle &rLogicRect, const MapMode &rMapMode) const
 
tools::Polygon LogicToPixel (const tools::Polygon &rLogicPoly, const MapMode &rMapMode) const
 
basegfx::B2DPolyPolygon LogicToPixel (const basegfx::B2DPolyPolygon &rLogicPolyPoly, const MapMode &rMapMode) const
 
Point PixelToLogic (const Point &rDevicePt) const
 
Size PixelToLogic (const Size &rDeviceSize) const
 
tools::Rectangle PixelToLogic (const tools::Rectangle &rDeviceRect) const
 
tools::Polygon PixelToLogic (const tools::Polygon &rDevicePoly) const
 
tools::PolyPolygon PixelToLogic (const tools::PolyPolygon &rDevicePolyPoly) const
 
basegfx::B2DPolyPolygon PixelToLogic (const basegfx::B2DPolyPolygon &rDevicePolyPoly) const
 
vcl::Region PixelToLogic (const vcl::Region &rDeviceRegion) const
 
Point PixelToLogic (const Point &rDevicePt, const MapMode &rMapMode) const
 
Size PixelToLogic (const Size &rDeviceSize, const MapMode &rMapMode) const
 
tools::Rectangle PixelToLogic (const tools::Rectangle &rDeviceRect, const MapMode &rMapMode) const
 
tools::Polygon PixelToLogic (const tools::Polygon &rDevicePoly, const MapMode &rMapMode) const
 
basegfx::B2DPolygon PixelToLogic (const basegfx::B2DPolygon &rDevicePoly, const MapMode &rMapMode) const
 
basegfx::B2DPolyPolygon PixelToLogic (const basegfx::B2DPolyPolygon &rDevicePolyPoly, const MapMode &rMapMode) const
 
Point LogicToLogic (const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
 
Size LogicToLogic (const Size &rSzSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
 
tools::Rectangle LogicToLogic (const tools::Rectangle &rRectSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
 
SAL_DLLPRIVATE tools::Rectangle ImplLogicToDevicePixel (const tools::Rectangle &rLogicRect) const
 Convert a logical rectangle to a rectangle in physical device pixel units. More...
 
SAL_DLLPRIVATE Point ImplLogicToDevicePixel (const Point &rLogicPt) const
 Convert a logical point to a physical point on the device. More...
 
SAL_DLLPRIVATE long ImplLogicWidthToDevicePixel (long nWidth) const
 Convert a logical width to a width in units of device pixels. More...
 
SAL_DLLPRIVATE DeviceCoordinate LogicWidthToDeviceCoordinate (long nWidth) const
 
SAL_DLLPRIVATE long ImplLogicXToDevicePixel (long nX) const
 Convert a logical X coordinate to a device pixel's X coordinate. More...
 
SAL_DLLPRIVATE long ImplLogicYToDevicePixel (long nY) const
 Convert a logical Y coordinate to a device pixel's Y coordinate. More...
 
SAL_DLLPRIVATE long ImplLogicHeightToDevicePixel (long nHeight) const
 Convert a logical height to a height in units of device pixels. More...
 
SAL_DLLPRIVATE long ImplDevicePixelToLogicWidth (long nWidth) const
 Convert device pixels to a width in logical units. More...
 
SAL_DLLPRIVATE long ImplDevicePixelToLogicHeight (long nHeight) const
 Convert device pixels to a height in logical units. More...
 
SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel (float fLogicHeight) const
 Convert logical height to device pixels, with exact sub-pixel value. More...
 
SAL_DLLPRIVATE Size ImplLogicToDevicePixel (const Size &rLogicSize) const
 Convert a logical size to the size on the physical device. More...
 
SAL_DLLPRIVATE tools::Rectangle ImplDevicePixelToLogic (const tools::Rectangle &rPixelRect) const
 Convert a rectangle in physical pixel units to a rectangle in physical pixel units and coords. More...
 
SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel (const tools::Polygon &rLogicPoly) const
 Convert a logical polygon to a polygon in physical device pixel units. More...
 
SAL_DLLPRIVATE tools::PolyPolygon ImplLogicToDevicePixel (const tools::PolyPolygon &rLogicPolyPoly) const
 Convert a logical polypolygon to a polypolygon in physical device pixel units. More...
 
SAL_DLLPRIVATE LineInfo ImplLogicToDevicePixel (const LineInfo &rLineInfo) const
 Convert a line in logical units to a line in physical device pixel units. More...
 
SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel (const vcl::Region &rRegion) const
 Convert a region in pixel units to a region in device pixel units and coords. More...
 
SAL_DLLPRIVATE void ImplInvalidateViewTransform ()
 Invalidate the view transformation. More...
 
SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation () const
 Get device transformation. More...
 
- Public Member Functions inherited from VclReferenceBase
void acquire () const
 
void release () const
 
sal_Int32 getRefCount () const
 
void disposeOnce ()
 
bool isDisposed () const
 

Static Public Member Functions

static const std::vector< OUString > & GetPrinterQueues ()
 
static const QueueInfoGetQueueInfo (const OUString &rPrinterName, bool bStatusUpdate)
 
static OUString GetDefaultPrinterName ()
 
static OUString GetPaperName (Paper ePaper)
 
static void updatePrinters ()
 Checks the printer list and updates it necessary. More...
 
static void PrintJob (const std::shared_ptr< vcl::PrinterController > &i_pController, const JobSetup &i_rInitSetup)
 Execute a print job. More...
 
static bool PreparePrintJob (std::shared_ptr< vcl::PrinterController > i_pController, const JobSetup &i_rInitSetup)
 
static bool ExecutePrintJob (const std::shared_ptr< vcl::PrinterController > &i_pController)
 
static void FinishPrintJob (const std::shared_ptr< vcl::PrinterController > &i_pController)
 
static void VCL_DLLPRIVATE ImplPrintJob (const std::shared_ptr< vcl::PrinterController > &i_pController, const JobSetup &i_rInitSetup)
 Implementation detail of PrintJob being asynchronous. More...
 
- Static Public Member Functions inherited from OutputDevice
static void ImplDrawText (OutputDevice &rTargetDevice, const tools::Rectangle &rRect, const OUString &rOrigStr, DrawTextFlags nStyle, MetricVector *pVector, OUString *pDisplayText, vcl::ITextLayout &_rLayout)
 
static OUString GetNonMnemonicString (const OUString &rStr, sal_Int32 &rMnemonicPos)
 
static OUString GetNonMnemonicString (const OUString &rStr)
 
static std::shared_ptr< vcl::TextLayoutCacheCreateTextLayoutCache (OUString const &)
 
static SAL_DLLPRIVATE FontEmphasisMark ImplGetEmphasisMarkStyle (const vcl::Font &rFont)
 
static void BeginFontSubstitution ()
 
static void EndFontSubstitution ()
 
static void AddFontSubstitute (const OUString &rFontName, const OUString &rReplaceFontName, AddFontSubstituteFlags nFlags)
 
static void RemoveFontsSubstitute ()
 
static vcl::Font GetDefaultFont (DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
 
static SAL_DLLPRIVATE void ImplClearAllFontData (bool bNewFontLists)
 
static SAL_DLLPRIVATE void ImplRefreshAllFontData (bool bNewFontLists)
 
static SAL_DLLPRIVATE void ImplUpdateAllFontData (bool bNewFontLists)
 
static void LockFontUpdates (bool bLock)
 
static Point LogicToLogic (const Point &rPtSource, const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 
static Size LogicToLogic (const Size &rSzSource, const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 
static tools::Rectangle LogicToLogic (const tools::Rectangle &rRectSource, const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 
static long LogicToLogic (long nLongSource, MapUnit eUnitSource, MapUnit eUnitDest)
 
static basegfx::B2DPolygon LogicToLogic (const basegfx::B2DPolygon &rPoly, const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 
static basegfx::B2DHomMatrix LogicToLogic (const MapMode &rMapModeSource, const MapMode &rMapModeDest)
 

Protected Member Functions

virtual bool AcquireGraphics () const override
 Acquire a graphics device that the output device uses to draw on. More...
 
virtual void ReleaseGraphics (bool bRelease=true) override
 Release the graphics device, and remove it from the graphics device list. More...
 
virtual void ImplReleaseFonts () override
 
virtual long GetGradientStepCount (long nMinRect) override
 
virtual bool UsePolyPolygonForComplexGradient () override
 
virtual void ClipAndDrawGradientMetafile (const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly) override
 
void ScaleBitmap (Bitmap &, SalTwoRect &) override
 
vcl::Region ClipToDeviceBounds (vcl::Region aRegion) const override
 Perform actual rect clip against outdev dimensions, to generate empty clips whenever one of the values is completely off the device. More...
 
virtual void DrawDeviceMask (const Bitmap &rMask, const Color &rMaskColor, const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel) override
 
bool DrawTransformBitmapExDirect (const basegfx::B2DHomMatrix &aFullTransform, const BitmapEx &rBitmapEx) override
 Transform and draw a bitmap directly. More...
 
bool TransformAndReduceBitmapExToTargetRange (const basegfx::B2DHomMatrix &aFullTransform, basegfx::B2DRange &aVisibleRange, double &fMaximumArea) override
 Transform and reduce the area that needs to be drawn of the bitmap and return the new visible range and the maximum area. More...
 
void DrawDeviceBitmap (const Point &rDestPt, const Size &rDestSize, const Point &rSrcPtPixel, const Size &rSrcSizePixel, BitmapEx &rBitmapEx) override
 
virtual void EmulateDrawTransparent (const tools::PolyPolygon &rPolyPoly, sal_uInt16 nTransparencePercent) override
 
virtual void SetFontOrientation (LogicalFontInstance *const pFontInstance) const override
 
- Protected Member Functions inherited from OutputDevice
 OutputDevice (OutDevType eOutDevType)
 
virtual ~OutputDevice () override
 
virtual void CopyDeviceArea (SalTwoRect &aPosAry, bool bWindowInvalidate)
 
SAL_DLLPRIVATE void drawOutDevDirect (const OutputDevice *pSrcDev, SalTwoRect &rPosAry)
 
SAL_DLLPRIVATE bool is_double_buffered_window () const
 
virtual void InitClipRegion ()
 
virtual void ClipToPaintRegion (tools::Rectangle &rDstRect)
 
virtual void DrawHatchLine_DrawLine (const Point &rStartPoint, const Point &rEndPoint)
 
void DrawGradientWallpaper (long nX, long nY, long nWidth, long nHeight, const Wallpaper &rWallpaper)
 
SAL_DLLPRIVATE void ImplInitTextLineSize ()
 
SAL_DLLPRIVATE void ImplInitAboveTextLineSize ()
 
SAL_DLLPRIVATE const LogicalFontInstanceGetFontInstance () const
 
SAL_DLLPRIVATE long GetEmphasisAscent () const
 
SAL_DLLPRIVATE long GetEmphasisDescent () const
 
SAL_DLLPRIVATE bool InitFont () const
 
virtual long GetFontExtLeading () const
 
virtual void ImplClearFontData (bool bNewFontLists)
 
virtual void ImplRefreshFontData (bool bNewFontLists)
 
void ReleaseFontCache ()
 
void ReleaseFontCollection ()
 
void SetFontCollectionFromSVData ()
 
void ResetNewFontCache ()
 
void DrawInvisiblePolygon (const tools::PolyPolygon &rPolyPoly)
 
- Protected Member Functions inherited from VclReferenceBase
 VclReferenceBase ()
 
virtual ~VclReferenceBase ()
 

Private Member Functions

VCL_DLLPRIVATE void ImplInitData ()
 
VCL_DLLPRIVATE void ImplInit (SalPrinterQueueInfo *pInfo)
 
VCL_DLLPRIVATE void ImplInitDisplay ()
 
VCL_DLLPRIVATE void ImplUpdatePageData ()
 
VCL_DLLPRIVATE void ImplUpdateFontList ()
 
VCL_DLLPRIVATE void ImplFindPaperFormatForUserSize (JobSetup &, bool bMatchNearest)
 
VCL_DLLPRIVATE bool StartJob (const OUString &rJobName, std::shared_ptr< vcl::PrinterController > const &)
 
VCL_DLLPRIVATE void EndJob ()
 
 Printer (const Printer &rPrinter)=delete
 
Printeroperator= (const Printer &rPrinter)=delete
 

Static Private Member Functions

static VCL_DLLPRIVATE SalPrinterQueueInfoImplGetQueueInfo (const OUString &rPrinterName, const OUString *pDriver)
 
static VCL_DLLPRIVATE ErrCode ImplSalPrinterErrorCodeToVCL (SalPrinterError nError)
 

Private Attributes

SalInfoPrintermpInfoPrinter
 
std::unique_ptr< SalPrintermpPrinter
 
SalGraphicsmpJobGraphics
 
VclPtr< PrintermpPrev
 
VclPtr< PrintermpNext
 
VclPtr< VirtualDevicempDisplayDev
 
std::unique_ptr< PrinterOptionsmpPrinterOptions
 
OUString maPrinterName
 
OUString maDriver
 
OUString maPrintFile
 
JobSetup maJobSetup
 
Point maPageOffset
 
Size maPaperSize
 
ErrCode mnError
 
sal_uInt16 mnPageQueueSize
 
sal_uInt16 mnCopyCount
 
bool mbDefPrinter
 
bool mbPrinting
 
bool mbJobActive
 
bool mbCollateCopy
 
bool mbPrintFile
 
bool mbInPrintPage
 
bool mbNewJobSetup
 

Friends

class ::OutputDevice
 

Additional Inherited Members

- Static Protected Member Functions inherited from OutputDevice
static SAL_DLLPRIVATE long ImplGetTextLines (ImplMultiTextLineInfo &rLineInfo, long nWidth, const OUString &rStr, DrawTextFlags nStyle, const vcl::ITextLayout &_rLayout)
 

Detailed Description

Definition at line 173 of file print.hxx.

Constructor & Destructor Documentation

Printer::Printer ( const Printer rPrinter)
privatedelete
Printer::Printer ( )
Printer::Printer ( const JobSetup rJobSetup)
Printer::Printer ( const QueueInfo rQueueInfo)
Printer::Printer ( const OUString &  rPrinterName)

Definition at line 888 of file print.cxx.

References ImplGetQueueInfo(), ImplInit(), ImplInitData(), and ImplInitDisplay().

Printer::~Printer ( )
overridevirtual

Definition at line 899 of file print.cxx.

References VclReferenceBase::disposeOnce().

Member Function Documentation

bool Printer::AcquireGraphics ( ) const
overrideprotectedvirtual

Acquire a graphics device that the output device uses to draw on.

There is an LRU of OutputDevices that is used to get the graphics. The actual creation of a SalGraphics instance is done via the SalFrame implementation.

However, the SalFrame instance will only return a valid SalGraphics instance if it is not in use or there wasn't one in the first place. When this happens, AcquireGraphics finds the least recently used OutputDevice in a different frame and "steals" it (releases it then starts using it).

If there are no frames to steal an OutputDevice's SalGraphics instance from then it blocks until the graphics is released.

Once it has acquired a graphics instance, then we add the OutputDevice to the LRU.

Returns
true if was able to initialize the graphics device, false otherwise.

Implements OutputDevice.

Definition at line 475 of file print.cxx.

References SalInfoPrinter::AcquireGraphics(), DBG_TESTSOLARMUTEX, EnableB2dDraw, ImplGetSVData(), Invert, ImplSVData::maGDIData, OutputDevice::mbInitClipRegion, OutputDevice::mbInitFillColor, OutputDevice::mbInitFont, OutputDevice::mbInitLineColor, OutputDevice::mbInitTextColor, OutputDevice::meRasterOp, OutputDevice::mnAntialiasing, mpDisplayDev, ImplSVGDIData::mpFirstPrnGraphics, ImplSVGDIData::mpFirstVirGraphics, OutputDevice::mpGraphics, mpInfoPrinter, mpJobGraphics, ImplSVGDIData::mpLastPrnGraphics, ImplSVGDIData::mpLastVirGraphics, OutputDevice::mpNextGraphics, OutputDevice::mpPrevGraphics, VirtualDevice::mpVirDev, OutputDevice::ReleaseGraphics(), SalGraphics::setAntiAliasB2DDraw(), SalGraphics::SetXORMode(), and Xor.

Referenced by ImplInit(), and ImplUpdatePageData().

void Printer::ClipAndDrawGradientMetafile ( const Gradient rGradient,
const tools::PolyPolygon rPolyPoly 
)
overrideprotectedvirtual
vcl::Region Printer::ClipToDeviceBounds ( vcl::Region  aRegion) const
overrideprotectedvirtual

Perform actual rect clip against outdev dimensions, to generate empty clips whenever one of the values is completely off the device.

Parameters
aRegionregion to be clipped to the device dimensions
Returns
region clipped to the device bounds

Reimplemented from OutputDevice.

Definition at line 1671 of file print.cxx.

void Printer::CopyArea ( const Point rDestPt,
const Point rSrcPt,
const Size rSrcSize,
bool  bWindowInvalidate = false 
)
overridevirtual

Reimplemented from OutputDevice.

Definition at line 312 of file print.cxx.

References SAL_WARN.

void Printer::dispose ( void  )
overridevirtual
void Printer::DrawDeviceBitmap ( const Point rDestPt,
const Size rDestSize,
const Point rSrcPtPixel,
const Size rSrcSizePixel,
BitmapEx rBitmapEx 
)
overrideprotectedvirtual
void Printer::DrawDeviceMask ( const Bitmap rMask,
const Color rMaskColor,
const Point rDestPt,
const Size rDestSize,
const Point rSrcPtPixel,
const Size rSrcSizePixel 
)
overrideprotectedvirtual
void Printer::DrawGradientEx ( OutputDevice pOut,
const tools::Rectangle rRect,
const Gradient rGradient 
)
void Printer::DrawOutDev ( const Point rDestPt,
const Size rDestSize,
const Point rSrcPt,
const Size rSrcSize 
)
overridevirtual

Reimplemented from OutputDevice.

Definition at line 299 of file print.cxx.

References SAL_WARN.

void Printer::DrawOutDev ( const Point rDestPt,
const Size rDestSize,
const Point rSrcPt,
const Size rSrcSize,
const OutputDevice rOutDev 
)
overridevirtual

Reimplemented from OutputDevice.

Definition at line 305 of file print.cxx.

References SAL_WARN.

bool Printer::DrawTransformBitmapExDirect ( const basegfx::B2DHomMatrix aFullTransform,
const BitmapEx rBitmapEx 
)
overrideprotectedvirtual

Transform and draw a bitmap directly.

Parameters
aFullTransformThe B2DHomMatrix used for the transformation
rBitmapExReference to the bitmap to be transformed and drawn
Returns
true if it was able to draw the bitmap, false if not

Reimplemented from OutputDevice.

Definition at line 183 of file print.cxx.

void Printer::EmulateDrawTransparent ( const tools::PolyPolygon rPolyPoly,
sal_uInt16  nTransparencePercent 
)
overrideprotectedvirtual
void Printer::EndJob ( )
private
bool Printer::ExecutePrintJob ( const std::shared_ptr< vcl::PrinterController > &  i_pController)
static

Definition at line 520 of file print3.cxx.

void Printer::FinishPrintJob ( const std::shared_ptr< vcl::PrinterController > &  i_pController)
static

Definition at line 530 of file print3.cxx.

Color Printer::GetBackgroundColor ( ) const
inlineoverridevirtual

Reimplemented from OutputDevice.

Definition at line 292 of file print.hxx.

References COL_WHITE().

Bitmap Printer::GetBitmap ( const Point rSrcPt,
const Size rSize 
) const
overridevirtual

Reimplemented from OutputDevice.

Definition at line 1676 of file print.cxx.

References OutputDevice::GetBitmap(), and SAL_WARN.

sal_uInt32 Printer::GetCapabilities ( PrinterCapType  nType) const
sal_uInt16 Printer::GetCopyCount ( ) const
inline

Definition at line 335 of file print.hxx.

OUString Printer::GetDefaultPrinterName ( )
static
const OUString& Printer::GetDriverName ( ) const
inline

Definition at line 277 of file print.hxx.

Referenced by SetPrinterProps().

DuplexMode Printer::GetDuplexMode ( ) const
long Printer::GetGradientStepCount ( long  nMinRect)
overrideprotectedvirtual

Reimplemented from OutputDevice.

Definition at line 832 of file print.cxx.

const JobSetup& Printer::GetJobSetup ( ) const
inline

Definition at line 286 of file print.hxx.

Referenced by SetPrinterProps().

const OUString& Printer::GetName ( ) const
inline

Definition at line 276 of file print.hxx.

Referenced by vcl::PrinterController::setPrinter(), and SetPrinterProps().

Orientation Printer::GetOrientation ( ) const
Point Printer::GetPageOffset ( ) const
inline

Definition at line 332 of file print.hxx.

References OutputDevice::PixelToLogic().

const Point& Printer::GetPageOffsetPixel ( ) const
inline

Definition at line 331 of file print.hxx.

Referenced by OutputDevice::RemoveTransparenciesFromMetaFile().

Paper Printer::GetPaper ( ) const

Definition at line 1501 of file print.cxx.

References ImplJobSetup::GetPaperFormat(), JobSetup::ImplGetConstData(), and maJobSetup.

Referenced by IMPL_LINK().

sal_uInt16 Printer::GetPaperBin ( ) const
sal_uInt16 Printer::GetPaperBinCount ( ) const
OUString Printer::GetPaperBinName ( sal_uInt16  nPaperBin) const
const PaperInfo & Printer::GetPaperInfo ( int  nPaper) const
int Printer::GetPaperInfoCount ( ) const
OUString Printer::GetPaperName ( Paper  ePaper)
static
Size Printer::GetPaperSize ( ) const
inline

Definition at line 329 of file print.hxx.

References OutputDevice::PixelToLogic().

Referenced by vcl::PrinterController::setupPrinter().

Size Printer::GetPaperSize ( int  nPaper)
const Size& Printer::GetPaperSizePixel ( ) const
inline

Definition at line 328 of file print.hxx.

Referenced by OutputDevice::RemoveTransparenciesFromMetaFile().

const PrinterOptions& Printer::GetPrinterOptions ( ) const
inline

Definition at line 302 of file print.hxx.

Referenced by DrawGradientEx().

const std::vector< OUString > & Printer::GetPrinterQueues ( )
static
bool Printer::GetPrinterSettingsPreferred ( ) const
const QueueInfo * Printer::GetQueueInfo ( const OUString &  rPrinterName,
bool  bStatusUpdate 
)
static
bool Printer::HasMirroredGraphics ( ) const
overridevirtual

Reimplemented from OutputDevice.

Definition at line 324 of file print.cxx.

bool Printer::HasSupport ( PrinterSupport  eFeature) const
void Printer::ImplEndPage ( )
void Printer::ImplFindPaperFormatForUserSize ( JobSetup aJobSetup,
bool  bMatchNearest 
)
private
SalPrinterQueueInfo * Printer::ImplGetQueueInfo ( const OUString &  rPrinterName,
const OUString *  pDriver 
)
staticprivate
void Printer::ImplInit ( SalPrinterQueueInfo pInfo)
private
void Printer::ImplInitData ( )
private
void Printer::ImplInitDisplay ( )
private
void Printer::ImplPrintJob ( const std::shared_ptr< vcl::PrinterController > &  i_pController,
const JobSetup i_rInitSetup 
)
static

Implementation detail of PrintJob being asynchronous.

not exported, not usable outside vcl

Definition at line 536 of file print3.cxx.

Referenced by IMPL_LINK_NOARG().

void Printer::ImplReleaseFonts ( )
overrideprotectedvirtual
ErrCode Printer::ImplSalPrinterErrorCodeToVCL ( SalPrinterError  nError)
staticprivate

Definition at line 1531 of file print.cxx.

References Abort, ERRCODE_NONE, NONE, PRINTER_ABORT, and PRINTER_GENERALERROR.

void Printer::ImplStartPage ( )
void Printer::ImplUpdateFontList ( )
private
void Printer::ImplUpdatePageData ( )
private
bool Printer::IsCollateCopy ( ) const
inline

Definition at line 336 of file print.hxx.

bool Printer::IsDefPrinter ( ) const
inline

Definition at line 278 of file print.hxx.

bool Printer::IsDisplayPrinter ( ) const
inline
bool Printer::IsJobActive ( ) const
inline

Definition at line 340 of file print.hxx.

Referenced by dispose(), EndJob(), ImplEndPage(), ImplStartPage(), SetPrinterProps(), and Setup().

bool Printer::IsPrinting ( ) const
inline

Definition at line 338 of file print.hxx.

Referenced by dispose(), SetPrinterProps(), and Setup().

bool Printer::IsValid ( ) const
inline

Definition at line 280 of file print.hxx.

Printer& Printer::operator= ( const Printer rPrinter)
privatedelete
bool Printer::PreparePrintJob ( std::shared_ptr< vcl::PrinterController i_pController,
const JobSetup i_rInitSetup 
)
static
void Printer::PrintJob ( const std::shared_ptr< vcl::PrinterController > &  i_pController,
const JobSetup i_rInitSetup 
)
static

Execute a print job.

starts a print job asynchronously that is will return

Definition at line 294 of file print3.cxx.

References LINK, and Application::PostUserEvent().

void Printer::ReleaseGraphics ( bool  bRelease = true)
overrideprotectedvirtual
void Printer::ScaleBitmap ( Bitmap ,
SalTwoRect  
)
inlineoverrideprotectedvirtual

Reimplemented from OutputDevice.

Definition at line 235 of file print.hxx.

void Printer::SetCopyCount ( sal_uInt16  nCopy,
bool  bCollate 
)

Definition at line 1525 of file print.cxx.

References mbCollateCopy, and mnCopyCount.

void Printer::SetDuplexMode ( DuplexMode  eDuplex)
void Printer::SetFontOrientation ( LogicalFontInstance *const  pFontInstance) const
overrideprotectedvirtual
bool Printer::SetJobSetup ( const JobSetup rSetup)
bool Printer::SetOrientation ( Orientation  eOrient)
void Printer::SetPaper ( Paper  ePaper)
bool Printer::SetPaperBin ( sal_uInt16  nPaperBin)
bool Printer::SetPaperSizeUser ( const Size rSize)

Definition at line 1347 of file print.cxx.

Referenced by IMPL_LINK(), and vcl::PrinterController::setupPrinter().

bool Printer::SetPaperSizeUser ( const Size rSize,
bool  bMatchNearest 
)
void Printer::SetPrinterOptions ( const PrinterOptions rOptions)

SetPrinterOptions is used internally only now.

in earlier times it was used only to set the options loaded directly from the configuration in SfxPrinter::InitJob, this is now handled internally should the need arise to set the printer options outside vcl, also a method would have to be devised to not override these again internally

Definition at line 319 of file print.cxx.

References mpPrinterOptions.

bool Printer::SetPrinterProps ( const Printer pPrinter)
void Printer::SetPrinterSettingsPreferred ( bool  bPaperSizeFromSetup)
bool Printer::Setup ( weld::Window pWindow,
PrinterSetupMode  eMode = PrinterSetupMode::DocumentGlobal 
)
bool Printer::StartJob ( const OUString &  rJobName,
std::shared_ptr< vcl::PrinterController > const &   
)
private
bool Printer::TransformAndReduceBitmapExToTargetRange ( const basegfx::B2DHomMatrix aFullTransform,
basegfx::B2DRange aVisibleRange,
double &  fMaximumArea 
)
overrideprotectedvirtual

Transform and reduce the area that needs to be drawn of the bitmap and return the new visible range and the maximum area.

Parameters
aFullTransformB2DHomMatrix used for transformation
aVisibleRangeThe new visible area of the bitmap
fMaximumAreaThe maximum area of the bitmap
Returns
true if there is an area to be drawn, otherwise nothing is left to be drawn so return false

Reimplemented from OutputDevice.

Definition at line 191 of file print.cxx.

void Printer::updatePrinters ( )
static
bool Printer::UsePolyPolygonForComplexGradient ( )
overrideprotectedvirtual

Implements OutputDevice.

Definition at line 1651 of file print.cxx.

Friends And Related Function Documentation

friend class ::OutputDevice
friend

Definition at line 175 of file print.hxx.

Member Data Documentation

OUString Printer::maDriver
private

Definition at line 186 of file print.hxx.

Referenced by QueueInfo::GetDriver(), and ImplInit().

JobSetup Printer::maJobSetup
private
Point Printer::maPageOffset
private

Definition at line 189 of file print.hxx.

Referenced by ImplUpdatePageData().

Size Printer::maPaperSize
private

Definition at line 190 of file print.hxx.

Referenced by ImplUpdatePageData().

OUString Printer::maPrinterName
private

Definition at line 185 of file print.hxx.

Referenced by QueueInfo::GetPrinterName(), and ImplInit().

OUString Printer::maPrintFile
private

Definition at line 187 of file print.hxx.

Referenced by SetPrinterProps().

bool Printer::mbCollateCopy
private

Definition at line 197 of file print.hxx.

Referenced by ImplInitData(), SetCopyCount(), and SetPrinterProps().

bool Printer::mbDefPrinter
private

Definition at line 194 of file print.hxx.

Referenced by ImplInitData(), Printer(), and SetPrinterProps().

bool Printer::mbInPrintPage
private
bool Printer::mbJobActive
private

Definition at line 196 of file print.hxx.

Referenced by EndJob(), and ImplInitData().

bool Printer::mbNewJobSetup
private
bool Printer::mbPrintFile
private

Definition at line 198 of file print.hxx.

Referenced by ImplInitData(), and SetPrinterProps().

bool Printer::mbPrinting
private

Definition at line 195 of file print.hxx.

Referenced by EndJob(), and ImplInitData().

sal_uInt16 Printer::mnCopyCount
private

Definition at line 193 of file print.hxx.

Referenced by ImplInitData(), SetCopyCount(), and SetPrinterProps().

ErrCode Printer::mnError
private

Definition at line 191 of file print.hxx.

Referenced by ImplInitData().

sal_uInt16 Printer::mnPageQueueSize
private

Definition at line 192 of file print.hxx.

Referenced by ImplInitData(), and SetPrinterProps().

VclPtr<VirtualDevice> Printer::mpDisplayDev
private
SalInfoPrinter* Printer::mpInfoPrinter
private
SalGraphics* Printer::mpJobGraphics
private
VclPtr<Printer> Printer::mpNext
private

Definition at line 182 of file print.hxx.

Referenced by dispose(), ImplInitData(), and OutputDevice::ImplUpdateFontDataForAllFrames().

VclPtr<Printer> Printer::mpPrev
private

Definition at line 181 of file print.hxx.

Referenced by dispose(), and ImplInitData().

std::unique_ptr<SalPrinter> Printer::mpPrinter
private

Definition at line 179 of file print.hxx.

Referenced by EndJob(), ImplEndPage(), ImplInit(), ImplInitData(), ImplInitDisplay(), and ImplStartPage().

std::unique_ptr<PrinterOptions> Printer::mpPrinterOptions
private

Definition at line 184 of file print.hxx.

Referenced by dispose(), ImplInitData(), SetPrinterOptions(), and SetPrinterProps().


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