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