LibreOffice Module vcl (master) 1
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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 .
18 */
20#pragma once
22#include <sal/config.h>
24#include <sallayout.hxx>
25#include <salgeom.hxx>
26#include <salgdi.hxx>
27#include <fontinstance.hxx>
28#include <fontattributes.hxx>
30#include <impfont.hxx>
32#include <vcl/fontcharmap.hxx>
34#include <memory>
35#include <unordered_set>
39# include <prewin.h>
40# include <postwin.h>
43#include <hb-ot.h>
44#include <dwrite.h>
46namespace vcl::font
48class PhysicalFontCollection;
49class FontSelectPattern;
51class WinFontInstance;
52class ImplFontAttrCache;
53class SalGraphicsImpl;
57#define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000)
58#define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff)
60// win32 specific physically available font face
64 explicit WinFontFace( const FontAttributes&,
65 BYTE eWinCharSet,
66 BYTE nPitchAndFamily );
67 virtual ~WinFontFace() override;
70 virtual sal_IntPtr GetFontId() const override;
71 void SetFontId( sal_IntPtr nId ) { mnId = nId; }
72 void UpdateFromHDC( HDC ) const;
74 bool HasChar( sal_uInt32 cChar ) const;
76 BYTE GetCharSet() const { return meWinCharSet; }
83 sal_IntPtr mnId;
85 // some members that are initialized lazily when the font gets selected into a HDC
95 void ReadCmapTable( HDC ) const;
96 void GetFontCapabilities( HDC hDC ) const;
111 HBITMAP mhBitmap;
117 sal_uInt32 *mpData;
125 // If 'disable' is true, this class is a simple wrapper for drawing directly. Subclasses should use true.
126 CompatibleDC(SalGraphics &rGraphics, int x, int y, int width, int height, bool disable=true);
129 static std::unique_ptr< CompatibleDC > create(SalGraphics &rGraphics, int x, int y, int width, int height);
131 virtual ~CompatibleDC();
135 SalTwoRect getTwoRect() const { return maRects; }
141 void fill(sal_uInt32 color);
153 friend class WinSalGraphicsImpl;
154 friend class ScopedFont;
157 std::unique_ptr<SalGraphicsImpl> mpImpl;
160 HDC mhLocalDC; // HDC
161 bool mbPrinter : 1; // is Printer
162 bool mbVirDev : 1; // is VirDev
163 bool mbWindow : 1; // is Window
164 bool mbScreen : 1; // is Screen compatible
165 HWND mhWnd; // Window-Handle, when Window-Graphics
168 mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
169 HRGN mhRegion; // vcl::Region Handle
170 HPEN mhDefPen; // DefaultPen
171 HBRUSH mhDefBrush; // DefaultBrush
172 HFONT mhDefFont; // DefaultFont
173 HPALETTE mhDefPal; // DefaultPalette
174 COLORREF mnTextColor; // TextColor
175 RGNDATA* mpClipRgnData; // ClipRegion-Data
176 RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
177 int mnPenWidth; // line width
179 // just call both from setHDC!
184 // Return HFONT, and whether the font is for vertical writing ( prefixed with '@' )
185 // and tmDescent value for adjusting offset in vertical writing mode.
186 std::tuple<HFONT,bool,sal_Int32> ImplDoSetFont(HDC hDC, vcl::font::FontSelectPattern const & i_rFont, const vcl::font::PhysicalFontFace * i_pFontFace, HFONT& o_rOldFont);
188 HDC getHDC() const { return mhLocalDC; }
189 // NOTE: this doesn't transfer ownership! See class comment.
190 void setHDC(HDC aNew);
192 HPALETTE getDefPal() const;
193 // returns the result from RealizePalette, otherwise 0 on success or GDI_ERROR
194 UINT setPalette(HPALETTE, BOOL bForceBkgd = TRUE);
196 HRGN getRegion() const;
199 enum Type
200 {
205 };
209 HWND gethWnd();
213 explicit WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd,
214 SalGeometryProvider *pProvider);
215 virtual ~WinSalGraphics() override;
217 SalGraphicsImpl* GetImpl() const override;
218 bool isPrinter() const;
219 bool isVirtualDevice() const;
220 bool isWindow() const;
221 bool isScreen() const;
223 void setHWND(HWND hWnd);
224 void Flush();
227 virtual bool setClipRegion( const vcl::Region& ) override;
228 // draw --> LineColor and FillColor and RasterOp and ClipRegion
229 virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
230 virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
231 virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
232 virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
233 virtual void drawPolyLine( sal_uInt32 nPoints, const Point* pPtAry ) override;
234 virtual void drawPolygon( sal_uInt32 nPoints, const Point* pPtAry ) override;
235 virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point** pPtAry ) override;
236 virtual bool drawPolyPolygon(
237 const basegfx::B2DHomMatrix& rObjectToDevice,
239 double fTransparency) override;
240 virtual bool drawPolyLine(
241 const basegfx::B2DHomMatrix& rObjectToDevice,
242 const basegfx::B2DPolygon&,
243 double fTransparency,
244 double fLineWidth,
245 const std::vector< double >* pStroke, // MM01
247 css::drawing::LineCap,
248 double fMiterMinimumAngle,
249 bool bPixelSnapHairline) override;
250 virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry ) override;
251 virtual bool drawPolygonBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry ) override;
252 virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point* const* pPtAry, const PolyFlags* const* pFlgAry ) override;
253 virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override;
254 virtual bool implDrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon, SalGradient const & rGradient) override;
256 // CopyArea --> No RasterOp, but ClipRegion
257 virtual void copyArea( tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth,
258 tools::Long nSrcHeight, bool bWindowInvalidate ) override;
260 // CopyBits and DrawBitmap --> RasterOp and ClipRegion
261 // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
262 virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override;
263 virtual void drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) override;
264 virtual void drawBitmap( const SalTwoRect& rPosAry,
265 const SalBitmap& rSalBitmap,
266 const SalBitmap& rTransparentBitmap ) override;
267 virtual void drawMask( const SalTwoRect& rPosAry,
268 const SalBitmap& rSalBitmap,
269 Color nMaskColor ) override;
271 virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
272 virtual Color getPixel( tools::Long nX, tools::Long nY ) override;
274 // invert --> ClipRegion (only Windows or VirDevs)
275 virtual void invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override;
276 virtual void invert( sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags ) override;
278 virtual bool drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) override;
280 // native widget rendering methods that require mirroring
282 virtual bool isNativeControlSupported( ControlType nType, ControlPart nPart ) override;
283 virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
284 const Point& aPos, bool& rIsInside ) override;
285 virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
286 ControlState nState, const ImplControlValue& aValue,
287 const OUString& aCaption, const Color& rBackgroundColor ) override;
288 virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
289 const ImplControlValue& aValue, const OUString& aCaption,
290 tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
293 virtual bool blendBitmap( const SalTwoRect&,
294 const SalBitmap& rBitmap ) override;
296 virtual bool blendAlphaBitmap( const SalTwoRect&,
297 const SalBitmap& rSrcBitmap,
298 const SalBitmap& rMaskBitmap,
299 const SalBitmap& rAlphaBitmap ) override;
301 virtual bool drawAlphaBitmap( const SalTwoRect&,
302 const SalBitmap& rSourceBitmap,
303 const SalBitmap& rAlphaBitmap ) override;
305 const basegfx::B2DPoint& rNull,
306 const basegfx::B2DPoint& rX,
307 const basegfx::B2DPoint& rY,
308 const SalBitmap& rSourceBitmap,
309 const SalBitmap* pAlphaBitmap,
310 double fAlpha) override;
312 virtual bool hasFastDrawTransformedBitmap() const override;
314 virtual bool drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency ) override;
317 // local helpers
319 void DrawTextLayout(const GenericSalLayout&, HDC, bool bUseDWrite, bool bRenderingModeNatural);
322 // public SalGraphics methods, the interface to the independent vcl part
324 // get device resolution
325 virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
326 // get the depth of the device
327 virtual sal_uInt16 GetBitCount() const override;
328 // get the width of the device
329 virtual tools::Long GetGraphicsWidth() const override;
331 // set the clip region to empty
332 virtual void ResetClipRegion() override;
334 // set the line color to transparent (= don't draw lines)
335 virtual void SetLineColor() override;
336 // set the line color to a specific color
337 virtual void SetLineColor( Color nColor ) override;
338 // set the fill color to transparent (= don't fill)
339 virtual void SetFillColor() override;
340 // set the fill color to a specific color, shapes will be
341 // filled accordingly
342 virtual void SetFillColor( Color nColor ) override;
343 // enable/disable XOR drawing
344 virtual void SetXORMode( bool bSet, bool ) override;
345 // set line color for raster operations
346 virtual void SetROPLineColor( SalROPColor nROPColor ) override;
347 // set fill color for raster operations
348 virtual void SetROPFillColor( SalROPColor nROPColor ) override;
349 // set the text color to a specific color
350 virtual void SetTextColor( Color nColor ) override;
351 // set the font
352 virtual void SetFont( LogicalFontInstance*, int nFallbackLevel ) override;
353 // get the current font's metrics
354 virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
355 // get the repertoire of the current font
356 virtual FontCharMapRef GetFontCharMap() const override;
357 // get the layout capabilities of the current font
358 virtual bool GetFontCapabilities(vcl::FontCapabilities &rGetFontCapabilities) const override;
359 // graphics must fill supplied font list
361 // graphics must drop any cached font info
362 virtual void ClearDevFontCache() override;
363 virtual bool AddTempDevFont( vcl::font::PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
364 // CreateFontSubset: a method to get a subset of glyhps of a font
365 // inside a new valid font file
366 // returns TRUE if creation of subset was successful
367 // parameters: rToFile: contains an osl file URL to write the subset to
368 // pFont: describes from which font to create a subset
369 // pGlyphIDs: the glyph ids to be extracted
370 // pEncoding: the character code corresponding to each glyph
371 // pWidths: the advance widths of the corresponding glyphs (in PS font units)
372 // nGlyphs: the number of glyphs
373 // rInfo: additional outgoing information
374 // implementation note: encoding 0 with glyph id 0 should be added implicitly
375 // as "undefined character"
376 virtual bool CreateFontSubset( const OUString& rToFile,
378 const sal_GlyphId* pGlyphIDs,
379 const sal_uInt8* pEncoding,
380 sal_Int32* pWidths,
381 int nGlyphs,
382 FontSubsetInfo& rInfo // out parameter
383 ) override;
385 // GetEmbedFontData: gets the font data for a font marked
386 // embeddable by GetDevFontList or NULL in case of error
387 // parameters: pFont: describes the font in question
388 // pDataLen: out parameter, contains the byte length of the returned buffer
389 virtual const void* GetEmbedFontData(const vcl::font::PhysicalFontFace*, tools::Long* pDataLen) override;
390 // frees the font data again
391 virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
393 bool bVertical,
394 std::vector< sal_Int32 >& rWidths,
395 Ucs2UIntMap& rUnicodeEnc ) override;
397 virtual std::unique_ptr<GenericSalLayout>
398 GetTextLayout(int nFallbackLevel) override;
399 virtual void DrawTextLayout( const GenericSalLayout& ) override;
401 virtual bool supportsOperation( OutDevSupportType ) const override;
403 virtual SystemGraphicsData GetGraphicsData() const override;
406 static void updateSettingsNative( AllSettings& rSettings );
409// Init/Deinit Graphics
413 const vcl::font::PhysicalFontFace*, LOGFONTW& );
415#define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS))
417// called extremely often from just one spot => inline
418inline bool WinFontFace::HasChar( sal_uInt32 cChar ) const
420 if( mxUnicodeMap->HasChar( cChar ) )
421 return true;
422 // second chance to allow symbol aliasing
423 if( mbAliasSymbolsLow && ((cChar-0xF000) <= 0xFF) )
424 cChar -= 0xF000;
425 else if( mbAliasSymbolsHigh && (cChar <= 0xFF) )
426 cChar += 0xF000;
427 else
428 return false;
429 return mxUnicodeMap->HasChar( cChar );
432/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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:105
tools::Long getBitmapHeight() const
Definition: win/salgdi.h:138
HDC mhCompatibleDC
The compatible DC that we create for our purposes.
Definition: win/salgdi.h:108
SalTwoRect maRects
Mapping between the GDI position and OpenGL, to use for OpenGL drawing.
Definition: win/salgdi.h:120
virtual ~CompatibleDC()
HBITMAP mhOrigBitmap
Return the previous bitmap to undo the SelectObject.
Definition: win/salgdi.h:114
void fill(sal_uInt32 color)
Reset the DC with the defined color.
HDC getCompatibleHDC()
Definition: win/salgdi.h:133
tools::Long getBitmapWidth() const
Definition: win/salgdi.h:137
HBITMAP mhBitmap
DIBSection that we use for the GDI drawing, and later obtain.
Definition: win/salgdi.h:111
sal_uInt32 * mpData
DIBSection data.
Definition: win/salgdi.h:117
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:123
static std::unique_ptr< CompatibleDC > create(SalGraphics &rGraphics, int x, int y, int width, int height)
SalTwoRect getTwoRect() const
Definition: win/salgdi.h:135
Interface used to share logic on sizing between SalVirtualDevices and SalFrames.
Definition: salgeom.hxx:110
Implementation class for SalGraphics.
Definition: salgdiimpl.hxx:51
virtual ~WinFontFace() override
virtual rtl::Reference< LogicalFontInstance > CreateFontInstance(const vcl::font::FontSelectPattern &) const override
void UpdateFromHDC(HDC) const
BYTE GetCharSet() const
Definition: win/salgdi.h:76
bool mbFontCapabilitiesRead
Definition: win/salgdi.h:86
vcl::FontCapabilities maFontCapabilities
Definition: win/salgdi.h:88
void ReadCmapTable(HDC) const
BYTE meWinCharSet
Definition: win/salgdi.h:90
FontCharMapRef mxUnicodeMap
Definition: win/salgdi.h:87
bool mbAliasSymbolsLow
Definition: win/salgdi.h:93
virtual sal_IntPtr GetFontId() const override
FontCharMapRef GetFontCharMap() const override
bool HasChar(sal_uInt32 cChar) const
Definition: win/salgdi.h:418
BYTE GetPitchAndFamily() const
Definition: win/salgdi.h:77
BYTE mnPitchAndFamily
Definition: win/salgdi.h:91
WinFontFace(const FontAttributes &, BYTE eWinCharSet, BYTE nPitchAndFamily)
void GetFontCapabilities(HDC hDC) const
bool GetFontCapabilities(vcl::FontCapabilities &) const override
void SetFontId(sal_IntPtr nId)
Definition: win/salgdi.h:71
bool mbAliasSymbolsHigh
Definition: win/salgdi.h:92
sal_IntPtr mnId
Definition: win/salgdi.h:83
WinSalGraphics never owns the HDC it uses to draw, because the HDC can have various origins with diff...
Definition: win/salgdi.h:152
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)
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:174
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:153
HDC getHDC() const
Definition: win/salgdi.h:188
SalGraphicsImpl * GetImpl() const override
virtual const void * GetEmbedFontData(const vcl::font::PhysicalFontFace *, tools::Long *pDataLen) 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
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 bool CreateFontSubset(const OUString &rToFile, const vcl::font::PhysicalFontFace *, const sal_GlyphId *pGlyphIDs, const sal_uInt8 *pEncoding, sal_Int32 *pWidths, int nGlyphs, FontSubsetInfo &rInfo) override
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 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:175
bool isPrinter() const
void setHDC(HDC aNew)
rtl::Reference< WinFontInstance > mpWinFontEntry[MAX_FALLBACK]
Definition: win/salgdi.h:168
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry) override
RGNDATA * mpStdClipRgnData
Definition: win/salgdi.h:176
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
Definition: win/salgdi.h:173
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
virtual void FreeEmbedFontData(const void *pData, tools::Long nDataLen) override
friend class ScopedFont
Definition: win/salgdi.h:154
void setHWND(HWND hWnd)
virtual Color getPixel(tools::Long nX, tools::Long nY) override
virtual bool setClipRegion(const vcl::Region &) 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 ~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
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 GetGlyphWidths(const vcl::font::PhysicalFontFace *, bool bVertical, std::vector< sal_Int32 > &rWidths, Ucs2UIntMap &rUnicodeEnc) override
virtual void drawPixel(tools::Long nX, tools::Long nY) override
HBRUSH mhDefBrush
Definition: win/salgdi.h:171
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
virtual void GetFontMetric(ImplFontMetricDataRef &, int nFallbackLevel) override
void InitGraphics()
virtual SystemGraphicsData GetGraphicsData() const override
std::unique_ptr< SalGraphicsImpl > mpImpl
Definition: win/salgdi.h:157
abstract base class for physical font faces
sal_uInt16 sal_GlyphId
Definition: glyphid.hxx:24
long Long
A PhysicalFontFaceCollection is created by a PhysicalFontCollection and becomes invalid when original...
sal_Int16 nId
const wchar_t *typedef BOOL
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
Definition: salgdi.hxx:66
Definition: salgtype.hxx:70
Definition: salgtype.hxx:74
Definition: sallayout.hxx:46
tools::Long mnSrcHeight
Definition: salgtype.hxx:43
tools::Long mnSrcWidth
Definition: salgtype.hxx:42
unsigned char sal_uInt8
unsigned char BYTE
Definition: vclenum.hxx:174
int ImplIsSysColorEntry(Color nColor)
void ImplGetLogFontFromFontSelect(const vcl::font::FontSelectPattern &, const vcl::font::PhysicalFontFace *, LOGFONTW &)
void ImplUpdateSysColorEntries()