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#pragma once
21
22#include <sal/config.h>
23
24#include <sallayout.hxx>
25#include <salgeom.hxx>
26#include <salgdi.hxx>
28#include <fontattributes.hxx>
30#include <impfont.hxx>
32#include <vcl/fontcharmap.hxx>
33#include <systools/win32/comtools.hxx>
34
35#include <memory>
36#include <unordered_set>
37
38#ifndef INCLUDED_PRE_POST_WIN_H
39#define INCLUDED_PRE_POST_WIN_H
40# include <prewin.h>
41# include <postwin.h>
42#endif
43
44#include <hb-ot.h>
45#include <dwrite.h>
46
47namespace vcl::font
48{
49class PhysicalFontCollection;
50class FontSelectPattern;
51}
52class WinFontInstance;
53class ImplFontAttrCache;
54class SalGraphicsImpl;
56class FontMetricData;
57
58#define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000)
59#define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff)
60
61// win32 specific physically available font face
63{
64public:
65 explicit WinFontFace(const ENUMLOGFONTEXW&, const NEWTEXTMETRICW&);
66 ~WinFontFace() override;
67
69 sal_IntPtr GetFontId() const override;
70 void SetFontId( sal_IntPtr nId ) { mnId = nId; }
71
72 BYTE GetCharSet() const { return meWinCharSet; }
74
75 hb_blob_t* GetHbTable(hb_tag_t nTag) const override;
76
77 const std::vector<hb_variation_t>& GetVariations(const LogicalFontInstance&) const override;
78
79private:
80 sal_IntPtr mnId;
81
84 LOGFONTW maLogFont;
85 mutable sal::systools::COMReference<IDWriteFontFace> mxDWFontFace;
86};
87
94{
95protected:
98
100 HBITMAP mhBitmap;
101
104
106 sal_uInt32 *mpData;
107
110
113
114 // If 'disable' is true, this class is a simple wrapper for drawing directly. Subclasses should use true.
115 CompatibleDC(SalGraphics &rGraphics, int x, int y, int width, int height, bool disable=true);
116
117public:
118 static std::unique_ptr< CompatibleDC > create(SalGraphics &rGraphics, int x, int y, int width, int height);
119
120 virtual ~CompatibleDC();
121
123
124 SalTwoRect getTwoRect() const { return maRects; }
125
128
130 void fill(sal_uInt32 color);
131};
132
141{
142 friend class WinSalGraphicsImpl;
143 friend class ScopedFont;
144
145protected:
146 std::unique_ptr<SalGraphicsImpl> mpImpl;
148
149private:
150 HDC mhLocalDC; // HDC
151 bool mbPrinter : 1; // is Printer
152 bool mbVirDev : 1; // is VirDev
153 bool mbWindow : 1; // is Window
154 bool mbScreen : 1; // is Screen compatible
155 HWND mhWnd; // Window-Handle, when Window-Graphics
156
158 mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
159 HRGN mhRegion; // vcl::Region Handle
160 HPEN mhDefPen; // DefaultPen
161 HBRUSH mhDefBrush; // DefaultBrush
162 HFONT mhDefFont; // DefaultFont
163 HPALETTE mhDefPal; // DefaultPalette
164 COLORREF mnTextColor; // TextColor
165 RGNDATA* mpClipRgnData; // ClipRegion-Data
166 RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
167 int mnPenWidth; // line width
168
169 inline static sal::systools::COMReference<IDWriteFactory> mxDWriteFactory;
170 inline static sal::systools::COMReference<IDWriteGdiInterop> mxDWriteGdiInterop;
171 inline static bool bDWriteDone = false;
172
173 // just call both from setHDC!
176
177public:
178 // Return HFONT, and whether the font is for vertical writing ( prefixed with '@' )
179 // and tmDescent value for adjusting offset in vertical writing mode.
180 std::tuple<HFONT,bool,sal_Int32> ImplDoSetFont(HDC hDC, vcl::font::FontSelectPattern const & i_rFont, const vcl::font::PhysicalFontFace * i_pFontFace, HFONT& o_rOldFont);
181
182 HDC getHDC() const { return mhLocalDC; }
183 // NOTE: this doesn't transfer ownership! See class comment.
184 void setHDC(HDC aNew);
185
186 HPALETTE getDefPal() const;
187 // returns the result from RealizePalette, otherwise 0 on success or GDI_ERROR
188 UINT setPalette(HPALETTE, BOOL bForceBkgd = TRUE);
189
190 HRGN getRegion() const;
191
192
193 enum Type
194 {
198 SCREEN
199 };
200
201 static void getDWriteFactory(IDWriteFactory** pFactory, IDWriteGdiInterop** pInterop = nullptr);
202
203public:
204
205 HWND gethWnd();
206
207
208public:
209 explicit WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd,
210 SalGeometryProvider *pProvider);
211 virtual ~WinSalGraphics() override;
212
213 SalGraphicsImpl* GetImpl() const override;
215 bool isPrinter() const;
216 bool isVirtualDevice() const;
217 bool isWindow() const;
218 bool isScreen() const;
219
220 void setHWND(HWND hWnd);
221 void Flush();
222
223protected:
224 virtual void setClipRegion( const vcl::Region& ) override;
225 // draw --> LineColor and FillColor and RasterOp and ClipRegion
226 virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
227 virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
228 virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
229 virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
230 virtual void drawPolyLine( sal_uInt32 nPoints, const Point* pPtAry ) override;
231 virtual void drawPolygon( sal_uInt32 nPoints, const Point* pPtAry ) override;
232 virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point** pPtAry ) override;
233 virtual bool drawPolyPolygon(
234 const basegfx::B2DHomMatrix& rObjectToDevice,
236 double fTransparency) override;
237 virtual bool drawPolyLine(
238 const basegfx::B2DHomMatrix& rObjectToDevice,
239 const basegfx::B2DPolygon&,
240 double fTransparency,
241 double fLineWidth,
242 const std::vector< double >* pStroke, // MM01
244 css::drawing::LineCap,
245 double fMiterMinimumAngle,
246 bool bPixelSnapHairline) override;
247 virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry ) override;
248 virtual bool drawPolygonBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry ) override;
249 virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point* const* pPtAry, const PolyFlags* const* pFlgAry ) override;
250 virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override;
251 virtual bool implDrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon, SalGradient const & rGradient) override;
252
253 // CopyArea --> No RasterOp, but ClipRegion
254 virtual void copyArea( tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth,
255 tools::Long nSrcHeight, bool bWindowInvalidate ) override;
256
257 // CopyBits and DrawBitmap --> RasterOp and ClipRegion
258 // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
259 virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override;
260 virtual void drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) override;
261 virtual void drawBitmap( const SalTwoRect& rPosAry,
262 const SalBitmap& rSalBitmap,
263 const SalBitmap& rTransparentBitmap ) override;
264 virtual void drawMask( const SalTwoRect& rPosAry,
265 const SalBitmap& rSalBitmap,
266 Color nMaskColor ) override;
267
268 virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
269 virtual Color getPixel( tools::Long nX, tools::Long nY ) override;
270
271 // invert --> ClipRegion (only Windows or VirDevs)
272 virtual void invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override;
273 virtual void invert( sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags ) override;
274
275 virtual bool drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) override;
276
277 // native widget rendering methods that require mirroring
278protected:
279 virtual bool isNativeControlSupported( ControlType nType, ControlPart nPart ) override;
280 virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
281 const Point& aPos, bool& rIsInside ) override;
282 virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
283 ControlState nState, const ImplControlValue& aValue,
284 const OUString& aCaption, const Color& rBackgroundColor ) override;
285 virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
286 const ImplControlValue& aValue, const OUString& aCaption,
287 tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
288
289public:
290 virtual bool blendBitmap( const SalTwoRect&,
291 const SalBitmap& rBitmap ) override;
292
293 virtual bool blendAlphaBitmap( const SalTwoRect&,
294 const SalBitmap& rSrcBitmap,
295 const SalBitmap& rMaskBitmap,
296 const SalBitmap& rAlphaBitmap ) override;
297
298 virtual bool drawAlphaBitmap( const SalTwoRect&,
299 const SalBitmap& rSourceBitmap,
300 const SalBitmap& rAlphaBitmap ) override;
302 const basegfx::B2DPoint& rNull,
303 const basegfx::B2DPoint& rX,
304 const basegfx::B2DPoint& rY,
305 const SalBitmap& rSourceBitmap,
306 const SalBitmap* pAlphaBitmap,
307 double fAlpha) override;
308
309 virtual bool hasFastDrawTransformedBitmap() const override;
310
311 virtual bool drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency ) override;
312
313private:
314 // local helpers
315
316 void DrawTextLayout(const GenericSalLayout&, HDC, bool bUseDWrite, bool bRenderingModeNatural);
317
318public:
319 // public SalGraphics methods, the interface to the independent vcl part
320
321 // get device resolution
322 virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
323 // get the depth of the device
324 virtual sal_uInt16 GetBitCount() const override;
325 // get the width of the device
326 virtual tools::Long GetGraphicsWidth() const override;
327
328 // set the clip region to empty
329 virtual void ResetClipRegion() override;
330
331 // set the line color to transparent (= don't draw lines)
332 virtual void SetLineColor() override;
333 // set the line color to a specific color
334 virtual void SetLineColor( Color nColor ) override;
335 // set the fill color to transparent (= don't fill)
336 virtual void SetFillColor() override;
337 // set the fill color to a specific color, shapes will be
338 // filled accordingly
339 virtual void SetFillColor( Color nColor ) override;
340 // enable/disable XOR drawing
341 virtual void SetXORMode( bool bSet, bool ) override;
342 // set line color for raster operations
343 virtual void SetROPLineColor( SalROPColor nROPColor ) override;
344 // set fill color for raster operations
345 virtual void SetROPFillColor( SalROPColor nROPColor ) override;
346 // set the text color to a specific color
347 virtual void SetTextColor( Color nColor ) override;
348 // set the font
349 virtual void SetFont( LogicalFontInstance*, int nFallbackLevel ) override;
350 // get the current font's metrics
351 virtual void GetFontMetric( FontMetricDataRef&, int nFallbackLevel ) override;
352 // get the repertoire of the current font
353 virtual FontCharMapRef GetFontCharMap() const override;
354 // get the layout capabilities of the current font
355 virtual bool GetFontCapabilities(vcl::FontCapabilities &rGetFontCapabilities) const override;
356 // graphics must fill supplied font list
358 // graphics must drop any cached font info
359 virtual void ClearDevFontCache() override;
360 virtual bool AddTempDevFont( vcl::font::PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
361
362 virtual std::unique_ptr<GenericSalLayout>
363 GetTextLayout(int nFallbackLevel) override;
364 virtual void DrawTextLayout( const GenericSalLayout& ) override;
365
366 virtual bool supportsOperation( OutDevSupportType ) const override;
367
368 virtual SystemGraphicsData GetGraphicsData() const override;
369
371 static void updateSettingsNative( AllSettings& rSettings );
372};
373
374// Init/Deinit Graphics
378 const vcl::font::PhysicalFontFace*, LOGFONTW& );
379
380#define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS))
381
382/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
Class that creates (and destroys) a compatible Device Context.
Definition: win/salgdi.h:94
tools::Long getBitmapHeight() const
Definition: win/salgdi.h:127
HDC mhCompatibleDC
The compatible DC that we create for our purposes.
Definition: win/salgdi.h:97
SalTwoRect maRects
Mapping between the GDI position and OpenGL, to use for OpenGL drawing.
Definition: win/salgdi.h:109
virtual ~CompatibleDC()
HBITMAP mhOrigBitmap
Return the previous bitmap to undo the SelectObject.
Definition: win/salgdi.h:103
void fill(sal_uInt32 color)
Reset the DC with the defined color.
HDC getCompatibleHDC()
Definition: win/salgdi.h:122
tools::Long getBitmapWidth() const
Definition: win/salgdi.h:126
HBITMAP mhBitmap
DIBSection that we use for the GDI drawing, and later obtain.
Definition: win/salgdi.h:100
sal_uInt32 * mpData
DIBSection data.
Definition: win/salgdi.h:106
CompatibleDC(SalGraphics &rGraphics, int x, int y, int width, int height, bool disable=true)
WinSalGraphicsImplBase * mpImpl
The SalGraphicsImpl where we will draw. If null, we ignore the drawing, it means it happened directly...
Definition: win/salgdi.h:112
static std::unique_ptr< CompatibleDC > create(SalGraphics &rGraphics, int x, int y, int width, int height)
SalTwoRect getTwoRect() const
Definition: win/salgdi.h:124
Interface used to share logic on sizing between SalVirtualDevices and SalFrames.
Definition: salgeom.hxx:80
Implementation class for SalGraphics.
Definition: salgdiimpl.hxx:51
BYTE GetCharSet() const
Definition: win/salgdi.h:72
const std::vector< hb_variation_t > & GetVariations(const LogicalFontInstance &) const override
WinFontFace(const ENUMLOGFONTEXW &, const NEWTEXTMETRICW &)
BYTE meWinCharSet
Definition: win/salgdi.h:82
sal_IntPtr GetFontId() const override
LOGFONTW maLogFont
Definition: win/salgdi.h:84
BYTE GetPitchAndFamily() const
Definition: win/salgdi.h:73
BYTE mnPitchAndFamily
Definition: win/salgdi.h:83
hb_blob_t * GetHbTable(hb_tag_t nTag) const override
rtl::Reference< LogicalFontInstance > CreateFontInstance(const vcl::font::FontSelectPattern &) const override
void SetFontId(sal_IntPtr nId)
Definition: win/salgdi.h:70
sal::systools::COMReference< IDWriteFontFace > mxDWFontFace
Definition: win/salgdi.h:85
~WinFontFace() override
sal_IntPtr mnId
Definition: win/salgdi.h:80
WinSalGraphics never owns the HDC it uses to draw, because the HDC can have various origins with diff...
Definition: win/salgdi.h:141
virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
virtual bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
Blend the bitmap with the current buffer.
virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
virtual void ClearDevFontCache() override
UINT setPalette(HPALETTE, BOOL bForceBkgd=TRUE)
static sal::systools::COMReference< IDWriteGdiInterop > mxDWriteGdiInterop
Definition: win/salgdi.h:170
WinSalGraphicsImplBase * mWinSalGraphicsImplBase
Definition: win/salgdi.h:147
virtual void SetLineColor() override
virtual bool AddTempDevFont(vcl::font::PhysicalFontCollection *, const OUString &rFileURL, const OUString &rFontName) override
virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
COLORREF mnTextColor
Definition: win/salgdi.h:164
virtual void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
virtual sal_uInt16 GetBitCount() const override
virtual void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) 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.
bool isVirtualDevice() const
bool isScreen() const
bool isWindow() const
friend class WinSalGraphicsImpl
Definition: win/salgdi.h:142
HDC getHDC() const
Definition: win/salgdi.h:182
SalGraphicsImpl * GetImpl() const override
virtual bool hasFastDrawTransformedBitmap() const override
Returns true if the drawTransformedBitmap() call is fast, and so it should be used directly without t...
virtual void SetLineColor(Color nColor) override
static bool bDWriteDone
Definition: win/salgdi.h:171
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.
void DeInitGraphics()
virtual void DrawTextLayout(const GenericSalLayout &) override
virtual void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry) override
virtual tools::Long GetGraphicsWidth() const override
virtual void SetROPLineColor(SalROPColor nROPColor) override
std::tuple< HFONT, bool, sal_Int32 > ImplDoSetFont(HDC hDC, vcl::font::FontSelectPattern const &i_rFont, const vcl::font::PhysicalFontFace *i_pFontFace, HFONT &o_rOldFont)
virtual bool isNativeControlSupported(ControlType nType, ControlPart nPart) override
Query the platform layer for native control support.
virtual void SetTextColor(Color nColor) override
void DrawTextLayout(const GenericSalLayout &, HDC, bool bUseDWrite, bool bRenderingModeNatural)
virtual std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry) 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 void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
virtual void setClipRegion(const vcl::Region &) override
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
virtual bool supportsOperation(OutDevSupportType) const override
virtual std::unique_ptr< GenericSalLayout > GetTextLayout(int nFallbackLevel) override
virtual void SetXORMode(bool bSet, bool) override
WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd, SalGeometryProvider *pProvider)
virtual void invert(sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags) override
virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
RGNDATA * mpClipRgnData
Definition: win/salgdi.h:165
bool isPrinter() const
void setHDC(HDC aNew)
rtl::Reference< WinFontInstance > mpWinFontEntry[MAX_FALLBACK]
Definition: win/salgdi.h:158
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry) override
RGNDATA * mpStdClipRgnData
Definition: win/salgdi.h:166
virtual void ResetClipRegion() 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.
HRGN getRegion() const
virtual void SetFillColor(Color nColor) override
virtual void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override
HPALETTE getDefPal() const
virtual void SetFont(LogicalFontInstance *, int nFallbackLevel) override
WinSalGraphicsImplBase * getWinSalGraphicsImplBase() const
Definition: win/salgdi.h:214
HPALETTE mhDefPal
Definition: win/salgdi.h:163
virtual void SetFillColor() override
virtual bool drawGradient(const tools::PolyPolygon &, const Gradient &) 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
virtual FontCharMapRef GetFontCharMap() const override
virtual bool drawPolyLine(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolygon &, double fTransparency, double fLineWidth, const std::vector< double > *pStroke, basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle, bool bPixelSnapHairline) override
virtual void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry) override
virtual bool GetFontCapabilities(vcl::FontCapabilities &rGetFontCapabilities) const override
virtual void SetROPFillColor(SalROPColor nROPColor) override
virtual bool drawPolyPolygon(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &, double fTransparency) override
friend class ScopedFont
Definition: win/salgdi.h:143
void setHWND(HWND hWnd)
virtual Color getPixel(tools::Long nX, tools::Long nY) override
static sal::systools::COMReference< IDWriteFactory > mxDWriteFactory
Definition: win/salgdi.h:169
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 ~WinSalGraphics() override
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const SalBitmap &rTransparentBitmap) override
virtual bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
virtual void GetFontMetric(FontMetricDataRef &, int nFallbackLevel) override
static void updateSettingsNative(AllSettings &rSettings)
Update settings based on the platform values.
virtual bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
Render bitmap with alpha channel.
virtual void GetDevFontList(vcl::font::PhysicalFontCollection *) override
virtual void GetResolution(sal_Int32 &rDPIX, sal_Int32 &rDPIY) override
virtual void drawPixel(tools::Long nX, tools::Long nY) override
static void getDWriteFactory(IDWriteFactory **pFactory, IDWriteGdiInterop **pInterop=nullptr)
HBRUSH mhDefBrush
Definition: win/salgdi.h:161
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.
virtual bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient) override
void InitGraphics()
virtual SystemGraphicsData GetGraphicsData() const override
std::unique_ptr< SalGraphicsImpl > mpImpl
Definition: win/salgdi.h:146
abstract base class for physical font faces
long Long
A PhysicalFontFaceCollection is created by a PhysicalFontCollection and becomes invalid when original...
sal_Int16 nId
PolyFlags
const wchar_t *typedef BOOL
SalROPColor
Definition: salgtype.hxx:69
SalInvert
Definition: salgtype.hxx:73
#define MAX_FALLBACK
Definition: sallayout.hxx:46
tools::Long mnSrcHeight
Definition: salgtype.hxx:42
tools::Long mnSrcWidth
Definition: salgtype.hxx:41
unsigned char sal_uInt8
unsigned char BYTE
OutDevSupportType
Definition: vclenum.hxx:163
int ImplIsSysColorEntry(Color nColor)
void ImplGetLogFontFromFontSelect(const vcl::font::FontSelectPattern &, const vcl::font::PhysicalFontFace *, LOGFONTW &)
void ImplUpdateSysColorEntries()