LibreOffice Module vcl (master)  1
quartz/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_QUARTZ_SALGDI_H
21 #define INCLUDED_VCL_INC_QUARTZ_SALGDI_H
22 
23 #include <vector>
24 
26 
27 #include <premac.h>
28 #ifdef MACOSX
29 #include <ApplicationServices/ApplicationServices.h>
30 #include <osx/osxvcltypes.h>
31 #include <osx/salframe.h>
32 #else
33 #include <CoreGraphics/CoreGraphics.h>
34 #include <CoreText/CoreText.h>
35 #endif
36 #include <postmac.h>
37 
38 #include <vcl/fontcapabilities.hxx>
39 #include <vcl/metric.hxx>
40 
41 
42 #include <fontinstance.hxx>
43 #include <impfontmetricdata.hxx>
44 #include <PhysicalFontFace.hxx>
45 #include <salgdi.hxx>
46 
47 #include <quartz/salgdicommon.hxx>
48 #include <unordered_map>
49 #include <hb-ot.h>
50 
51 #include <quartz/CGHelpers.hxx>
52 
53 class AquaSalFrame;
54 class FontAttributes;
55 class CoreTextStyle;
56 class XorEmulation;
57 
58 // CoreText-specific physically available font face
60 {
61 public:
62  CoreTextFontFace( const FontAttributes&, sal_IntPtr nFontID );
63  virtual ~CoreTextFontFace() override;
64 
65  sal_IntPtr GetFontId() const override;
66 
67  int GetFontTable( uint32_t nTagCode, unsigned char* ) const;
68  int GetFontTable( const char pTagName[5], unsigned char* ) const;
69 
71  bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
72  bool HasChar( sal_uInt32 cChar ) const;
73 
75 
76 private:
77  const sal_IntPtr mnFontId;
80  mutable bool mbFontCapabilitiesRead;
81 };
82 
83 class CoreTextStyle final : public LogicalFontInstance
84 {
86 
87 public:
88  ~CoreTextStyle() override;
89 
90  void GetFontMetric( ImplFontMetricDataRef const & );
91  bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon&, bool) const override;
92 
93  CFMutableDictionaryRef GetStyleDict( void ) const { return mpStyleDict; }
94 
101 
102 private:
103  explicit CoreTextStyle(const PhysicalFontFace&, const FontSelectPattern&);
104 
105  hb_font_t* ImplInitHbFont() override;
106  bool ImplGetGlyphBoundRect(sal_GlyphId, tools::Rectangle&, bool) const override;
107 
109  CFMutableDictionaryRef mpStyleDict;
110 };
111 
112 // TODO: move into cross-platform headers
113 
115 {
116 public:
117  SystemFontList( void );
118  ~SystemFontList( void );
119 
120  bool Init( void );
121  void AddFont( CoreTextFontFace* );
122 
123  void AnnounceFonts( PhysicalFontCollection& ) const;
124  CoreTextFontFace* GetFontDataFromId( sal_IntPtr nFontId ) const;
125 
126 private:
127  CTFontCollectionRef mpCTFontCollection;
128  CFArrayRef mpCTFontArray;
129 
130  std::unordered_map<sal_IntPtr, rtl::Reference<CoreTextFontFace>> maFontContainer;
131 };
132 
134 {
135  CGLayerHolder maLayer; // Quartz graphics layer
136  CGContextHolder maContextHolder; // Quartz drawing context
137 
139  int mnXorMode; // 0: off 1: on 2: invert only
140  int mnWidth;
141  int mnHeight;
142  int mnBitmapDepth; // zero unless bitmap
146 
148  CGMutablePathRef mxClipPath;
149 
155 
156  // Device Font settings
161 
162 #ifdef MACOSX
163  AquaSalFrame* mpFrame;
164 #endif
165 
166  // Graphics types
167 
169  bool mbPrinter;
171  bool mbVirDev;
172 #ifdef MACOSX
173  bool mbWindow;
175 
176 #else // IOS
177 
178  // mirror AquaSalVirtualDevice::mbForeignContext for SvpSalGraphics objects related to such
180 
181 #endif
182 
183 public:
184  AquaSalGraphics();
185  virtual ~AquaSalGraphics() override;
186 
187  bool IsPenVisible() const { return maLineColor.IsVisible(); }
188  bool IsBrushVisible() const { return maFillColor.IsVisible(); }
189 
190  void SetWindowGraphics( AquaSalFrame* pFrame );
191  void SetPrinterGraphics( CGContextRef, long nRealDPIX, long nRealDPIY );
192  void SetVirDevGraphics(CGLayerHolder const & rLayer, CGContextRef, int nBitDepth = 0);
193 #ifdef MACOSX
194  void initResolution( NSWindow* );
195  void copyResolution( AquaSalGraphics& );
196  void updateResolution();
197 
198  bool IsWindowGraphics() const { return mbWindow; }
199  AquaSalFrame* getGraphicsFrame() const { return mpFrame; }
200  void setGraphicsFrame( AquaSalFrame* pFrame ) { mpFrame = pFrame; }
201 #endif
202 
203  void ImplDrawPixel( long nX, long nY, const RGBAColor& ); // helper to draw single pixels
204 
205  bool CheckContext();
206  CGContextRef GetContext();
207 #ifdef MACOSX
208  void UpdateWindow( NSRect& ); // delivered in NSView coordinates
209  void RefreshRect( const NSRect& );
210 #else
211  void RefreshRect( const CGRect& ) {}
212 #endif
213  void RefreshRect(float lX, float lY, float lWidth, float lHeight);
214 
215  void SetState();
216  void UnsetState();
217  // InvalidateContext does an UnsetState and sets mrContext to 0
218  void InvalidateContext();
219 
220  virtual SalGraphicsImpl* GetImpl() const override;
221 
222  virtual bool setClipRegion( const vcl::Region& ) override;
223 
224  // draw --> LineColor and FillColor and RasterOp and ClipRegion
225  virtual void drawPixel( long nX, long nY ) override;
226  virtual void drawPixel( long nX, long nY, Color nColor ) override;
227  virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) override;
228  virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override;
229  virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
230  virtual void drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) override;
231  virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) override;
232  virtual bool drawPolyPolygon(
233  const basegfx::B2DHomMatrix& rObjectToDevice,
235  double fTransparency) override;
236  virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) override;
237  virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const PolyFlags* pFlgAry ) override;
238  virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const PolyFlags* const* pFlgAry ) override;
239  virtual bool drawPolyLine(
240  const basegfx::B2DHomMatrix& rObjectToDevice,
241  const basegfx::B2DPolygon&,
242  double fTransparency,
243  const basegfx::B2DVector& rLineWidths,
245  css::drawing::LineCap eLineCap,
246  double fMiterMinimumAngle,
247  bool bPixelSnapHairline) override;
248  virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override { return false; };
249 
250  // CopyArea --> No RasterOp, but ClipRegion
251  virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
252  long nSrcHeight, bool bWindowInvalidate ) override;
253 
254  // CopyBits and DrawBitmap --> RasterOp and ClipRegion
255  // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
256  virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override;
257  virtual void drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) override;
258  virtual void drawBitmap( const SalTwoRect& rPosAry,
259  const SalBitmap& rSalBitmap,
260  const SalBitmap& rTransparentBitmap ) override;
261  virtual void drawMask( const SalTwoRect& rPosAry,
262  const SalBitmap& rSalBitmap,
263  Color nMaskColor ) override;
264 
265  virtual std::shared_ptr<SalBitmap> getBitmap( long nX, long nY, long nWidth, long nHeight ) override;
266  virtual Color getPixel( long nX, long nY ) override;
267 
268  // invert --> ClipRegion (only Windows or VirDevs)
269  virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) override;
270  virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) override;
271 
272  virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uInt32 nSize ) override;
273 
274  virtual bool blendBitmap( const SalTwoRect&,
275  const SalBitmap& rBitmap ) override;
276 
277  virtual bool blendAlphaBitmap( const SalTwoRect&,
278  const SalBitmap& rSrcBitmap,
279  const SalBitmap& rMaskBitmap,
280  const SalBitmap& rAlphaBitmap ) override;
281 
282  virtual bool drawAlphaBitmap( const SalTwoRect&,
283  const SalBitmap& rSourceBitmap,
284  const SalBitmap& rAlphaBitmap ) override;
285 
287  const basegfx::B2DPoint& rNull,
288  const basegfx::B2DPoint& rX,
289  const basegfx::B2DPoint& rY,
290  const SalBitmap& rSourceBitmap,
291  const SalBitmap* pAlphaBitmap) override;
292 
293  virtual bool drawAlphaRect( long nX, long nY, long nWidth,
294  long nHeight, sal_uInt8 nTransparency ) override;
295 
296  // native widget rendering methods that require mirroring
297 #ifdef MACOSX
298 protected:
299  virtual bool isNativeControlSupported( ControlType nType, ControlPart nPart ) override;
300 
301  virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
302  const Point& aPos, bool& rIsInside ) override;
303  virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
304  ControlState nState, const ImplControlValue& aValue,
305  const OUString& aCaption ) override;
306  virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
307  const ImplControlValue& aValue, const OUString& aCaption,
308  tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
309 
310 public:
311 #endif
312 
313  // get device resolution
314  virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
315  // get the depth of the device
316  virtual sal_uInt16 GetBitCount() const override;
317  // get the width of the device
318  virtual long GetGraphicsWidth() const override;
319 
320  // set the clip region to empty
321  virtual void ResetClipRegion() override;
322 
323  // set the line color to transparent (= don't draw lines)
324  virtual void SetLineColor() override;
325  // set the line color to a specific color
326  virtual void SetLineColor( Color nColor ) override;
327  // set the fill color to transparent (= don't fill)
328  virtual void SetFillColor() override;
329  // set the fill color to a specific color, shapes will be
330  // filled accordingly
331  virtual void SetFillColor( Color nColor ) override;
332  // enable/disable XOR drawing
333  virtual void SetXORMode( bool bSet, bool bInvertOnly ) override;
334  // set line color for raster operations
335  virtual void SetROPLineColor( SalROPColor nROPColor ) override;
336  // set fill color for raster operations
337  virtual void SetROPFillColor( SalROPColor nROPColor ) override;
338  // set the text color to a specific color
339  virtual void SetTextColor( Color nColor ) override;
340  // set the font
341  virtual void SetFont( LogicalFontInstance*, int nFallbackLevel ) override;
342  // get the current font's metrics
343  virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
344  // get the repertoire of the current font
345  virtual FontCharMapRef GetFontCharMap() const override;
346  virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
347  // graphics must fill supplied font list
348  virtual void GetDevFontList( PhysicalFontCollection* ) override;
349  // graphics must drop any cached font info
350  virtual void ClearDevFontCache() override;
351  virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
352  // CreateFontSubset: a method to get a subset of glyhps of a font
353  // inside a new valid font file
354  // returns TRUE if creation of subset was successful
355  // parameters: rToFile: contains an osl file URL to write the subset to
356  // pFont: describes from which font to create a subset
357  // pGlyphIDs: the glyph ids to be extracted
358  // pEncoding: the character code corresponding to each glyph
359  // pWidths: the advance widths of the corresponding glyphs (in PS font units)
360  // nGlyphs: the number of glyphs
361  // rInfo: additional outgoing information
362  // implementation note: encoding 0 with glyph id 0 should be added implicitly
363  // as "undefined character"
364  virtual bool CreateFontSubset( const OUString& rToFile,
365  const PhysicalFontFace* pFont,
366  const sal_GlyphId* pGlyphIds,
367  const sal_uInt8* pEncoding,
368  sal_Int32* pWidths,
369  int nGlyphs,
370  FontSubsetInfo& rInfo // out parameter
371  ) override;
372 
373  // GetEmbedFontData: gets the font data for a font marked
374  // embeddable by GetDevFontList or NULL in case of error
375  // parameters: pFont: describes the font in question
376  // pDataLen: out parameter, contains the byte length of the returned buffer
377  virtual const void* GetEmbedFontData(const PhysicalFontFace*, long* pDataLen) override;
378  // frees the font data again
379  virtual void FreeEmbedFontData( const void* pData, long nDataLen ) override;
380 
381  virtual void GetGlyphWidths( const PhysicalFontFace*,
382  bool bVertical,
383  std::vector< sal_Int32 >& rWidths,
384  Ucs2UIntMap& rUnicodeEnc ) override;
385 
386  virtual std::unique_ptr<GenericSalLayout>
387  GetTextLayout(int nFallbackLevel) override;
388  virtual void DrawTextLayout( const GenericSalLayout& ) override;
389  virtual bool supportsOperation( OutDevSupportType ) const override;
390 
391  virtual SystemGraphicsData
392  GetGraphicsData() const override;
393 
394 private:
395  // differences between VCL, Quartz and kHiThemeOrientation coordinate systems
396  // make some graphics seem to be vertically-mirrored from a VCL perspective
397  bool IsFlipped() const;
398 
399  void ApplyXorContext();
400  void Pattern50Fill();
401  UInt32 getState( ControlState nState );
402  UInt32 getTrackState( ControlState nState );
403  static bool GetRawFontData( const PhysicalFontFace* pFontData,
404  std::vector<unsigned char>& rBuffer,
405  bool* pJustCFF );
406 };
407 
408 // --- some trivial inlines
409 
410 #ifdef MACOSX
411 
412 inline void AquaSalGraphics::RefreshRect( const NSRect& rRect )
413 {
414  RefreshRect( rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height );
415 }
416 
417 #endif
418 
419 #endif // INCLUDED_VCL_INC_QUARTZ_SALGDI_H
420 
421 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual long GetGraphicsWidth() const override
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, PCONSTSALPOINT *pPtAry) override
virtual void FreeEmbedFontData(const void *pData, long nDataLen) override
bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const
virtual ~CoreTextFontFace() override
void InvalidateContext()
bool Init(void)
XorEmulation * mpXorEmulation
CoreTextFontFace(const FontAttributes &, sal_IntPtr nFontID)
virtual const void * GetEmbedFontData(const PhysicalFontFace *, long *pDataLen) override
virtual void GetDevFontList(PhysicalFontCollection *) override
CTFontCollectionRef mpCTFontCollection
SalROPColor
Definition: salgtype.hxx:80
CFMutableDictionaryRef GetStyleDict(void) const
Definition: quartz/salgdi.h:93
bool mbFontCapabilitiesRead
Definition: quartz/salgdi.h:80
virtual bool AddTempDevFont(PhysicalFontCollection *, const OUString &rFileURL, const OUString &rFontName) override
#define MAX_FALLBACK
Definition: sallayout.hxx:41
virtual bool drawGradient(const tools::PolyPolygon &, const Gradient &) override
bool mbFauxBold
faux bold - true, if font doesn't have proper bold variants
virtual void SetROPFillColor(SalROPColor nROPColor) override
CoreTextFontFace * GetFontDataFromId(sal_IntPtr nFontId) const
float mfFontRotation
text rotation in radian
Definition: quartz/salgdi.h:98
bool mbVirDev
is this a virtual device graphics
static bool GetRawFontData(const PhysicalFontFace *pFontData, std::vector< unsigned char > &rBuffer, bool *pJustCFF)
CGContextRef GetContext()
void GetFontMetric(ImplFontMetricDataRef const &)
RGBAColor maFillColor
brush color RGBA
FontCharMapRef GetFontCharMap() const
virtual void SetROPLineColor(SalROPColor nROPColor) override
void AnnounceFonts(PhysicalFontCollection &) const
virtual bool drawEPS(long nX, long nY, long nWidth, long nHeight, void *pPtr, sal_uInt32 nSize) override
virtual bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
Render bitmap with alpha channel.
SystemFontList(void)
RGBAColor maLineColor
Drawing colors pen color RGBA.
virtual bool supportsOperation(OutDevSupportType) const override
virtual void drawLine(long nX1, long nY1, long nX2, long nY2) override
virtual void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
sal_uInt16 sal_GlyphId
Definition: glyphitem.hxx:26
OutDevSupportType
Definition: vclenum.hxx:195
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 bool drawPolygonBezier(sal_uInt32 nPoints, const SalPoint *pPtAry, const PolyFlags *pFlgAry) override
virtual sal_uInt16 GetBitCount() const override
virtual void GetResolution(sal_Int32 &rDPIX, sal_Int32 &rDPIY) override
RGBAColor maTextColor
CGLayerHolder maLayer
std::unordered_map< sal_IntPtr, rtl::Reference< CoreTextFontFace > > maFontContainer
virtual void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
~CoreTextStyle() override
hb_font_t * ImplInitHbFont() override
virtual void copyArea(long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, bool bWindowInvalidate) override
virtual void SetFillColor() override
virtual ~AquaSalGraphics() override
UInt32 getTrackState(ControlState nState)
virtual void SetTextColor(Color nColor) override
void SetVirDevGraphics(CGLayerHolder const &rLayer, CGContextRef, int nBitDepth=0)
virtual bool hitTestNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, const Point &aPos, bool &rIsInside)
Query if a position is inside the native widget part.
CFMutableDictionaryRef mpStyleDict
CoreText text style object.
abstract base class for physical font faces
vcl::FontCapabilities maFontCapabilities
Definition: quartz/salgdi.h:79
void ImplDrawPixel(long nX, long nY, const RGBAColor &)
virtual bool drawAlphaRect(long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency) override
Render solid rectangle with given transparency.
virtual void ClearDevFontCache() override
virtual bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
Blend the bitmap with the current buffer.
void SetWindowGraphics(AquaSalFrame *pFrame)
void RefreshRect(const CGRect &)
virtual void drawPixel(long nX, long nY) override
bool mbPrinter
is this a printer graphics
virtual std::shared_ptr< SalBitmap > getBitmap(long nX, long nY, long nWidth, long nHeight) override
virtual bool isNativeControlSupported(ControlType eType, ControlPart ePart)
Query the platform layer for native control support.
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const SalPoint *const *pPtAry, const PolyFlags *const *pFlgAry) override
void SetPrinterGraphics(CGContextRef, long nRealDPIX, long nRealDPIY)
virtual bool getNativeControlRegion(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaption, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion)
Get the native control regions for the control part.
bool IsBrushVisible() const
CoreTextStyle(const PhysicalFontFace &, const FontSelectPattern &)
bool IsVisible() const
SalInvert
Definition: salgtype.hxx:84
bool HasChar(sal_uInt32 cChar) const
bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon &, bool) const override
bool IsPenVisible() const
virtual SystemGraphicsData GetGraphicsData() const override
virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const SalPoint *pPtAry, const PolyFlags *pFlgAry) override
sal_IntPtr GetFontId() const override
CGContextHolder maContextHolder
void AddFont(CoreTextFontFace *)
virtual bool drawNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaptions)
Draw the requested control.
const sal_IntPtr mnFontId
Definition: quartz/salgdi.h:77
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
FontCharMapRef mxCharMap
Definition: quartz/salgdi.h:78
virtual void DrawTextLayout(const GenericSalLayout &) override
virtual std::unique_ptr< GenericSalLayout > GetTextLayout(int nFallbackLevel) override
void ApplyXorContext()
virtual void drawPolyLine(sal_uInt32 nPoints, const SalPoint *pPtAry) override
unsigned char sal_uInt8
rtl::Reference< LogicalFontInstance > CreateFontInstance(const FontSelectPattern &) const override
~SystemFontList(void)
bool IsFlipped() const
virtual void invert(long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) override
virtual void SetXORMode(bool bSet, bool bInvertOnly) override
int GetFontTable(uint32_t nTagCode, unsigned char *) const
virtual bool setClipRegion(const vcl::Region &) override
virtual void drawRect(long nX, long nY, long nWidth, long nHeight) override
virtual SalGraphicsImpl * GetImpl() const override
UInt32 getState(ControlState nState)
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
virtual bool CreateFontSubset(const OUString &rToFile, const PhysicalFontFace *pFont, const sal_GlyphId *pGlyphIds, const sal_uInt8 *pEncoding, sal_Int32 *pWidths, int nGlyphs, FontSubsetInfo &rInfo) override
bool mbNonAntialiasedText
allows text to be rendered without antialiasing
virtual Color getPixel(long nX, long nY) override
virtual void drawPolygon(sal_uInt32 nPoints, const SalPoint *pPtAry) override
virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override
virtual void SetFont(LogicalFontInstance *, int nFallbackLevel) override
virtual void GetGlyphWidths(const PhysicalFontFace *, bool bVertical, std::vector< sal_Int32 > &rWidths, Ucs2UIntMap &rUnicodeEnc) override
long mnRealDPIX
device resolution of this graphics
float mfFontStretch
<1.0: font is squeezed, >1.0 font is stretched, else 1.0
Definition: quartz/salgdi.h:96
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 void SetLineColor() override
rtl::Reference< CoreTextStyle > mpTextStyle[MAX_FALLBACK]
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
Definition: salgdi.hxx:62
void Pattern50Fill()
virtual FontCharMapRef GetFontCharMap() const override
CFArrayRef mpCTFontArray
virtual void GetFontMetric(ImplFontMetricDataRef &, int nFallbackLevel) override
CGMutablePathRef mxClipPath
path representing current clip region
bool ImplGetGlyphBoundRect(sal_GlyphId, tools::Rectangle &, bool) const override
virtual void ResetClipRegion() override
PolyFlags