1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_OUTDEV_HXX
21 #define INCLUDED_VCL_OUTDEV_HXX
23 #include <tools/gen.hxx>
24 #include <tools/solar.h>
25 #include <tools/rc.hxx>
26 #include <tools/color.hxx>
27 #include <tools/poly.hxx>
29 #include <vcl/dllapi.h>
30 #include <vcl/font.hxx>
31 #include <vcl/region.hxx>
32 #include <vcl/mapmod.hxx>
33 #include <vcl/wall.hxx>
34 #include <vcl/metaact.hxx>
35 #include <vcl/salnativewidgets.hxx>
36 #include <vcl/outdevstate.hxx>
37 #include <vcl/outdevmap.hxx>
39 #include <basegfx/vector/b2enums.hxx>
40 #include <basegfx/polygon/b2dpolypolygon.hxx>
42 #include <unotools/fontdefs.hxx>
44 #include <boost/scoped_ptr.hpp>
46 # //some problem with MacOSX and a check define
49 #include <boost/ptr_container/ptr_deque.hpp>
51 #include <com/sun/star/drawing/LineCap.hpp>
52 #include <com/sun/star/uno/Reference.h>
58 #define GLYPH_FONT_HEIGHT 128
60 #define GLYPH_FONT_HEIGHT 256
63 #define META_BMPSCALEPART_ACTION (118)
64 #define META_BMPEXSCALEPART_ACTION (121)
66 struct ImplOutDevData
;
69 struct SystemGraphicsData
;
70 struct SystemFontData
;
71 struct SystemTextLayoutData
;
73 class PhysicalFontCollection
;
74 class ImplGetDevFontList
;
75 class ImplGetDevSizeList
;
76 class ImplMultiTextLineInfo
;
82 class BitmapReadAccess
;
96 class ImplFontAttributes
;
104 namespace rendering
{
110 class B2DPolyPolygon
;
120 typedef std::vector
< Rectangle
> MetricVector
;
127 struct FontCapabilities
;
130 // OutputDevice-Types
132 // Flags for DrawText()
133 #define TEXT_DRAW_DISABLE ((sal_uInt16)0x0001)
134 #define TEXT_DRAW_MNEMONIC ((sal_uInt16)0x0002)
135 #define TEXT_DRAW_MONO ((sal_uInt16)0x0004)
136 #define TEXT_DRAW_CLIP ((sal_uInt16)0x0008)
137 #define TEXT_DRAW_LEFT ((sal_uInt16)0x0010)
138 #define TEXT_DRAW_CENTER ((sal_uInt16)0x0020)
139 #define TEXT_DRAW_RIGHT ((sal_uInt16)0x0040)
140 #define TEXT_DRAW_TOP ((sal_uInt16)0x0080)
141 #define TEXT_DRAW_VCENTER ((sal_uInt16)0x0100)
142 #define TEXT_DRAW_BOTTOM ((sal_uInt16)0x0200)
143 #define TEXT_DRAW_ENDELLIPSIS ((sal_uInt16)0x0400)
144 #define TEXT_DRAW_PATHELLIPSIS ((sal_uInt16)0x0800)
145 #define TEXT_DRAW_MULTILINE ((sal_uInt16)0x1000)
146 #define TEXT_DRAW_WORDBREAK ((sal_uInt16)0x2000)
147 #define TEXT_DRAW_NEWSELLIPSIS ((sal_uInt16)0x4000)
148 // in the long run we should make text style flags longer
149 // but at the moment we can get away with this 2 bit field for ellipsis style
150 #define TEXT_DRAW_CENTERELLIPSIS (TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_PATHELLIPSIS)
152 #define TEXT_DRAW_WORDBREAK_HYPHENATION (((sal_uInt16)0x8000) | TEXT_DRAW_WORDBREAK)
154 // Flags for CopyArea()
155 #define COPYAREA_WINDOWINVALIDATE ((sal_uInt16)0x0001)
157 // Flags for DrawImage()
158 #define IMAGE_DRAW_DISABLE ((sal_uInt16)0x0001)
159 #define IMAGE_DRAW_HIGHLIGHT ((sal_uInt16)0x0002)
160 #define IMAGE_DRAW_DEACTIVE ((sal_uInt16)0x0004)
161 #define IMAGE_DRAW_COLORTRANSFORM ((sal_uInt16)0x0008)
162 #define IMAGE_DRAW_SEMITRANSPARENT ((sal_uInt16)0x0010)
165 #define GRID_DOTS ((sal_uLong)0x00000001)
166 #define GRID_HORZLINES ((sal_uLong)0x00000002)
167 #define GRID_VERTLINES ((sal_uLong)0x00000004)
168 #define GRID_LINES (GRID_HORZLINES | GRID_VERTLINES)
170 // LayoutModes for Complex Text Layout
171 #define TEXT_LAYOUT_DEFAULT ((sal_uLong)0x00000000)
172 #define TEXT_LAYOUT_BIDI_LTR ((sal_uLong)0x00000000)
173 #define TEXT_LAYOUT_BIDI_RTL ((sal_uLong)0x00000001)
174 #define TEXT_LAYOUT_BIDI_STRONG ((sal_uLong)0x00000002)
175 #define TEXT_LAYOUT_TEXTORIGIN_LEFT ((sal_uLong)0x00000004)
176 #define TEXT_LAYOUT_TEXTORIGIN_RIGHT ((sal_uLong)0x00000008)
177 #define TEXT_LAYOUT_COMPLEX_DISABLED ((sal_uLong)0x00000100)
178 #define TEXT_LAYOUT_ENABLE_LIGATURES ((sal_uLong)0x00000200)
179 #define TEXT_LAYOUT_SUBSTITUTE_DIGITS ((sal_uLong)0x00000400)
182 #define DRAWMODE_DEFAULT ((sal_uLong)0x00000000)
183 #define DRAWMODE_BLACKLINE ((sal_uLong)0x00000001)
184 #define DRAWMODE_BLACKFILL ((sal_uLong)0x00000002)
185 #define DRAWMODE_BLACKTEXT ((sal_uLong)0x00000004)
186 #define DRAWMODE_BLACKBITMAP ((sal_uLong)0x00000008)
187 #define DRAWMODE_BLACKGRADIENT ((sal_uLong)0x00000010)
188 #define DRAWMODE_GRAYLINE ((sal_uLong)0x00000020)
189 #define DRAWMODE_GRAYFILL ((sal_uLong)0x00000040)
190 #define DRAWMODE_GRAYTEXT ((sal_uLong)0x00000080)
191 #define DRAWMODE_GRAYBITMAP ((sal_uLong)0x00000100)
192 #define DRAWMODE_GRAYGRADIENT ((sal_uLong)0x00000200)
193 #define DRAWMODE_NOFILL ((sal_uLong)0x00000400)
194 #define DRAWMODE_NOBITMAP ((sal_uLong)0x00000800)
195 #define DRAWMODE_NOGRADIENT ((sal_uLong)0x00001000)
196 #define DRAWMODE_GHOSTEDLINE ((sal_uLong)0x00002000)
197 #define DRAWMODE_GHOSTEDFILL ((sal_uLong)0x00004000)
198 #define DRAWMODE_GHOSTEDTEXT ((sal_uLong)0x00008000)
199 #define DRAWMODE_GHOSTEDBITMAP ((sal_uLong)0x00010000)
200 #define DRAWMODE_GHOSTEDGRADIENT ((sal_uLong)0x00020000)
201 #define DRAWMODE_WHITELINE ((sal_uLong)0x00100000)
202 #define DRAWMODE_WHITEFILL ((sal_uLong)0x00200000)
203 #define DRAWMODE_WHITETEXT ((sal_uLong)0x00400000)
204 #define DRAWMODE_WHITEBITMAP ((sal_uLong)0x00800000)
205 #define DRAWMODE_WHITEGRADIENT ((sal_uLong)0x01000000)
206 #define DRAWMODE_SETTINGSLINE ((sal_uLong)0x02000000)
207 #define DRAWMODE_SETTINGSFILL ((sal_uLong)0x04000000)
208 #define DRAWMODE_SETTINGSTEXT ((sal_uLong)0x08000000)
209 #define DRAWMODE_SETTINGSGRADIENT ((sal_uLong)0x10000000)
210 #define DRAWMODE_NOTRANSPARENCY ((sal_uLong)0x80000000)
213 #define ANTIALIASING_DISABLE_TEXT ((sal_uInt16)0x0001)
214 #define ANTIALIASING_ENABLE_B2DDRAW ((sal_uInt16)0x0002)
215 #define ANTIALIASING_PIXELSNAPHAIRLINE ((sal_uInt16)0x0004)
218 #define FONT_SUBSTITUTE_ALWAYS ((sal_uInt16)0x0001)
219 #define FONT_SUBSTITUTE_SCREENONLY ((sal_uInt16)0x0002)
221 #define DEFAULTFONT_FLAGS_ONLYONE ((sal_uLong)0x00000001)
223 enum OutDevType
{ OUTDEV_DONTKNOW
, OUTDEV_WINDOW
, OUTDEV_PRINTER
, OUTDEV_VIRDEV
};
225 enum OutDevViewType
{ OUTDEV_VIEWTYPE_DONTKNOW
, OUTDEV_VIEWTYPE_PRINTPREVIEW
, OUTDEV_VIEWTYPE_SLIDESHOW
};
231 class FontSelectPattern
;
232 class ImplFontMetricData
;
235 typedef ::std::vector
< VCLXGraphics
* > VCLXGraphicsList_impl
;
237 sal_uLong
AdjustTwoRect( SalTwoRect
& rTwoRect
, const Size
& rSizePix
);
238 void AdjustTwoRect( SalTwoRect
& rTwoRect
, const Rectangle
& rValidSrcRect
);
240 extern const sal_uLong nVCLRLut
[ 6 ];
241 extern const sal_uLong nVCLGLut
[ 6 ];
242 extern const sal_uLong nVCLBLut
[ 6 ];
243 extern const sal_uLong nVCLDitherLut
[ 256 ];
244 extern const sal_uLong nVCLLut
[ 256 ];
246 class VCL_DLLPUBLIC OutputDevice
248 friend class Application
;
250 friend class ImplImageBmp
;
251 friend class Printer
;
253 friend class VirtualDevice
;
255 friend class WorkWindow
;
256 friend class vcl::PDFWriterImpl
;
257 friend void ImplHandleResize( Window
* pWindow
, long nNewWidth
, long nNewHeight
);
260 mutable SalGraphics
* mpGraphics
; ///< Graphics context to draw on
261 mutable OutputDevice
* mpPrevGraphics
; ///< Previous output device in list
262 mutable OutputDevice
* mpNextGraphics
; ///< Next output device in list
263 GDIMetaFile
* mpMetaFile
;
264 mutable ImplFontEntry
* mpFontEntry
;
265 mutable ImplFontCache
* mpFontCache
;
266 mutable PhysicalFontCollection
* mpFontCollection
;
267 mutable ImplGetDevFontList
* mpGetDevFontList
;
268 mutable ImplGetDevSizeList
* mpGetDevSizeList
;
269 boost::ptr_deque
<OutDevState
>* mpOutDevStateStack
;
270 ImplOutDevData
* mpOutDevData
;
271 VCLXGraphicsList_impl
* mpUnoGraphicsList
;
272 vcl::PDFWriterImpl
* mpPDFWriter
;
273 vcl::ExtOutDevData
* mpExtOutDevData
;
276 VirtualDevice
* mpAlphaVDev
;
278 /// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
280 /// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
282 /// Additional output pixel offset, applied in LogicToPixel (used by SetPixelOffset/GetPixelOffset)
284 /// Additional output offset in _logical_ coordinates, applied in PixelToLogic (used by SetPixelOffset/GetPixelOffset)
286 /// Output offset for device output in pixel (pseudo window offset within window system's frames)
288 /// Output offset for device output in pixel (pseudo window offset within window system's frames)
294 sal_Int32 mnDPIScaleFactor
; ///< For Hi-DPI displays, we want to draw everything mnDPIScaleFactor-times larger
295 /// font specific text alignment offsets in pixel units
296 mutable long mnTextOffX
;
297 mutable long mnTextOffY
;
298 mutable long mnEmphasisAscent
;
299 mutable long mnEmphasisDescent
;
300 sal_uLong mnDrawMode
;
301 sal_uLong mnTextLayoutMode
;
303 ImplThresholdRes maThresRes
;
304 OutDevType meOutDevType
;
305 OutDevViewType meOutDevViewType
;
306 Region maRegion
; // contains the clip region, see SetClipRegion(...)
311 Color maTextLineColor
;
312 Color maOverlineColor
;
313 TextAlign meTextAlign
;
315 Wallpaper maBackground
;
316 boost::scoped_ptr
<AllSettings
> mxSettings
;
319 sal_uInt16 mnAntialiasing
;
320 LanguageType meTextLanguage
;
323 mutable bool mbMap
: 1;
324 mutable bool mbMapIsDefault
: 1;
325 mutable bool mbClipRegion
: 1;
326 mutable bool mbBackground
: 1;
327 mutable bool mbOutput
: 1;
328 mutable bool mbDevOutput
: 1;
329 mutable bool mbOutputClipped
: 1;
330 mutable bool mbLineColor
: 1;
331 mutable bool mbFillColor
: 1;
332 mutable bool mbInitLineColor
: 1;
333 mutable bool mbInitFillColor
: 1;
334 mutable bool mbInitFont
: 1;
335 mutable bool mbInitTextColor
: 1;
336 mutable bool mbInitClipRegion
: 1;
337 mutable bool mbClipRegionSet
: 1;
338 mutable bool mbKerning
: 1;
339 mutable bool mbNewFont
: 1;
340 mutable bool mbTextLines
: 1;
341 mutable bool mbTextSpecial
: 1;
342 mutable bool mbRefPoint
: 1;
343 mutable bool mbEnableRTL
: 1;
345 /** @name Initialization and accessor functions
353 SAL_DLLPRIVATE
OutputDevice( const OutputDevice
& rOutDev
);
356 virtual ~OutputDevice();
359 SAL_DLLPRIVATE OutputDevice
& operator =( const OutputDevice
& rOutDev
);
363 /** Get the graphic context that the output device uses to draw on.
365 If no graphics device exists, then initialize it.
367 @returns SalGraphics instance.
369 SalGraphics
const *GetGraphics() const;
370 SalGraphics
* GetGraphics();
372 void SetConnectMetaFile( GDIMetaFile
* pMtf
);
373 GDIMetaFile
* GetConnectMetaFile() const { return mpMetaFile
; }
375 virtual void SetSettings( const AllSettings
& rSettings
);
376 const AllSettings
& GetSettings() const { return *mxSettings
; }
378 SystemGraphicsData
GetSystemGfxData() const;
379 css::uno::Any
GetSystemGfxDataAny() const;
382 void SetRefPoint( const Point
& rRefPoint
);
383 const Point
& GetRefPoint() const { return maRefPoint
; }
384 bool IsRefPoint() const { return mbRefPoint
; }
386 virtual sal_uInt16
GetBitCount() const;
388 Size
GetOutputSizePixel() const
389 { return Size( mnOutWidth
, mnOutHeight
); }
390 long GetOutputWidthPixel() const { return mnOutWidth
; }
391 long GetOutputHeightPixel() const { return mnOutHeight
; }
392 long GetOutOffXPixel() const { return mnOutOffX
; }
393 long GetOutOffYPixel() const { return mnOutOffY
; }
395 Size
GetOutputSize() const
396 { return PixelToLogic( GetOutputSizePixel() ); }
398 sal_uLong
GetColorCount() const;
401 /// request XCanvas render interface for this OutputDevice
402 css::uno::Reference
< css::rendering::XCanvas
>
405 css::uno::Reference
< css::awt::XGraphics
>
407 VCLXGraphicsList_impl
* GetUnoGraphicsList() const { return mpUnoGraphicsList
; }
408 VCLXGraphicsList_impl
* CreateUnoGraphicsList();
412 /** Acquire a graphics device that the output device uses to draw on.
414 There is an LRU of OutputDevices that is used to get the graphics. The
415 actual creation of a SalGraphics instance is done via the SalFrame
418 However, the SalFrame instance will only return a valid SalGraphics
419 instance if it is not in use or there wasn't one in the first place. When
420 this happens, AcquireGraphics finds the least recently used OutputDevice
421 in a different frame and "steals" it (releases it then starts using it).
423 If there are no frames to steal an OutputDevice's SalGraphics instance from
424 then it blocks until the graphics is released.
426 Once it has acquired a graphics instance, then we add the OutputDevice to
429 @returns true if was able to initialize the graphics device, false otherwise.
431 virtual bool AcquireGraphics() const = 0;
433 /** Release the graphics device, and remove it from the graphics device
436 @param bRelease Determines whether to release the fonts of the
437 physically released graphics device.
439 virtual void ReleaseGraphics( bool bRelease
= true ) = 0;
443 /** @name Helper functions
449 /** Get the output device's DPI x-axis value.
451 @returns x-axis DPI value
453 SAL_DLLPRIVATE sal_Int32
GetDPIX() const { return mnDPIX
; }
455 /** Get the output device's DPI y-axis value.
457 @returns y-axis DPI value
459 SAL_DLLPRIVATE sal_Int32
GetDPIY() const { return mnDPIY
; }
461 sal_Int32
GetDPIScaleFactor() const { return mnDPIScaleFactor
; }
463 OutDevType
GetOutDevType() const { return meOutDevType
; }
465 /** Query an OutputDevice to see whether it supports a specific operation
467 @returns true if operation supported, else false
469 bool SupportsOperation( OutDevSupportType
) const;
471 vcl::PDFWriterImpl
* GetPDFWriter() const { return mpPDFWriter
; }
473 void SetExtOutDevData( vcl::ExtOutDevData
* pExtOutDevData
) { mpExtOutDevData
= pExtOutDevData
; }
474 vcl::ExtOutDevData
* GetExtOutDevData() const { return mpExtOutDevData
; }
478 SAL_DLLPRIVATE
void ImplRotatePos( long nOriginX
, long nOriginY
, long& rX
, long &rY
,
479 short nOrientation
) const;
483 /** @name Frame functions
489 SAL_DLLPRIVATE
void ImplGetFrameDev ( const Point
& rPt
, const Point
& rDevPt
, const Size
& rDevSize
,
490 OutputDevice
& rOutDev
);
491 SAL_DLLPRIVATE
void ImplDrawFrameDev ( const Point
& rPt
, const Point
& rDevPt
, const Size
& rDevSize
,
492 const OutputDevice
& rOutDev
, const Region
& rRegion
);
496 /** @Name Direct OutputDevice drawing functions
502 virtual void DrawOutDev(
503 const Point
& rDestPt
, const Size
& rDestSize
,
504 const Point
& rSrcPt
, const Size
& rSrcSize
);
506 virtual void DrawOutDev(
507 const Point
& rDestPt
, const Size
& rDestSize
,
508 const Point
& rSrcPt
, const Size
& rSrcSize
,
509 const OutputDevice
& rOutDev
);
511 virtual void CopyArea(
512 const Point
& rDestPt
,
513 const Point
& rSrcPt
, const Size
& rSrcSize
,
514 sal_uInt16 nFlags
= 0 );
518 virtual void CopyDeviceArea( SalTwoRect
& aPosAry
, sal_uInt32 nFlags
);
522 SAL_DLLPRIVATE
void ImplDrawOutDevDirect ( const OutputDevice
* pSrcDev
, SalTwoRect
& rPosAry
);
524 // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
525 SAL_DLLPRIVATE
void DrawOutDev( const Point
&, const Size
&, const Point
&, const Size
&, const Printer
&) SAL_DELETED_FUNCTION
;
529 /** @name OutputDevice state functions
535 void Push( sal_uInt16 nFlags
= PUSH_ALL
);
538 // returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
539 // this should not normally be used since Push and Pop must always be used symmetrically
540 // however this may be e.g. a help when debugging code in which this somehow is not the case
541 sal_uInt32
GetGCStackDepth() const;
543 void EnableOutput( bool bEnable
= true );
544 bool IsOutputEnabled() const { return mbOutput
; }
545 bool IsDeviceOutput() const { return mbDevOutput
; }
546 bool IsDeviceOutputNecessary() const { return (mbOutput
&& mbDevOutput
); }
547 bool IsOutputNecessary() const { return ((mbOutput
&& mbDevOutput
) || (mpMetaFile
!= NULL
)); }
549 void SetAntialiasing( sal_uInt16 nMode
= 0 );
550 sal_uInt16
GetAntialiasing() const { return mnAntialiasing
; }
552 void SetDrawMode( sal_uLong nDrawMode
);
553 sal_uLong
GetDrawMode() const { return mnDrawMode
; }
555 void SetLayoutMode( sal_uLong nTextLayoutMode
);
556 sal_uLong
GetLayoutMode() const { return mnTextLayoutMode
; }
558 void SetDigitLanguage( LanguageType
);
559 LanguageType
GetDigitLanguage() const { return meTextLanguage
; }
561 void SetRasterOp( RasterOp eRasterOp
);
562 RasterOp
GetRasterOp() const { return meRasterOp
; }
565 If this OutputDevice is used for displaying a Print Preview
566 the OutDevViewType should be set to 'OUTDEV_VIEWTYPE_PRINTPREVIEW'.
568 A View can then make painting decisions dependent on this OutDevViewType.
569 E.g. text colors need to be handled differently, dependent on whether it's a PrintPreview or not. (see #106611# for more)
571 void SetOutDevViewType( OutDevViewType eOutDevViewType
) { meOutDevViewType
=eOutDevViewType
; }
572 OutDevViewType
GetOutDevViewType() const { return meOutDevViewType
; }
575 void SetLineColor( const Color
& rColor
);
576 const Color
& GetLineColor() const { return maLineColor
; }
577 bool IsLineColor() const { return mbLineColor
; }
580 void SetFillColor( const Color
& rColor
);
581 const Color
& GetFillColor() const { return maFillColor
; }
582 bool IsFillColor() const { return mbFillColor
; }
584 void SetBackground();
585 void SetBackground( const Wallpaper
& rBackground
);
587 const Wallpaper
& GetBackground() const { return maBackground
; }
588 bool IsBackground() const { return mbBackground
; }
590 void SetFont( const Font
& rNewFont
);
591 const Font
& GetFont() const { return maFont
; }
595 virtual void ImplReleaseFonts();
599 SAL_DLLPRIVATE
void InitLineColor();
601 SAL_DLLPRIVATE
void InitFillColor();
606 /** @name Clipping functions
612 Region
GetClipRegion() const;
613 void SetClipRegion();
614 void SetClipRegion( const Region
& rRegion
);
615 bool SelectClipRegion( const Region
&, SalGraphics
* pGraphics
= NULL
);
617 bool IsClipRegion() const { return mbClipRegion
; }
619 void MoveClipRegion( long nHorzMove
, long nVertMove
);
620 void IntersectClipRegion( const Rectangle
& rRect
);
621 void IntersectClipRegion( const Region
& rRegion
);
623 virtual Region
GetActiveClipRegion() const;
627 virtual void InitClipRegion();
628 virtual void ClipToPaintRegion ( Rectangle
& rDstRect
);
632 SAL_DLLPRIVATE
void SetDeviceClipRegion( const Region
* pRegion
);
636 /** @name Pixel functions
642 void DrawPixel( const Point
& rPt
);
643 void DrawPixel( const Point
& rPt
, const Color
& rColor
);
644 void DrawPixel( const Polygon
& rPts
, const Color
* pColors
= NULL
);
645 void DrawPixel( const Polygon
& rPts
, const Color
& rColor
);
647 Color
GetPixel( const Point
& rPt
) const;
651 /** @name Rectangle functions
657 void DrawRect( const Rectangle
& rRect
);
658 void DrawRect( const Rectangle
& rRect
,
659 sal_uLong nHorzRount
, sal_uLong nVertRound
);
661 /// Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd
666 Color aStart
= Color(COL_WHITE
),
667 Color aEnd
= Color(COL_BLACK
));
669 void DrawGrid( const Rectangle
& rRect
, const Size
& rDist
, sal_uLong nFlags
);
674 /** @name Line functions
680 void DrawLine( const Point
& rStartPt
, const Point
& rEndPt
);
682 void DrawLine( const Point
& rStartPt
, const Point
& rEndPt
,
683 const LineInfo
& rLineInfo
);
687 /** Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area)
689 SAL_DLLPRIVATE
void PaintLineGeometryWithEvtlExpand( const LineInfo
& rInfo
, basegfx::B2DPolyPolygon aLinePolyPolygon
);
693 /** @name Polyline functions
699 /** Render the given polygon as a line stroke
701 The given polygon is stroked with the current LineColor, start
702 and end point are not automatically connected
707 void DrawPolyLine( const Polygon
& rPoly
);
710 const basegfx::B2DPolygon
&,
711 double fLineWidth
= 0.0,
712 basegfx::B2DLineJoin
= basegfx::B2DLINEJOIN_ROUND
,
713 css::drawing::LineCap
= css::drawing::LineCap_BUTT
);
715 /** Render the given polygon as a line stroke
717 The given polygon is stroked with the current LineColor, start
718 and end point are not automatically connected. The line is
719 rendered according to the specified LineInfo, e.g. supplying a
720 dash pattern, or a line thickness.
725 void DrawPolyLine( const Polygon
& rPoly
,
726 const LineInfo
& rLineInfo
);
728 bool TryDrawPolyLineDirect(
729 const basegfx::B2DPolygon
& rB2DPolygon
,
730 double fLineWidth
= 0.0,
731 double fTransparency
= 0.0,
732 basegfx::B2DLineJoin eLineJoin
= basegfx::B2DLINEJOIN_NONE
,
733 css::drawing::LineCap eLineCap
= css::drawing::LineCap_BUTT
);
737 // Helper which holds the old line geometry creation and is extended to use AA when
738 // switched on. Advantage is that line geometry is only temporarily used for paint
739 SAL_DLLPRIVATE
void DrawPolyLineWithLineInfo(const Polygon
& rPoly
, const LineInfo
& rLineInfo
);
743 // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool. Contains no AA check.
744 SAL_DLLPRIVATE
bool TryDrawPolyLineDirectNoAACheck(
745 const basegfx::B2DPolygon
& rB2DPolygon
,
746 double fLineWidth
= 0.0,
747 double fTransparency
= 0.0,
748 basegfx::B2DLineJoin eLineJoin
= basegfx::B2DLINEJOIN_NONE
,
749 css::drawing::LineCap eLineCap
= css::drawing::LineCap_BUTT
);
753 /** @name Polygon functions
759 /** Render the given polygon
761 The given polygon is stroked with the current LineColor, and
762 filled with the current FillColor. If one of these colors are
763 transparent, the corresponding stroke or fill stays
764 invisible. Start and end point of the polygon are
765 automatically connected.
769 void DrawPolygon( const Polygon
& rPoly
);
770 void DrawPolygon( const basegfx::B2DPolygon
& );
772 /** Render the given poly-polygon
774 The given poly-polygon is stroked with the current LineColor,
775 and filled with the current FillColor. If one of these colors
776 are transparent, the corresponding stroke or fill stays
777 invisible. Start and end points of the contained polygons are
778 automatically connected.
782 void DrawPolyPolygon( const PolyPolygon
& rPolyPoly
);
783 void DrawPolyPolygon( const basegfx::B2DPolyPolygon
& );
787 SAL_DLLPRIVATE
void ImplDrawPolygon( const Polygon
& rPoly
, const PolyPolygon
* pClipPolyPoly
= NULL
);
788 SAL_DLLPRIVATE
void ImplDrawPolyPolygon( const PolyPolygon
& rPolyPoly
, const PolyPolygon
* pClipPolyPoly
= NULL
);
789 SAL_DLLPRIVATE
void ImplDrawPolyPolygon( sal_uInt16 nPoly
, const PolyPolygon
& rPolyPoly
);
791 // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
792 // without MetaFile processing
793 SAL_DLLPRIVATE
void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon
& rB2DPolyPoly
);
797 /** @name Curved shape functions
803 void DrawEllipse( const Rectangle
& rRect
);
806 const Rectangle
& rRect
,
807 const Point
& rStartPt
, const Point
& rEndPt
);
810 const Rectangle
& rRect
,
811 const Point
& rStartPt
, const Point
& rEndPt
);
814 const Rectangle
& rRect
,
815 const Point
& rStartPt
, const Point
& rEndPt
);
820 /** @name Gradient functions
825 void DrawGradient( const Rectangle
& rRect
, const Gradient
& rGradient
);
826 void DrawGradient( const PolyPolygon
& rPolyPoly
, const Gradient
& rGradient
);
828 void AddGradientActions(
829 const Rectangle
& rRect
,
830 const Gradient
& rGradient
,
835 virtual bool UsePolyPolygonForComplexGradient() = 0;
837 virtual long GetGradientStepCount( long nMinRect
);
841 SAL_DLLPRIVATE
void DrawLinearGradient( const Rectangle
& rRect
, const Gradient
& rGradient
, bool bMtf
, const PolyPolygon
* pClipPolyPoly
);
842 SAL_DLLPRIVATE
void DrawComplexGradient( const Rectangle
& rRect
, const Gradient
& rGradient
, bool bMtf
, const PolyPolygon
* pClipPolyPoly
);
844 SAL_DLLPRIVATE
long GetGradientSteps( const Gradient
& rGradient
, const Rectangle
& rRect
, bool bMtf
, bool bComplex
=false );
846 SAL_DLLPRIVATE Color
GetSingleColorGradientFill();
847 SAL_DLLPRIVATE
void SetGrayscaleColors( Gradient
&rGradient
);
851 /** @name Hatch functions
858 void DrawHatch( const PolyPolygon
& rPolyPoly
, const ::Hatch
& rHatch
);
859 void AddHatchActions( const PolyPolygon
& rPolyPoly
,
860 const ::Hatch
& rHatch
,
863 void DrawHatch( const PolyPolygon
& rPolyPoly
, const Hatch
& rHatch
);
864 void AddHatchActions( const PolyPolygon
& rPolyPoly
,
869 void DrawHatch( const PolyPolygon
& rPolyPoly
, const Hatch
& rHatch
, bool bMtf
);
873 SAL_DLLPRIVATE
void CalcHatchValues( const Rectangle
& rRect
, long nDist
, sal_uInt16 nAngle10
, Point
& rPt1
, Point
& rPt2
, Size
& rInc
, Point
& rEndPt1
);
874 SAL_DLLPRIVATE
void DrawHatchLine( const Line
& rLine
, const PolyPolygon
& rPolyPoly
, Point
* pPtBuffer
, bool bMtf
);
878 /** @name Wallpaper functions
883 void DrawWallpaper( const Rectangle
& rRect
, const Wallpaper
& rWallpaper
);
885 virtual void Erase();
886 virtual void Erase( const Rectangle
& rRect
) { DrawWallpaper( rRect
, GetBackground() ); }
889 virtual void DrawGradientWallpaper( long nX
, long nY
, long nWidth
, long nHeight
, const Wallpaper
& rWallpaper
);
892 SAL_DLLPRIVATE
void DrawWallpaper( long nX
, long nY
, long nWidth
, long nHeight
, const Wallpaper
& rWallpaper
);
893 SAL_DLLPRIVATE
void DrawColorWallpaper( long nX
, long nY
, long nWidth
, long nHeight
, const Wallpaper
& rWallpaper
);
894 SAL_DLLPRIVATE
void DrawBitmapWallpaper( long nX
, long nY
, long nWidth
, long nHeight
, const Wallpaper
& rWallpaper
);
898 /** @name Text functions
904 void DrawText( const Point
& rStartPt
, const OUString
& rStr
,
905 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
906 MetricVector
* pVector
= NULL
, OUString
* pDisplayText
= NULL
);
908 void DrawText( const Rectangle
& rRect
,
909 const OUString
& rStr
, sal_uInt16 nStyle
= 0,
910 MetricVector
* pVector
= NULL
, OUString
* pDisplayText
= NULL
,
911 ::vcl::ITextLayout
* _pTextLayout
= NULL
);
913 void ImplDrawText( OutputDevice
& rTargetDevice
, const Rectangle
& rRect
,
914 const OUString
& rOrigStr
, sal_uInt16 nStyle
,
915 MetricVector
* pVector
, OUString
* pDisplayText
, ::vcl::ITextLayout
& _rLayout
);
917 void ImplDrawText( SalLayout
& );
919 void ImplDrawTextBackground( const SalLayout
& );
921 void DrawCtrlText( const Point
& rPos
, const OUString
& rStr
,
922 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
923 sal_uInt16 nStyle
= TEXT_DRAW_MNEMONIC
, MetricVector
* pVector
= NULL
, OUString
* pDisplayText
= NULL
);
925 void DrawTextLine( const Point
& rPos
, long nWidth
,
926 FontStrikeout eStrikeout
,
927 FontUnderline eUnderline
,
928 FontUnderline eOverline
,
929 bool bUnderlineAbove
= false );
931 void ImplDrawTextLine( long nBaseX
, long nX
, long nY
, long nWidth
, FontStrikeout eStrikeout
, FontUnderline eUnderline
, FontUnderline eOverline
, bool bUnderlineAbove
);
933 void ImplDrawTextLines( SalLayout
&, FontStrikeout eStrikeout
, FontUnderline eUnderline
, FontUnderline eOverline
, bool bWordLine
, bool bUnderlineAbove
);
935 void DrawWaveLine( const Point
& rStartPos
, const Point
& rEndPos
);
937 bool ImplDrawRotateText( SalLayout
& );
939 Rectangle
GetTextRect( const Rectangle
& rRect
,
940 const OUString
& rStr
, sal_uInt16 nStyle
= TEXT_DRAW_WORDBREAK
,
941 TextRectInfo
* pInfo
= NULL
,
942 const ::vcl::ITextLayout
* _pTextLayout
= NULL
) const;
944 bool GetTextBoundRect( Rectangle
& rRect
,
945 const OUString
& rStr
, sal_Int32 nBase
= 0, sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
946 sal_uLong nLayoutWidth
= 0, const sal_Int32
* pDXArray
= NULL
) const;
948 Rectangle
ImplGetTextBoundRect( const SalLayout
& );
950 bool GetTextOutline( PolyPolygon
&,
951 const OUString
& rStr
, sal_Int32 nBase
= 0, sal_Int32 nIndex
= 0,
952 sal_Int32 nLen
= -1, bool bOptimize
= true,
953 sal_uLong nLayoutWidth
= 0, const sal_Int32
* pDXArray
= NULL
) const;
955 bool GetTextOutlines( PolyPolyVector
&,
956 const OUString
& rStr
, sal_Int32 nBase
= 0, sal_Int32 nIndex
= 0,
957 sal_Int32 nLen
= -1, bool bOptimize
= true,
958 sal_uLong nLayoutWidth
= 0, const sal_Int32
* pDXArray
= NULL
) const;
960 bool GetTextOutlines( ::basegfx::B2DPolyPolygonVector
&rVector
,
961 const OUString
& rStr
, sal_Int32 nBase
= 0, sal_Int32 nIndex
= 0,
962 sal_Int32 nLen
= -1, bool bOptimize
= true,
963 sal_uLong nLayoutWidth
= 0, const sal_Int32
* pDXArray
= NULL
) const;
966 OUString
GetEllipsisString( const OUString
& rStr
, long nMaxWidth
,
967 sal_uInt16 nStyle
= TEXT_DRAW_ENDELLIPSIS
) const;
969 long GetCtrlTextWidth( const OUString
& rStr
, sal_Int32 nIndex
= 0,
971 sal_uInt16 nStyle
= TEXT_DRAW_MNEMONIC
) const;
973 static OUString
GetNonMnemonicString( const OUString
& rStr
, sal_Int32
& rMnemonicPos
);
975 static OUString
GetNonMnemonicString( const OUString
& rStr
)
976 { sal_Int32 nDummy
; return GetNonMnemonicString( rStr
, nDummy
); }
978 /** Generate MetaTextActions for the text rect
980 This method splits up the text rect into multiple
981 MetaTextActions, one for each line of text. This is comparable
982 to AddGradientActions(), which splits up a gradient into its
983 constituent polygons. Parameter semantics fully compatible to
986 void AddTextRectActions( const Rectangle
& rRect
,
987 const OUString
& rOrigStr
,
991 void SetTextColor( const Color
& rColor
);
992 const Color
& GetTextColor() const { return maTextColor
; }
994 void SetTextFillColor();
995 void SetTextFillColor( const Color
& rColor
);
996 Color
GetTextFillColor() const;
997 bool IsTextFillColor() const { return !maFont
.IsTransparent(); }
999 void SetTextLineColor();
1000 void SetTextLineColor( const Color
& rColor
);
1001 const Color
& GetTextLineColor() const { return maTextLineColor
; }
1002 bool IsTextLineColor() const { return (maTextLineColor
.GetTransparency() == 0); }
1004 void SetOverlineColor();
1005 void SetOverlineColor( const Color
& rColor
);
1006 const Color
& GetOverlineColor() const { return maOverlineColor
; }
1007 bool IsOverlineColor() const { return (maOverlineColor
.GetTransparency() == 0); }
1009 void SetTextAlign( TextAlign eAlign
);
1010 TextAlign
GetTextAlign() const { return maFont
.GetAlign(); }
1012 long GetTextWidth( const OUString
& rStr
, sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1 ) const;
1013 /// Height where any character of the current font fits; in logic coordinates.
1014 long GetTextHeight() const;
1015 float approximate_char_width() const;
1017 void DrawTextArray( const Point
& rStartPt
, const OUString
& rStr
,
1018 const sal_Int32
* pDXAry
= NULL
,
1019 sal_Int32 nIndex
= 0,
1020 sal_Int32 nLen
= -1 );
1021 long GetTextArray( const OUString
& rStr
, sal_Int32
* pDXAry
= NULL
,
1022 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1 ) const;
1024 bool GetCaretPositions( const OUString
&, sal_Int32
* pCaretXArray
,
1025 sal_Int32 nIndex
, sal_Int32 nLen
,
1026 sal_Int32
* pDXAry
= NULL
, long nWidth
= 0,
1027 bool bCellBreaking
= true ) const;
1028 void DrawStretchText( const Point
& rStartPt
, sal_uLong nWidth
,
1029 const OUString
& rStr
,
1030 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1 );
1031 sal_Int32
GetTextBreak( const OUString
& rStr
, long nTextWidth
,
1032 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
1033 long nCharExtra
= 0 ) const;
1034 sal_Int32
GetTextBreak( const OUString
& rStr
, long nTextWidth
,
1035 sal_Unicode nExtraChar
, sal_Int32
& rExtraCharPos
,
1036 sal_Int32 nIndex
, sal_Int32 nLen
,
1037 long nCharExtra
= 0 ) const;
1040 SAL_DLLPRIVATE
void ImplInitTextColor();
1042 SAL_DLLPRIVATE
void ImplInitTextLineSize();
1043 SAL_DLLPRIVATE
void ImplInitAboveTextLineSize();
1046 SAL_DLLPRIVATE
bool ImplDrawTextDirect( SalLayout
&, bool bTextLines
, sal_uInt32 flags
= 0 );
1047 SAL_DLLPRIVATE
void ImplDrawSpecialText( SalLayout
& );
1048 SAL_DLLPRIVATE
void ImplDrawTextRect( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, long nHeight
);
1050 SAL_DLLPRIVATE
void ImplDrawWavePixel( long nOriginX
, long nOriginY
, long nCurX
, long nCurY
, short nOrientation
, SalGraphics
* pGraphics
, OutputDevice
* pOutDev
,
1051 bool bDrawPixAsRect
, long nPixWidth
, long nPixHeight
);
1052 SAL_DLLPRIVATE
void ImplDrawWaveLine( long nBaseX
, long nBaseY
, long nStartX
, long nStartY
, long nWidth
, long nHeight
, long nLineWidth
, short nOrientation
, const Color
& rColor
);
1053 SAL_DLLPRIVATE
void ImplDrawWaveTextLine( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, FontUnderline eTextLine
, Color aColor
, bool bIsAbove
);
1054 SAL_DLLPRIVATE
void ImplDrawStraightTextLine( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, FontUnderline eTextLine
, Color aColor
, bool bIsAbove
);
1055 SAL_DLLPRIVATE
void ImplDrawStrikeoutLine( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, FontStrikeout eStrikeout
, Color aColor
);
1056 SAL_DLLPRIVATE
void ImplDrawStrikeoutChar( long nBaseX
, long nBaseY
, long nX
, long nY
, long nWidth
, FontStrikeout eStrikeout
, Color aColor
);
1057 SAL_DLLPRIVATE
void ImplDrawMnemonicLine( long nX
, long nY
, long nWidth
);
1059 SAL_DLLPRIVATE
static bool ImplIsUnderlineAbove( const Font
& );
1062 SAL_DLLPRIVATE
long ImplGetTextLines( ImplMultiTextLineInfo
& rLineInfo
, long nWidth
, const OUString
& rStr
, sal_uInt16 nStyle
, const ::vcl::ITextLayout
& _rLayout
);
1066 /** @name Font functions
1072 FontInfo
GetDevFont( int nDevFontIndex
) const;
1073 int GetDevFontCount() const;
1075 bool IsFontAvailable( const OUString
& rFontName
) const;
1077 Size
GetDevFontSize( const Font
& rFont
, int nSizeIndex
) const;
1078 int GetDevFontSizeCount( const Font
& ) const;
1080 bool AddTempDevFont( const OUString
& rFileURL
, const OUString
& rFontName
);
1082 FontMetric
GetFontMetric() const;
1083 FontMetric
GetFontMetric( const Font
& rFont
) const;
1085 bool GetFontCharMap( FontCharMap
& rFontCharMap
) const;
1086 bool GetFontCapabilities( vcl::FontCapabilities
& rFontCapabilities
) const;
1088 /** Retrieve detailed font information in platform independent structure
1090 @param nFallbacklevel Fallback font level (0 = best matching font)
1092 @return SystemFontData
1094 SystemFontData
GetSysFontData( int nFallbacklevel
) const;
1096 SAL_DLLPRIVATE
void ImplGetEmphasisMark( PolyPolygon
& rPolyPoly
, bool& rPolyLine
, Rectangle
& rRect1
, Rectangle
& rRect2
,
1097 long& rYOff
, long& rWidth
, FontEmphasisMark eEmphasis
, long nHeight
, short nOrient
);
1098 SAL_DLLPRIVATE
static FontEmphasisMark
1099 ImplGetEmphasisMarkStyle( const Font
& rFont
);
1101 bool GetGlyphBoundRects( const Point
& rOrigin
, const OUString
& rStr
, int nIndex
,
1102 int nLen
, int nBase
, MetricVector
& rVector
);
1104 sal_Int32
HasGlyphs( const Font
& rFont
, const OUString
& rStr
,
1105 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1 ) const;
1107 long GetMinKashida() const;
1110 // validate kashida positions against the current font
1111 // returns count of invalid kashida positions
1112 sal_Int32
ValidateKashidas( const OUString
& rTxt
, sal_Int32 nIdx
, sal_Int32 nLen
,
1113 sal_Int32 nKashCount
, // number of suggested kashida positions (in)
1114 const sal_Int32
* pKashidaPos
, // suggested kashida positions (in)
1115 sal_Int32
* pKashidaPosDropped
// invalid kashida positions (out)
1118 static void BeginFontSubstitution();
1119 static void EndFontSubstitution();
1120 static void AddFontSubstitute( const OUString
& rFontName
,
1121 const OUString
& rReplaceFontName
,
1122 sal_uInt16 nFlags
= 0 );
1123 static void RemoveFontSubstitute( sal_uInt16 n
);
1124 static sal_uInt16
GetFontSubstituteCount();
1126 static Font
GetDefaultFont( sal_uInt16 nType
,
1129 const OutputDevice
* pOutDev
= NULL
);
1131 SAL_DLLPRIVATE
void ImplInitFontList() const;
1132 SAL_DLLPRIVATE
void ImplUpdateFontData( bool bNewFontLists
);
1133 SAL_DLLPRIVATE
static void ImplUpdateAllFontData( bool bNewFontLists
);
1137 virtual void InitFont() const;
1138 virtual void SetFontOrientation( ImplFontEntry
* const pFontEntry
) const;
1139 virtual long GetFontExtLeading() const;
1144 typedef void ( OutputDevice::* FontUpdateHandler_t
)( bool );
1146 SAL_DLLPRIVATE
bool ImplNewFont() const;
1148 SAL_DLLPRIVATE
void ImplClearFontData( bool bNewFontLists
);
1149 SAL_DLLPRIVATE
void ImplRefreshFontData( bool bNewFontLists
);
1150 SAL_DLLPRIVATE
static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl
, bool bNewFontLists
);
1153 SAL_DLLPRIVATE OUString
ImplGetEllipsisString( const OutputDevice
& rTargetDevice
, const OUString
& rStr
,
1154 long nMaxWidth
, sal_uInt16 nStyle
, const ::vcl::ITextLayout
& _rLayout
);
1156 SAL_DLLPRIVATE
void ImplDrawEmphasisMark( long nBaseX
, long nX
, long nY
, const PolyPolygon
& rPolyPoly
, bool bPolyLine
, const Rectangle
& rRect1
, const Rectangle
& rRect2
);
1157 SAL_DLLPRIVATE
void ImplDrawEmphasisMarks( SalLayout
& );
1161 /** @name Layout functions
1167 SystemTextLayoutData
GetSysTextLayoutData( const Point
& rStartPt
, const OUString
& rStr
,
1168 sal_Int32 nIndex
= 0, sal_Int32 nLen
= -1,
1169 const sal_Int32
* pDXAry
= NULL
) const;
1171 SAL_DLLPRIVATE
bool ImplIsAntiparallel() const ;
1172 SAL_DLLPRIVATE
void ReMirror( Point
&rPoint
) const;
1173 SAL_DLLPRIVATE
void ReMirror( Rectangle
&rRect
) const;
1174 SAL_DLLPRIVATE
void ReMirror( Region
&rRegion
) const;
1175 SAL_DLLPRIVATE
bool ImplIsRecordLayout() const;
1176 virtual bool HasMirroredGraphics() const;
1177 SAL_DLLPRIVATE SalLayout
* ImplLayout( const OUString
&, sal_Int32 nIndex
, sal_Int32 nLen
,
1178 const Point
& rLogicPos
= Point(0,0), long nLogicWidth
=0,
1179 const sal_Int32
* pLogicDXArray
=NULL
) const;
1180 SAL_DLLPRIVATE ImplLayoutArgs
ImplPrepareLayoutArgs( OUString
&, const sal_Int32 nIndex
, const sal_Int32 nLen
,
1181 long nPixelWidth
, const sal_Int32
* pPixelDXArray
) const;
1182 SAL_DLLPRIVATE SalLayout
* ImplGlyphFallbackLayout( SalLayout
*, ImplLayoutArgs
& ) const;
1183 // tells whether this output device is RTL in an LTR UI or LTR in a RTL UI
1184 SAL_DLLPRIVATE SalLayout
* getFallbackFont(ImplFontEntry
&rFallbackFont
,
1185 FontSelectPattern
&rFontSelData
, int nFallbackLevel
,
1186 ImplLayoutArgs
& rLayoutArgs
) const;
1189 // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
1190 virtual void EnableRTL( bool bEnable
= true);
1191 bool IsRTLEnabled() const { return mbEnableRTL
; }
1193 bool GetTextIsRTL( const OUString
&, sal_Int32 nIndex
, sal_Int32 nLen
) const;
1198 /** @name Bitmap functions
1206 const Point& rDestPt,
1207 const Size& rDestSize,
1208 const Point& rSrcPtPixel,
1209 const Size& rSecSizePixel,
1210 const Bitmap& rBitmap,
1211 sal_uLong nAction = META_BMPSCALEPART_ACTION)
1214 const Point
& rDestPt
,
1215 const Bitmap
& rBitmap
);
1219 const Point& rDestPt,
1220 const Size& rDestSize,
1221 const Point& rSrcPtPixel,
1222 const Size& rSecSizePixel,
1223 const Bitmap& rBitmap,
1224 sal_uLong nAction = META_BMPSCALEPART_ACTION)
1227 const Point
& rDestPt
,
1228 const Size
& rDestSize
,
1229 const Bitmap
& rBitmap
);
1232 const Point
& rDestPt
,
1233 const Size
& rDestSize
,
1234 const Point
& rSrcPtPixel
,
1235 const Size
& rSrcSizePixel
,
1236 const Bitmap
& rBitmap
,
1237 sal_uLong nAction
= META_BMPSCALEPART_ACTION
);
1241 const Point& rDestPt,
1242 const Size& rDestSize,
1243 const Point& rSrcPtPixel,
1244 const Size& rSecSizePixel,
1245 const BitmapEx& rBitmapEx,
1246 sal_uLong nAction = META_BMPEXSCALEPART_ACTION)
1249 const Point
& rDestPt
,
1250 const BitmapEx
& rBitmapEx
);
1255 const Point& rDestPt,
1256 const Size& rDestSize,
1257 const Point& rSrcPtPixel,
1258 const Size& rSecSizePixel,
1259 const BitmapEx& rBitmapEx,
1260 sal_uLong nAction = META_BMPEXSCALEPART_ACTION)
1263 const Point
& rDestPt
,
1264 const Size
& rDestSize
,
1265 const BitmapEx
& rBitmapEx
);
1268 const Point
& rDestPt
,
1269 const Size
& rDestSize
,
1270 const Point
& rSrcPtPixel
,
1271 const Size
& rSrcSizePixel
,
1272 const BitmapEx
& rBitmapEx
,
1273 sal_uLong nAction
= META_BMPEXSCALEPART_ACTION
);
1276 virtual void DrawImage(
1279 const Image& rImage,
1280 sal_uInt16 nStyle = 0)
1282 virtual void DrawImage(
1284 const Image
& rImage
,
1285 sal_uInt16 nStyle
= 0 );
1287 virtual void DrawImage(
1290 const Image
& rImage
,
1291 sal_uInt16 nStyle
= 0 );
1294 virtual Bitmap
GetBitmap( const Point
& rSrcPt
, const Size
& rSize
) const;
1296 /** Query extended bitmap (with alpha channel, if available).
1298 BitmapEx
GetBitmapEx( const Point
& rSrcPt
, const Size
& rSize
) const;
1301 /** Draw BitmapEx transformed
1303 @param rTransformation
1304 The transformation describing the target positioning of the given bitmap. Transforming
1305 the unit object coordinates (0, 0, 1, 1) with this matrix is the transformation to
1306 discrete coordinates
1309 The BitmapEx to be painted
1311 void DrawTransformedBitmapEx(
1312 const basegfx::B2DHomMatrix
& rTransformation
,
1313 const BitmapEx
& rBitmapEx
);
1318 virtual void DrawDeviceBitmap(
1319 const Point
& rDestPt
, const Size
& rDestSize
,
1320 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
,
1321 BitmapEx
& rBitmapEx
);
1323 virtual void ScaleBitmap ( Bitmap
&rBmp
, SalTwoRect
&rPosAry
);
1325 /** Transform and draw a bitmap directly
1327 @param aFullTransform The B2DHomMatrix used for the transformation
1328 @param rBitmapEx Reference to the bitmap to be transformed and drawn
1330 @return true if it was able to draw the bitmap, false if not
1332 virtual bool DrawTransformBitmapExDirect(
1333 const basegfx::B2DHomMatrix
& aFullTransform
,
1334 const BitmapEx
& rBitmapEx
);
1336 /** Transform and reduce the area that needs to be drawn of the bitmap and return the new
1337 visible range and the maximum area.
1340 @param aFullTransform B2DHomMatrix used for transformation
1341 @param aVisibleRange The new visible area of the bitmap
1342 @param fMaximumArea The maximum area of the bitmap
1344 @returns true if there is an area to be drawn, otherwise nothing is left to be drawn
1347 virtual bool TransformAndReduceBitmapExToTargetRange(
1348 const basegfx::B2DHomMatrix
& aFullTransform
,
1349 basegfx::B2DRange
&aVisibleRange
,
1350 double &fMaximumArea
);
1354 SAL_DLLPRIVATE
void DrawDeviceAlphaBitmap(
1356 const AlphaMask
& rAlpha
,
1357 const Point
& rDestPt
,
1358 const Size
& rDestSize
,
1359 const Point
& rSrcPtPixel
,
1360 const Size
& rSrcSizePixel
);
1362 SAL_DLLPRIVATE Bitmap
BlendBitmap(
1364 BitmapReadAccess
* pP
,
1365 BitmapReadAccess
* pA
,
1366 const sal_Int32 nOffY
,
1367 const sal_Int32 nDstHeight
,
1368 const sal_Int32 nOffX
,
1369 const sal_Int32 nDstWidth
,
1370 const Rectangle
& aBmpRect
,
1375 const long* pMapY
);
1377 SAL_DLLPRIVATE Bitmap
BlendBitmapWithAlpha(
1379 BitmapReadAccess
* pP
,
1380 BitmapReadAccess
* pA
,
1381 const Rectangle
& aDstRect
,
1382 const sal_Int32 nOffY
,
1383 const sal_Int32 nDstHeight
,
1384 const sal_Int32 nOffX
,
1385 const sal_Int32 nDstWidth
,
1387 const long* pMapY
);
1389 /** Retrieve downsampled and cropped bitmap
1391 @attention This method ignores negative rDstSz values, thus
1392 mirroring must happen outside this method (e.g. in DrawBitmap)
1394 SAL_DLLPRIVATE Bitmap
GetDownsampledBitmap(
1396 const Point
& rSrcPt
,
1405 /** @name Transparency functions
1411 /** Query availability of alpha channel
1413 @return sal_True, if this device has an alpha channel.
1418 /** helper method removing transparencies from a metafile (e.g. for printing)
1421 true: transparencies were removed
1422 false: output metafile is unchanged input metafile
1424 @attention this is a member method, so current state can influence the result !
1425 @attention the output metafile is prepared in pixel mode for the currentOutputDevice
1426 state. It can not be moved or rotated reliably anymore.
1428 bool RemoveTransparenciesFromMetaFile(
1429 const GDIMetaFile
& rInMtf
, GDIMetaFile
& rOutMtf
,
1430 long nMaxBmpDPIX
, long nMaxBmpDPIY
,
1431 bool bReduceTransparency
,
1432 bool bTransparencyAutoMode
,
1433 bool bDownsampleBitmaps
,
1434 const Color
& rBackground
= Color( COL_TRANSPARENT
) );
1436 SAL_DLLPRIVATE
void ImplPrintTransparent (
1437 const Bitmap
& rBmp
, const Bitmap
& rMask
,
1438 const Point
& rDestPt
, const Size
& rDestSize
,
1439 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
);
1441 SAL_DLLPRIVATE Color
ImplDrawModeToColor ( const Color
& rColor
) const;
1444 /** Query the existence and depth of the alpha channel
1446 @return 0, if no alpha channel available, and the bit depth of
1447 the alpha channel otherwise.
1449 virtual sal_uInt16
GetAlphaBitCount() const;
1452 void DrawTransparent( const PolyPolygon
& rPolyPoly
, sal_uInt16 nTransparencePercent
);
1453 void DrawTransparent( const basegfx::B2DPolyPolygon
& rB2DPolyPoly
, double fTransparency
);
1454 void DrawTransparent(
1455 const GDIMetaFile
& rMtf
, const Point
& rPos
, const Size
& rSize
,
1456 const Gradient
& rTransparenceGradient
);
1460 virtual void EmulateDrawTransparent( const PolyPolygon
& rPolyPoly
, sal_uInt16 nTransparencePercent
);
1461 void DrawInvisiblePolygon( const PolyPolygon
& rPolyPoly
);
1465 SAL_DLLPRIVATE
bool DrawTransparentNatively( const PolyPolygon
& rPolyPoly
, sal_uInt16 nTransparencePercent
);
1469 /** @name Mask functions
1475 void DrawMask( const Point
& rDestPt
,
1476 const Bitmap
& rBitmap
, const Color
& rMaskColor
);
1478 void DrawMask( const Point
& rDestPt
, const Size
& rDestSize
,
1479 const Bitmap
& rBitmap
, const Color
& rMaskColor
);
1481 void DrawMask( const Point
& rDestPt
, const Size
& rDestSize
,
1482 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
,
1483 const Bitmap
& rBitmap
, const Color
& rMaskColor
,
1484 sal_uLong nAction
);
1488 virtual void DrawDeviceMask (
1489 const Bitmap
& rMask
, const Color
& rMaskColor
,
1490 const Point
& rDestPt
, const Size
& rDestSize
,
1491 const Point
& rSrcPtPixel
, const Size
& rSrcSizePixel
);
1495 /** @name Map functions
1501 void EnableMapMode( bool bEnable
= true );
1502 bool IsMapModeEnabled() const { return mbMap
; }
1504 virtual void SetMapMode();
1505 virtual void SetMapMode( const MapMode
& rNewMapMode
);
1506 virtual void SetRelativeMapMode( const MapMode
& rNewMapMode
);
1507 const MapMode
& GetMapMode() const { return maMapMode
; }
1508 bool IsMapMode() const { return mbMap
; }
1511 basegfx::B2DHomMatrix
GetViewTransformation() const;
1512 basegfx::B2DHomMatrix
GetInverseViewTransformation() const;
1514 basegfx::B2DHomMatrix
GetViewTransformation( const MapMode
& rMapMode
) const;
1515 basegfx::B2DHomMatrix
GetInverseViewTransformation( const MapMode
& rMapMode
) const;
1518 /** Set an offset in pixel
1520 This method offsets every drawing operation that converts its
1521 coordinates to pixel by the given value. Normally, the effect
1522 can be achieved by setting a MapMode with a different
1523 origin. Unfortunately, this origin is in logical coordinates
1524 and can lead to rounding errors (see #102532# for details).
1526 @attention This offset is only applied when converting to
1527 pixel, i.e. some output modes such as metafile recordings
1528 might be completely unaffected by this method! Use with
1529 care. Furthermore, if the OutputDevice's MapMode is the
1530 default (that's MAP_PIXEL), then any pixel offset set is
1531 ignored also. This might be unintuitive for cases, but would
1532 have been far more fragile to implement. What's more, the
1533 reason why the pixel offset was introduced (avoiding rounding
1534 errors) does not apply for MAP_PIXEL, because one can always
1535 use the MapMode origin then.
1540 void SetPixelOffset( const Size
& rOffset
);
1542 /** Get the offset in pixel
1544 @see OutputDevice::SetPixelOffset for details
1546 @return the current offset in pixel
1548 Size
GetPixelOffset() const;
1550 Point
LogicToPixel( const Point
& rLogicPt
) const;
1551 Size
LogicToPixel( const Size
& rLogicSize
) const;
1552 Rectangle
LogicToPixel( const Rectangle
& rLogicRect
) const;
1553 Polygon
LogicToPixel( const Polygon
& rLogicPoly
) const;
1554 PolyPolygon
LogicToPixel( const PolyPolygon
& rLogicPolyPoly
) const;
1555 basegfx::B2DPolyPolygon
LogicToPixel( const basegfx::B2DPolyPolygon
& rLogicPolyPoly
) const;
1556 Region
LogicToPixel( const Region
& rLogicRegion
)const;
1557 Point
LogicToPixel( const Point
& rLogicPt
,
1558 const MapMode
& rMapMode
) const;
1559 Size
LogicToPixel( const Size
& rLogicSize
,
1560 const MapMode
& rMapMode
) const;
1561 Rectangle
LogicToPixel( const Rectangle
& rLogicRect
,
1562 const MapMode
& rMapMode
) const;
1563 Polygon
LogicToPixel( const Polygon
& rLogicPoly
,
1564 const MapMode
& rMapMode
) const;
1565 basegfx::B2DPolygon
LogicToPixel( const basegfx::B2DPolygon
& rLogicPoly
,
1566 const MapMode
& rMapMode
) const;
1567 PolyPolygon
LogicToPixel( const PolyPolygon
& rLogicPolyPoly
,
1568 const MapMode
& rMapMode
) const;
1569 basegfx::B2DPolyPolygon
LogicToPixel( const basegfx::B2DPolyPolygon
& rLogicPolyPoly
,
1570 const MapMode
& rMapMode
) const;
1571 Region
LogicToPixel( const Region
& rLogicRegion
,
1572 const MapMode
& rMapMode
) const;
1573 basegfx::B2DPolygon
LogicToPixel( const basegfx::B2DPolygon
& rLogicPoly
) const;
1575 Point
PixelToLogic( const Point
& rDevicePt
) const;
1576 Size
PixelToLogic( const Size
& rDeviceSize
) const;
1577 Rectangle
PixelToLogic( const Rectangle
& rDeviceRect
) const;
1578 Polygon
PixelToLogic( const Polygon
& rDevicePoly
) const;
1579 PolyPolygon
PixelToLogic( const PolyPolygon
& rDevicePolyPoly
) const;
1580 basegfx::B2DPolyPolygon
PixelToLogic( const basegfx::B2DPolyPolygon
& rDevicePolyPoly
) const;
1581 Region
PixelToLogic( const Region
& rDeviceRegion
) const;
1582 Point
PixelToLogic( const Point
& rDevicePt
,
1583 const MapMode
& rMapMode
) const;
1584 Size
PixelToLogic( const Size
& rDeviceSize
,
1585 const MapMode
& rMapMode
) const;
1586 Rectangle
PixelToLogic( const Rectangle
& rDeviceRect
,
1587 const MapMode
& rMapMode
) const;
1588 Polygon
PixelToLogic( const Polygon
& rDevicePoly
,
1589 const MapMode
& rMapMode
) const;
1590 basegfx::B2DPolygon
PixelToLogic( const basegfx::B2DPolygon
& rDevicePoly
,
1591 const MapMode
& rMapMode
) const;
1592 PolyPolygon
PixelToLogic( const PolyPolygon
& rDevicePolyPoly
,
1593 const MapMode
& rMapMode
) const;
1594 basegfx::B2DPolyPolygon
PixelToLogic( const basegfx::B2DPolyPolygon
& rDevicePolyPoly
,
1595 const MapMode
& rMapMode
) const;
1596 Region
PixelToLogic( const Region
& rDeviceRegion
,
1597 const MapMode
& rMapMode
) const;
1599 Point
LogicToLogic( const Point
& rPtSource
,
1600 const MapMode
* pMapModeSource
,
1601 const MapMode
* pMapModeDest
) const;
1602 Size
LogicToLogic( const Size
& rSzSource
,
1603 const MapMode
* pMapModeSource
,
1604 const MapMode
* pMapModeDest
) const;
1605 Rectangle
LogicToLogic( const Rectangle
& rRectSource
,
1606 const MapMode
* pMapModeSource
,
1607 const MapMode
* pMapModeDest
) const;
1608 static Point
LogicToLogic( const Point
& rPtSource
,
1609 const MapMode
& rMapModeSource
,
1610 const MapMode
& rMapModeDest
);
1611 static Size
LogicToLogic( const Size
& rSzSource
,
1612 const MapMode
& rMapModeSource
,
1613 const MapMode
& rMapModeDest
);
1614 static Rectangle
LogicToLogic( const Rectangle
& rRectSource
,
1615 const MapMode
& rMapModeSource
,
1616 const MapMode
& rMapModeDest
);
1617 static long LogicToLogic( long nLongSource
,
1618 MapUnit eUnitSource
,
1619 MapUnit eUnitDest
);
1621 static basegfx::B2DPolygon
LogicToLogic( const basegfx::B2DPolygon
& rPoly
,
1622 const MapMode
& rMapModeSource
,
1623 const MapMode
& rMapModeDest
);
1624 static basegfx::B2DPolyPolygon
LogicToLogic( const basegfx::B2DPolyPolygon
& rPolyPoly
,
1625 const MapMode
& rMapModeSource
,
1626 const MapMode
& rMapModeDest
);
1628 // create a mapping transformation from rMapModeSource to rMapModeDest (the above methods
1629 // for B2DPoly/Polygons use this internally anyway to transform the B2DPolygon)
1630 static basegfx::B2DHomMatrix
LogicToLogic(const MapMode
& rMapModeSource
, const MapMode
& rMapModeDest
);
1632 /** Convert a logical rectangle to a rectangle in physical device pixel units.
1634 @param rLogicSize Const reference to a rectangle in logical units
1636 @returns Rectangle based on physical device pixel coordinates and units.
1638 SAL_DLLPRIVATE Rectangle
ImplLogicToDevicePixel( const Rectangle
& rLogicRect
) const;
1640 /** Convert a logical point to a physical point on the device.
1642 @param rLogicPt Const reference to a point in logical units.
1644 @returns Physical point on the device.
1646 SAL_DLLPRIVATE Point
ImplLogicToDevicePixel( const Point
& rLogicPt
) const;
1648 /** Convert a logical width to a width in units of device pixels.
1650 To get the number of device pixels, it must calculate the X-DPI of the device and
1651 the map scaling factor. If there is no mapping, then it just returns the
1652 width as nothing more needs to be done.
1654 @param nWidth Logical width
1656 @returns Width in units of device pixels.
1658 SAL_DLLPRIVATE
long ImplLogicWidthToDevicePixel( long nWidth
) const;
1662 /** Convert a logical X coordinate to a device pixel's X coordinate.
1664 To get the device's X coordinate, it must calculate the mapping offset
1665 coordinate X position (if there is one - if not then it just adds
1666 the pseudo-window offset to the logical X coordinate), the X-DPI of
1667 the device and the mapping's X scaling factor.
1669 @param nX Logical X coordinate
1671 @returns Device's X pixel coordinate
1673 SAL_DLLPRIVATE
long ImplLogicXToDevicePixel( long nX
) const;
1675 /** Convert a logical Y coordinate to a device pixel's Y coordinate.
1677 To get the device's Y coordinate, it must calculate the mapping offset
1678 coordinate Y position (if there is one - if not then it just adds
1679 the pseudo-window offset to the logical Y coordinate), the Y-DPI of
1680 the device and the mapping's Y scaling factor.
1682 @param nY Logical Y coordinate
1684 @returns Device's Y pixel coordinate
1686 SAL_DLLPRIVATE
long ImplLogicYToDevicePixel( long nY
) const;
1688 /** Convert a logical height to a height in units of device pixels.
1690 To get the number of device pixels, it must calculate the Y-DPI of the device and
1691 the map scaling factor. If there is no mapping, then it just returns the
1692 height as nothing more needs to be done.
1694 @param nHeight Logical height
1696 @returns Height in units of device pixels.
1698 SAL_DLLPRIVATE
long ImplLogicHeightToDevicePixel( long nHeight
) const;
1700 /** Convert device pixels to a width in logical units.
1702 To get the logical width, it must calculate the X-DPI of the device and the
1705 @param nWidth Width in device pixels
1707 @returns Width in logical units.
1709 SAL_DLLPRIVATE
long ImplDevicePixelToLogicWidth( long nWidth
) const;
1711 /** Convert device pixels to a height in logical units.
1713 To get the logical height, it must calculate the Y-DPI of the device and the
1716 @param nHeight Height in device pixels
1718 @returns Height in logical units.
1720 SAL_DLLPRIVATE
long ImplDevicePixelToLogicHeight( long nHeight
) const;
1722 /** Convert logical height to device pixels, with exact sub-pixel value.
1724 To get the \em exact pixel height, it must calculate the Y-DPI of the device and the
1727 @param nHeight Exact height in logical units.
1729 @returns Exact height in pixels - returns as a float to provide for subpixel value.
1731 SAL_DLLPRIVATE
float ImplFloatLogicHeightToDevicePixel( float ) const;
1733 /** Convert a logical size to the size on the physical device.
1735 @param rLogicSize Const reference to a size in logical units
1737 @returns Physical size on the device.
1739 SAL_DLLPRIVATE Size
ImplLogicToDevicePixel( const Size
& rLogicSize
) const;
1741 /** Convert a rectangle in physical pixel units to a rectangle in physical pixel units and coords.
1743 @param rPixelRect Const reference to rectangle in logical units and coords.
1745 @returns Rectangle based on logical coordinates and units.
1747 SAL_DLLPRIVATE Rectangle
ImplDevicePixelToLogic( const Rectangle
& rPixelRect
) const;
1749 /** Convert a logical B2DPolygon to a B2DPolygon in physical device pixel units.
1751 @param rLogicSize Const reference to a B2DPolygon in logical units
1753 @returns B2DPolyPolygon based on physical device pixel coordinates and units.
1755 SAL_DLLPRIVATE ::basegfx::B2DPolygon
ImplLogicToDevicePixel( const ::basegfx::B2DPolygon
& rLogicPoly
) const;
1757 /** Convert a logical B2DPolyPolygon to a B2DPolyPolygon in physical device pixel units.
1759 @param rLogicPolyPoly Const reference to a B2DPolyPolygon in logical units
1761 @returns B2DPolyPolygon based on physical device pixel coordinates and units.
1763 SAL_DLLPRIVATE ::basegfx::B2DPolyPolygon
ImplLogicToDevicePixel( const ::basegfx::B2DPolyPolygon
& rLogicPolyPoly
) const;
1765 /** Convert a logical polygon to a polygon in physical device pixel units.
1767 @param rLogicPoly Const reference to a polygon in logical units
1769 @returns Polygon based on physical device pixel coordinates and units.
1771 SAL_DLLPRIVATE Polygon
ImplLogicToDevicePixel( const Polygon
& rLogicPoly
) const;
1773 /** Convert a logical polypolygon to a polypolygon in physical device pixel units.
1775 @param rLogicPolyPoly Const reference to a polypolygon in logical units
1777 @returns Polypolygon based on physical device pixel coordinates and units.
1779 SAL_DLLPRIVATE PolyPolygon
ImplLogicToDevicePixel( const PolyPolygon
& rLogicPolyPoly
) const;
1781 /** Convert a line in logical units to a line in physical device pixel units.
1783 @param rLineInfo Const refernece to a line in logical units
1785 @returns Line based on physical device pixel coordinates and units.
1787 SAL_DLLPRIVATE LineInfo
ImplLogicToDevicePixel( const LineInfo
& rLineInfo
) const;
1789 /** Convert a region in pixel units to a region in device pixel units and coords.
1791 @param rPixelRect Const reference to region.
1793 @returns Region based on device pixel coordinates and units.
1795 SAL_DLLPRIVATE Region
ImplPixelToDevicePixel( const Region
& rRegion
) const;
1797 /** Invalidate the view transformation.
1799 @since AOO bug 75163 (OpenOffice.org 2.4.3 - OOH 680 milestone 212)
1801 SAL_DLLPRIVATE
void ImplInvalidateViewTransform();
1803 /** Get device transformation.
1805 @since AOO bug 75163 (OpenOffice.org 2.4.3 - OOH 680 milestone 212)
1807 SAL_DLLPRIVATE
basegfx::B2DHomMatrix
ImplGetDeviceTransformation() const;
1811 /** @name Native Widget Rendering functions
1813 These all just call through to the private mpGraphics functions of the same name.
1819 /** Query the platform layer for control support
1821 bool IsNativeControlSupported( ControlType nType
, ControlPart nPart
) const;
1823 /** Query the native control to determine if it was acted upon
1825 bool HitTestNativeControl(
1828 const Rectangle
& rControlRegion
,
1830 bool& rIsInside
) const;
1832 /** Request rendering of a particular control and/or part
1834 bool DrawNativeControl(
1837 const Rectangle
& rControlRegion
,
1838 ControlState nState
,
1839 const ImplControlValue
& aValue
,
1840 const OUString
& aCaption
);
1842 /** Query the native control's actual drawing region (including adornment)
1844 bool GetNativeControlRegion(
1847 const Rectangle
& rControlRegion
,
1848 ControlState nState
,
1849 const ImplControlValue
& aValue
,
1850 const OUString
& aCaption
,
1851 Rectangle
&rNativeBoundingRegion
,
1852 Rectangle
&rNativeContentRegion
) const;
1855 /** @name EPS functions
1861 /** @returns boolean value to see if EPS could be painted directly.
1862 Theoreticaly, handing over a matrix would be needed to handle
1863 painting rotated EPS files (e.g. contained in Metafiles). This
1864 would then need to be supported for Mac and PS printers, but
1865 that's too much for now, wrote \#i107046# for this */
1867 const Point
& rPt
, const Size
& rSz
,
1868 const GfxLink
& rGfxLink
, GDIMetaFile
* pSubst
= NULL
);
1873 #endif // INCLUDED_VCL_OUTDEV_HXX
1875 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */