LibreOffice Module vcl (master)  1
win/salgdi.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_VCL_INC_WIN_SALGDI_H
21 #define INCLUDED_VCL_INC_WIN_SALGDI_H
22 
23 #include <sallayout.hxx>
24 #include <salgeom.hxx>
25 #include <salgdi.hxx>
26 #include <fontinstance.hxx>
27 #include <fontattributes.hxx>
28 #include <PhysicalFontFace.hxx>
29 #include <impfont.hxx>
30 #include <vcl/fontcapabilities.hxx>
31 #include <vcl/fontcharmap.hxx>
32 
33 #include <memory>
34 #include <unordered_set>
35 
36 #ifndef INCLUDED_PRE_POST_WIN_H
37 #define INCLUDED_PRE_POST_WIN_H
38 # include <prewin.h>
39 # include <postwin.h>
40 #endif
41 
42 #include <hb-ot.h>
43 #include <dwrite.h>
44 
45 class FontSelectPattern;
46 class WinFontInstance;
47 class ImplFontAttrCache;
49 class SalGraphicsImpl;
51 class ImplFontMetricData;
52 
53 #define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000)
54 #define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff)
55 
56 // win32 specific physically available font face
58 {
59 public:
60  explicit WinFontFace( const FontAttributes&,
61  BYTE eWinCharSet,
62  BYTE nPitchAndFamily );
63  virtual ~WinFontFace() override;
64 
66  virtual sal_IntPtr GetFontId() const override;
67  void SetFontId( sal_IntPtr nId ) { mnId = nId; }
68  void UpdateFromHDC( HDC ) const;
69 
70  bool HasChar( sal_uInt32 cChar ) const;
71 
72  BYTE GetCharSet() const { return meWinCharSet; }
74 
75  FontCharMapRef GetFontCharMap() const override;
76  bool GetFontCapabilities(vcl::FontCapabilities&) const override;
77 
78 private:
79  sal_IntPtr mnId;
80 
81  // some members that are initialized lazily when the font gets selected into a HDC
82  mutable bool mbFontCapabilitiesRead;
85 
90 
91  void ReadCmapTable( HDC ) const;
92  void GetFontCapabilities( HDC hDC ) const;
93 };
94 
101 {
102 protected:
105 
107  HBITMAP mhBitmap;
108 
110  HBITMAP mhOrigBitmap;
111 
113  sal_uInt32 *mpData;
114 
117 
120 
121  // If 'disable' is true, this class is a simple wrapper for drawing directly. Subclasses should use true.
122  CompatibleDC(SalGraphics &rGraphics, int x, int y, int width, int height, bool disable=true);
123 
124 public:
125  static std::unique_ptr< CompatibleDC > create(SalGraphics &rGraphics, int x, int y, int width, int height);
126 
127  virtual ~CompatibleDC();
128 
130 
131  SalTwoRect getTwoRect() const { return maRects; }
132 
133  tools::Long getBitmapWidth() const { return maRects.mnSrcWidth; }
134  tools::Long getBitmapHeight() const { return maRects.mnSrcHeight; }
135 
137  void fill(sal_uInt32 color);
138 };
139 
141 {
142  friend class WinSalGraphicsImpl;
143  friend class ScopedFont;
144 
145 protected:
146  std::unique_ptr<SalGraphicsImpl> mpImpl;
147 
148 private:
149  HDC mhLocalDC; // HDC
150  bool mbPrinter : 1; // is Printer
151  bool mbVirDev : 1; // is VirDev
152  bool mbWindow : 1; // is Window
153  bool mbScreen : 1; // is Screen compatible
154  HWND mhWnd; // Window-Handle, when Window-Graphics
155 
157  mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
158  HRGN mhRegion; // vcl::Region Handle
159  HPEN mhDefPen; // DefaultPen
160  HBRUSH mhDefBrush; // DefaultBrush
161  HFONT mhDefFont; // DefaultFont
162  HPALETTE mhDefPal; // DefaultPalette
163  COLORREF mnTextColor; // TextColor
164  RGNDATA* mpClipRgnData; // ClipRegion-Data
165  RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
166  int mnPenWidth; // line width
167 
168 public:
169  HFONT ImplDoSetFont(FontSelectPattern const & i_rFont, const PhysicalFontFace * i_pFontFace, HFONT& o_rOldFont);
170 
171  HDC getHDC() const { return mhLocalDC; }
172  void setHDC(HDC aNew) { mhLocalDC = aNew; }
173 
174  HPALETTE getDefPal() const;
175  void setDefPal(HPALETTE hDefPal);
176 
177  HRGN getRegion() const;
178 
179  void InitGraphics();
180  void DeInitGraphics();
181 
182  enum Type
183  {
188  };
189 
190 public:
191 
192  HWND gethWnd();
193 
194 
195 public:
196  explicit WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd,
197  SalGeometryProvider *pProvider);
198  virtual ~WinSalGraphics() override;
199 
200  SalGraphicsImpl* GetImpl() const override;
201  bool isPrinter() const;
202  bool isVirtualDevice() const;
203  bool isWindow() const;
204  bool isScreen() const;
205 
206  void setHWND(HWND hWnd);
207  void Flush();
208 
209 protected:
210  virtual bool setClipRegion( const vcl::Region& ) override;
211  // draw --> LineColor and FillColor and RasterOp and ClipRegion
212  virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
213  virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
214  virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
215  virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
216  virtual void drawPolyLine( sal_uInt32 nPoints, const Point* pPtAry ) override;
217  virtual void drawPolygon( sal_uInt32 nPoints, const Point* pPtAry ) override;
218  virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point** pPtAry ) override;
219  virtual bool drawPolyPolygon(
220  const basegfx::B2DHomMatrix& rObjectToDevice,
222  double fTransparency) override;
223  virtual bool drawPolyLine(
224  const basegfx::B2DHomMatrix& rObjectToDevice,
225  const basegfx::B2DPolygon&,
226  double fTransparency,
227  double fLineWidth,
228  const std::vector< double >* pStroke, // MM01
230  css::drawing::LineCap,
231  double fMiterMinimumAngle,
232  bool bPixelSnapHairline) override;
233  virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry ) override;
234  virtual bool drawPolygonBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry ) override;
235  virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point* const* pPtAry, const PolyFlags* const* pFlgAry ) override;
236  virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override;
237  virtual bool implDrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon, SalGradient const & rGradient) override;
238 
239  // CopyArea --> No RasterOp, but ClipRegion
240  virtual void copyArea( tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth,
241  tools::Long nSrcHeight, bool bWindowInvalidate ) override;
242 
243  // CopyBits and DrawBitmap --> RasterOp and ClipRegion
244  // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
245  virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override;
246  virtual void drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) override;
247  virtual void drawBitmap( const SalTwoRect& rPosAry,
248  const SalBitmap& rSalBitmap,
249  const SalBitmap& rTransparentBitmap ) override;
250  virtual void drawMask( const SalTwoRect& rPosAry,
251  const SalBitmap& rSalBitmap,
252  Color nMaskColor ) override;
253 
254  virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
255  virtual Color getPixel( tools::Long nX, tools::Long nY ) override;
256 
257  // invert --> ClipRegion (only Windows or VirDevs)
258  virtual void invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override;
259  virtual void invert( sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags ) override;
260 
261  virtual bool drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) override;
262 
263  // native widget rendering methods that require mirroring
264 protected:
265  virtual bool isNativeControlSupported( ControlType nType, ControlPart nPart ) override;
266  virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
267  const Point& aPos, bool& rIsInside ) override;
268  virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
269  ControlState nState, const ImplControlValue& aValue,
270  const OUString& aCaption, const Color& rBackgroundColor ) override;
271  virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
272  const ImplControlValue& aValue, const OUString& aCaption,
273  tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
274 
275 public:
276  virtual bool blendBitmap( const SalTwoRect&,
277  const SalBitmap& rBitmap ) override;
278 
279  virtual bool blendAlphaBitmap( const SalTwoRect&,
280  const SalBitmap& rSrcBitmap,
281  const SalBitmap& rMaskBitmap,
282  const SalBitmap& rAlphaBitmap ) override;
283 
284  virtual bool drawAlphaBitmap( const SalTwoRect&,
285  const SalBitmap& rSourceBitmap,
286  const SalBitmap& rAlphaBitmap ) override;
287  virtual bool drawTransformedBitmap(
288  const basegfx::B2DPoint& rNull,
289  const basegfx::B2DPoint& rX,
290  const basegfx::B2DPoint& rY,
291  const SalBitmap& rSourceBitmap,
292  const SalBitmap* pAlphaBitmap,
293  double fAlpha) override;
294 
295  virtual bool hasFastDrawTransformedBitmap() const override;
296 
297  virtual bool drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency ) override;
298 
299 private:
300  // local helpers
301 
302  void DrawTextLayout(const GenericSalLayout&, HDC, bool bUseDWrite);
303 
304 public:
305  // public SalGraphics methods, the interface to the independent vcl part
306 
307  // get device resolution
308  virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
309  // get the depth of the device
310  virtual sal_uInt16 GetBitCount() const override;
311  // get the width of the device
312  virtual tools::Long GetGraphicsWidth() const override;
313 
314  // set the clip region to empty
315  virtual void ResetClipRegion() override;
316 
317  // set the line color to transparent (= don't draw lines)
318  virtual void SetLineColor() override;
319  // set the line color to a specific color
320  virtual void SetLineColor( Color nColor ) override;
321  // set the fill color to transparent (= don't fill)
322  virtual void SetFillColor() override;
323  // set the fill color to a specific color, shapes will be
324  // filled accordingly
325  virtual void SetFillColor( Color nColor ) override;
326  // enable/disable XOR drawing
327  virtual void SetXORMode( bool bSet, bool ) override;
328  // set line color for raster operations
329  virtual void SetROPLineColor( SalROPColor nROPColor ) override;
330  // set fill color for raster operations
331  virtual void SetROPFillColor( SalROPColor nROPColor ) override;
332  // set the text color to a specific color
333  virtual void SetTextColor( Color nColor ) override;
334  // set the font
335  virtual void SetFont( LogicalFontInstance*, int nFallbackLevel ) override;
336  // get the current font's metrics
337  virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
338  // get the repertoire of the current font
339  virtual FontCharMapRef GetFontCharMap() const override;
340  // get the layout capabilities of the current font
341  virtual bool GetFontCapabilities(vcl::FontCapabilities &rGetFontCapabilities) const override;
342  // graphics must fill supplied font list
343  virtual void GetDevFontList( PhysicalFontCollection* ) override;
344  // graphics must drop any cached font info
345  virtual void ClearDevFontCache() override;
346  virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
347  // CreateFontSubset: a method to get a subset of glyhps of a font
348  // inside a new valid font file
349  // returns TRUE if creation of subset was successful
350  // parameters: rToFile: contains an osl file URL to write the subset to
351  // pFont: describes from which font to create a subset
352  // pGlyphIDs: the glyph ids to be extracted
353  // pEncoding: the character code corresponding to each glyph
354  // pWidths: the advance widths of the corresponding glyphs (in PS font units)
355  // nGlyphs: the number of glyphs
356  // rInfo: additional outgoing information
357  // implementation note: encoding 0 with glyph id 0 should be added implicitly
358  // as "undefined character"
359  virtual bool CreateFontSubset( const OUString& rToFile,
360  const PhysicalFontFace*,
361  const sal_GlyphId* pGlyphIDs,
362  const sal_uInt8* pEncoding,
363  sal_Int32* pWidths,
364  int nGlyphs,
365  FontSubsetInfo& rInfo // out parameter
366  ) override;
367 
368  // GetEmbedFontData: gets the font data for a font marked
369  // embeddable by GetDevFontList or NULL in case of error
370  // parameters: pFont: describes the font in question
371  // pDataLen: out parameter, contains the byte length of the returned buffer
372  virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen) override;
373  // frees the font data again
374  virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
375  virtual void GetGlyphWidths( const PhysicalFontFace*,
376  bool bVertical,
377  std::vector< sal_Int32 >& rWidths,
378  Ucs2UIntMap& rUnicodeEnc ) override;
379 
380  virtual std::unique_ptr<GenericSalLayout>
381  GetTextLayout(int nFallbackLevel) override;
382  virtual void DrawTextLayout( const GenericSalLayout& ) override;
383 
384  virtual bool supportsOperation( OutDevSupportType ) const override;
385 
386  virtual SystemGraphicsData GetGraphicsData() const override;
387 
389  static void updateSettingsNative( AllSettings& rSettings );
390 };
391 
392 // Init/Deinit Graphics
394 int ImplIsSysColorEntry( Color nColor );
396  const PhysicalFontFace*, LOGFONTW& );
397 
398 #define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS))
399 
400 // called extremely often from just one spot => inline
401 inline bool WinFontFace::HasChar( sal_uInt32 cChar ) const
402 {
403  if( mxUnicodeMap->HasChar( cChar ) )
404  return true;
405  // second chance to allow symbol aliasing
406  if( mbAliasSymbolsLow && ((cChar-0xF000) <= 0xFF) )
407  cChar -= 0xF000;
408  else if( mbAliasSymbolsHigh && (cChar <= 0xFF) )
409  cChar += 0xF000;
410  else
411  return false;
412  return mxUnicodeMap->HasChar( cChar );
413 }
414 
415 #endif // INCLUDED_VCL_INC_WIN_SALGDI_H
416 
417 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Interface used to share logic on sizing between SalVirtualDevices and SalFrames.
Definition: salgeom.hxx:63
virtual std::unique_ptr< GenericSalLayout > GetTextLayout(int nFallbackLevel) override
bool HasChar(sal_UCS4) const
Does the font character map include the UCS4 character?
RGNDATA * mpClipRgnData
Definition: win/salgdi.h:164
FontCharMapRef mxUnicodeMap
Definition: win/salgdi.h:83
bool HasChar(sal_uInt32 cChar) const
Definition: win/salgdi.h:401
virtual bool CreateFontSubset(const OUString &rToFile, const PhysicalFontFace *, const sal_GlyphId *pGlyphIDs, const sal_uInt8 *pEncoding, sal_Int32 *pWidths, int nGlyphs, FontSubsetInfo &rInfo) override
virtual void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry) override
SalROPColor
Definition: salgtype.hxx:71
CompatibleDC(SalGraphics &rGraphics, int x, int y, int width, int height, bool disable=true)
BYTE GetCharSet() const
Definition: win/salgdi.h:72
void DrawTextLayout(const GenericSalLayout &, HDC, bool bUseDWrite)
virtual void SetFillColor() override
virtual sal_IntPtr GetFontId() const override
virtual void SetTextColor(Color nColor) override
virtual bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency) override
Render solid rectangle with given transparency.
virtual tools::Long GetGraphicsWidth() const override
virtual void SetROPFillColor(SalROPColor nROPColor) override
virtual void SetROPLineColor(SalROPColor nROPColor) override
void setHWND(HWND hWnd)
unsigned char BYTE
HDC getHDC() const
Definition: win/salgdi.h:171
#define MAX_FALLBACK
Definition: sallayout.hxx:42
long Long
friend class ScopedFont
Definition: win/salgdi.h:143
void UpdateFromHDC(HDC) const
virtual ~WinFontFace() override
tools::Long mnSrcHeight
Definition: salgtype.hxx:44
HPALETTE getDefPal() const
HBITMAP mhBitmap
DIBSection that we use for the GDI drawing, and later obtain.
Definition: win/salgdi.h:107
tools::Long mnSrcWidth
Definition: salgtype.hxx:43
virtual bool drawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const Color &rBackgroundColor) override
Draw the requested control.
bool mbAliasSymbolsHigh
Definition: win/salgdi.h:88
virtual bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap) override
Draw the bitmap by blending using the mask and alpha channel.
sal_uInt16 sal_GlyphId
Definition: glyphitem.hxx:28
OutDevSupportType
Definition: vclenum.hxx:196
COLORREF mnTextColor
Definition: win/salgdi.h:163
virtual FontCharMapRef GetFontCharMap() const override
sal_uInt32 * mpData
DIBSection data.
Definition: win/salgdi.h:113
bool mbAliasSymbolsLow
Definition: win/salgdi.h:89
SalTwoRect maRects
Mapping between the GDI position and OpenGL, to use for OpenGL drawing.
Definition: win/salgdi.h:116
SalGraphicsImpl * GetImpl() const override
virtual void SetXORMode(bool bSet, bool) override
HBITMAP mhOrigBitmap
Return the previous bitmap to undo the SelectObject.
Definition: win/salgdi.h:110
bool isVirtualDevice() const
virtual bool AddTempDevFont(PhysicalFontCollection *, const OUString &rFileURL, const OUString &rFontName) override
virtual void GetDevFontList(PhysicalFontCollection *) override
virtual void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry) override
rtl::Reference< WinFontInstance > mpWinFontEntry[MAX_FALLBACK]
Definition: win/salgdi.h:157
tools::Long getBitmapHeight() const
Definition: win/salgdi.h:134
HPALETTE mhDefPal
Definition: win/salgdi.h:162
WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd, SalGeometryProvider *pProvider)
bool mbFontCapabilitiesRead
Definition: win/salgdi.h:82
SalTwoRect getTwoRect() const
Definition: win/salgdi.h:131
void SetFontId(sal_IntPtr nId)
Definition: win/salgdi.h:67
virtual void GetResolution(sal_Int32 &rDPIX, sal_Int32 &rDPIY) override
bool isWindow() const
virtual bool GetFontCapabilities(vcl::FontCapabilities &rGetFontCapabilities) const override
virtual bool hasFastDrawTransformedBitmap() const override
Used e.g.
virtual bool supportsOperation(OutDevSupportType) const override
virtual void GetFontMetric(ImplFontMetricDataRef &, int nFallbackLevel) override
virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
abstract base class for physical font faces
HDC getCompatibleHDC()
Definition: win/salgdi.h:129
void setHDC(HDC aNew)
Definition: win/salgdi.h:172
BYTE GetPitchAndFamily() const
Definition: win/salgdi.h:73
virtual bool setClipRegion(const vcl::Region &) override
virtual void FreeEmbedFontData(const void *pData, tools::Long nDataLen) override
virtual ~WinSalGraphics() override
virtual rtl::Reference< LogicalFontInstance > CreateFontInstance(const FontSelectPattern &) const override
virtual std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
void ImplUpdateSysColorEntries()
virtual void GetGlyphWidths(const PhysicalFontFace *, bool bVertical, std::vector< sal_Int32 > &rWidths, Ucs2UIntMap &rUnicodeEnc) override
sal_IntPtr mnId
Definition: win/salgdi.h:79
virtual void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
WinSalGraphicsImplBase * mpImpl
The SalGraphicsImpl where we will draw. If null, we ignore the drawing, it means it happened directly...
Definition: win/salgdi.h:119
SalInvert
Definition: salgtype.hxx:75
WinFontFace(const FontAttributes &, BYTE eWinCharSet, BYTE nPitchAndFamily)
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
void setDefPal(HPALETTE hDefPal)
virtual void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
virtual bool hitTestNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, const Point &aPos, bool &rIsInside) override
Query if a position is inside the native widget part.
void InitGraphics()
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
FontCharMapRef GetFontCharMap() const override
bool isPrinter() const
HFONT ImplDoSetFont(FontSelectPattern const &i_rFont, const PhysicalFontFace *i_pFontFace, HFONT &o_rOldFont)
virtual void SetFont(LogicalFontInstance *, int nFallbackLevel) override
static std::unique_ptr< CompatibleDC > create(SalGraphics &rGraphics, int x, int y, int width, int height)
void DeInitGraphics()
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry) override
unsigned char sal_uInt8
tools::Long getBitmapWidth() const
Definition: win/salgdi.h:133
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry) override
friend class WinSalGraphicsImpl
Definition: win/salgdi.h:142
vcl::FontCapabilities maFontCapabilities
Definition: win/salgdi.h:84
bool isScreen() const
virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
HBRUSH mhDefBrush
Definition: win/salgdi.h:160
bool GetFontCapabilities(vcl::FontCapabilities &) const override
virtual bool getNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) override
Get the native control regions for the control part.
virtual Color getPixel(tools::Long nX, tools::Long nY) override
virtual bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha) override
draw transformed bitmap (maybe with alpha) where Null, X, Y define the coordinate system ...
virtual void SetLineColor() override
virtual bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
Blend the bitmap with the current buffer.
virtual bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
RGNDATA * mpStdClipRgnData
Definition: win/salgdi.h:165
virtual void ClearDevFontCache() override
virtual void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override
BYTE mnPitchAndFamily
Definition: win/salgdi.h:87
void fill(sal_uInt32 color)
Reset the DC with the defined color.
virtual void ResetClipRegion() override
virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
virtual SystemGraphicsData GetGraphicsData() const override
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
Definition: salgdi.hxx:64
HRGN getRegion() const
virtual void drawPixel(tools::Long nX, tools::Long nY) override
HDC mhCompatibleDC
The compatible DC that we create for our purposes.
Definition: win/salgdi.h:104
int ImplIsSysColorEntry(Color nColor)
virtual bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
Render bitmap with alpha channel.
virtual const void * GetEmbedFontData(const PhysicalFontFace *, tools::Long *pDataLen) override
void ReadCmapTable(HDC) const
virtual bool drawGradient(const tools::PolyPolygon &, const Gradient &) override
std::unique_ptr< SalGraphicsImpl > mpImpl
Definition: win/salgdi.h:146
BYTE meWinCharSet
Definition: win/salgdi.h:86
virtual bool isNativeControlSupported(ControlType nType, ControlPart nPart) override
Query the platform layer for native control support.
void ImplGetLogFontFromFontSelect(HDC, const FontSelectPattern &, const PhysicalFontFace *, LOGFONTW &)
virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
static void updateSettingsNative(AllSettings &rSettings)
Update settings based on the platform values.
virtual bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient) override
PolyFlags
virtual sal_uInt16 GetBitCount() const override
virtual ~CompatibleDC()
Class that creates (and destroys) a compatible Device Context.
Definition: win/salgdi.h:100