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 #include <tools/long.hxx>
27 
28 #include <premac.h>
29 #ifdef MACOSX
30 #include <ApplicationServices/ApplicationServices.h>
31 #include <osx/osxvcltypes.h>
32 #include <osx/salframe.h>
33 #else
34 #include <CoreGraphics/CoreGraphics.h>
35 #include <CoreText/CoreText.h>
36 #endif
37 #include <postmac.h>
38 
39 #include <vcl/fontcapabilities.hxx>
40 #include <vcl/metric.hxx>
41 
42 
43 #include <fontinstance.hxx>
44 #include <impfontmetricdata.hxx>
45 #include <PhysicalFontFace.hxx>
46 #include <salgdi.hxx>
47 
48 #include <quartz/salgdicommon.hxx>
49 #include <unordered_map>
50 #include <hb-ot.h>
51 
52 #include <quartz/CGHelpers.hxx>
53 
54 class AquaSalFrame;
55 class FontAttributes;
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 
70  FontCharMapRef GetFontCharMap() const override;
71  bool GetFontCapabilities(vcl::FontCapabilities&) const override;
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  CGContextHolder maBGContextHolder; // Quartz drawing context for CGLayer
138  CGContextHolder maCSContextHolder; // Quartz drawing context considering the color space
139 
141  int mnXorMode; // 0: off 1: on 2: invert only
142  int mnWidth;
143  int mnHeight;
144  int mnBitmapDepth; // zero unless bitmap
146  sal_Int32 mnRealDPIX;
147  sal_Int32 mnRealDPIY;
148 
150  CGMutablePathRef mxClipPath;
151 
157 
158  // Device Font settings
163 
164 #ifdef MACOSX
165  AquaSalFrame* mpFrame;
166 #endif
167 
168  // Graphics types
169 
171  bool mbPrinter;
173  bool mbVirDev;
174 #ifdef MACOSX
175  bool mbWindow;
177 
178 #else // IOS
179 
180  // mirror AquaSalVirtualDevice::mbForeignContext for SvpSalGraphics objects related to such
182 
183 #endif
184 
185 public:
186  AquaSalGraphics();
187  virtual ~AquaSalGraphics() override;
188 
189  bool IsPenVisible() const { return maLineColor.IsVisible(); }
190  bool IsBrushVisible() const { return maFillColor.IsVisible(); }
191 
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  static float GetWindowScaling();
199  void SetWindowGraphics( AquaSalFrame* pFrame );
200  bool IsWindowGraphics() const { return mbWindow; }
201  void SetPrinterGraphics(CGContextRef, sal_Int32 nRealDPIX, sal_Int32 nRealDPIY);
202  AquaSalFrame* getGraphicsFrame() const { return mpFrame; }
203  void setGraphicsFrame( AquaSalFrame* pFrame ) { mpFrame = pFrame; }
204 #endif
205 
206  void ImplDrawPixel( tools::Long nX, tools::Long nY, const RGBAColor& ); // helper to draw single pixels
207 
208  bool CheckContext();
209 
210 #ifdef MACOSX
211  void UpdateWindow( NSRect& ); // delivered in NSView coordinates
212  void RefreshRect( const NSRect& );
213 #else
214  void RefreshRect( const CGRect& ) {}
215 #endif
216  void RefreshRect(float lX, float lY, float lWidth, float lHeight);
217 
218  void SetState();
219  void UnsetState();
220  // InvalidateContext does an UnsetState and sets mrContext to 0
221  void InvalidateContext();
222 
223  virtual SalGraphicsImpl* GetImpl() const override;
224 
225  virtual bool setClipRegion( const vcl::Region& ) override;
226 
227  // draw --> LineColor and FillColor and RasterOp and ClipRegion
228  virtual void drawPixel( tools::Long nX, tools::Long nY ) override;
229  virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) override;
230  virtual void drawLine(
231  tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) override;
232  virtual void drawRect(
233  tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
234  virtual void drawPolyLine( sal_uInt32 nPoints, const Point* pPtAry ) override;
235  virtual void drawPolygon( sal_uInt32 nPoints, const Point* pPtAry ) override;
236  virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point** pPtAry ) override;
237  virtual bool drawPolyPolygon(
238  const basegfx::B2DHomMatrix& rObjectToDevice,
240  double fTransparency) override;
241  virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry ) override;
242  virtual bool drawPolygonBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry ) override;
243  virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point* const* pPtAry, const PolyFlags* const* pFlgAry ) override;
244  virtual bool drawPolyLine(
245  const basegfx::B2DHomMatrix& rObjectToDevice,
246  const basegfx::B2DPolygon&,
247  double fTransparency,
248  double rLineWidth,
249  const std::vector< double >* pStroke, // MM01
251  css::drawing::LineCap eLineCap,
252  double fMiterMinimumAngle,
253  bool bPixelSnapHairline) override;
254  virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) override { return false; };
255 
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;
259 
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;
270 
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;
273 
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;
277 
278  virtual bool drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize ) override;
279 
280  virtual bool blendBitmap( const SalTwoRect&,
281  const SalBitmap& rBitmap ) override;
282 
283  virtual bool blendAlphaBitmap( const SalTwoRect&,
284  const SalBitmap& rSrcBitmap,
285  const SalBitmap& rMaskBitmap,
286  const SalBitmap& rAlphaBitmap ) override;
287 
288  virtual bool drawAlphaBitmap( const SalTwoRect&,
289  const SalBitmap& rSourceBitmap,
290  const SalBitmap& rAlphaBitmap ) override;
291 
293  const basegfx::B2DPoint& rNull,
294  const basegfx::B2DPoint& rX,
295  const basegfx::B2DPoint& rY,
296  const SalBitmap& rSourceBitmap,
297  const SalBitmap* pAlphaBitmap,
298  double fAlpha) override;
299 
300  virtual bool hasFastDrawTransformedBitmap() const override;
301 
302  virtual bool drawAlphaRect( tools::Long nX, tools::Long nY, tools::Long nWidth,
303  tools::Long nHeight, sal_uInt8 nTransparency ) override;
304 
305 #ifdef MACOSX
306 
307 protected:
308 
309  // native widget rendering methods that require mirroring
310 
311  virtual bool isNativeControlSupported( ControlType nType, ControlPart nPart ) override;
312 
313  virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
314  const Point& aPos, bool& rIsInside ) override;
315  virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
316  ControlState nState, const ImplControlValue& aValue,
317  const OUString& aCaption, const Color& rBackgroundColor ) override;
318  virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
319  const ImplControlValue& aValue, const OUString& aCaption,
320  tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
321 
322  void copyScaledArea( tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
323  tools::Long nSrcWidth, tools::Long nSrcHeight, SalGraphics* pSrcGraphics );
324 #endif
325 
326 public:
327  // get device resolution
328  virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
329  // get the depth of the device
330  virtual sal_uInt16 GetBitCount() const override;
331  // get the width of the device
332  virtual tools::Long GetGraphicsWidth() const override;
333 
334  // set the clip region to empty
335  virtual void ResetClipRegion() override;
336 
337  // set the line color to transparent (= don't draw lines)
338  virtual void SetLineColor() override;
339  // set the line color to a specific color
340  virtual void SetLineColor( Color nColor ) override;
341  // set the fill color to transparent (= don't fill)
342  virtual void SetFillColor() override;
343  // set the fill color to a specific color, shapes will be
344  // filled accordingly
345  virtual void SetFillColor( Color nColor ) override;
346  // enable/disable XOR drawing
347  virtual void SetXORMode( bool bSet, bool bInvertOnly ) override;
348  // set line color for raster operations
349  virtual void SetROPLineColor( SalROPColor nROPColor ) override;
350  // set fill color for raster operations
351  virtual void SetROPFillColor( SalROPColor nROPColor ) override;
352  // set the text color to a specific color
353  virtual void SetTextColor( Color nColor ) override;
354  // set the font
355  virtual void SetFont( LogicalFontInstance*, int nFallbackLevel ) override;
356  // get the current font's metrics
357  virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
358  // get the repertoire of the current font
359  virtual FontCharMapRef GetFontCharMap() const override;
360  virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
361  // graphics must fill supplied font list
362  virtual void GetDevFontList( PhysicalFontCollection* ) override;
363  // graphics must drop any cached font info
364  virtual void ClearDevFontCache() override;
365  virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
366  // CreateFontSubset: a method to get a subset of glyhps of a font
367  // inside a new valid font file
368  // returns TRUE if creation of subset was successful
369  // parameters: rToFile: contains an osl file URL to write the subset to
370  // pFont: describes from which font to create a subset
371  // pGlyphIDs: the glyph ids to be extracted
372  // pEncoding: the character code corresponding to each glyph
373  // pWidths: the advance widths of the corresponding glyphs (in PS font units)
374  // nGlyphs: the number of glyphs
375  // rInfo: additional outgoing information
376  // implementation note: encoding 0 with glyph id 0 should be added implicitly
377  // as "undefined character"
378  virtual bool CreateFontSubset( const OUString& rToFile,
379  const PhysicalFontFace* pFont,
380  const sal_GlyphId* pGlyphIds,
381  const sal_uInt8* pEncoding,
382  sal_Int32* pWidths,
383  int nGlyphs,
384  FontSubsetInfo& rInfo // out parameter
385  ) override;
386 
387  // GetEmbedFontData: gets the font data for a font marked
388  // embeddable by GetDevFontList or NULL in case of error
389  // parameters: pFont: describes the font in question
390  // pDataLen: out parameter, contains the byte length of the returned buffer
391  virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen)
392  override;
393  // frees the font data again
394  virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
395 
396  virtual void GetGlyphWidths( const PhysicalFontFace*,
397  bool bVertical,
398  std::vector< sal_Int32 >& rWidths,
399  Ucs2UIntMap& rUnicodeEnc ) override;
400 
401  virtual std::unique_ptr<GenericSalLayout>
402  GetTextLayout(int nFallbackLevel) override;
403  virtual void DrawTextLayout( const GenericSalLayout& ) override;
404  virtual bool supportsOperation( OutDevSupportType ) const override;
405  virtual OUString getRenderBackendName() const override { return "aqua"; }
406 
407  virtual SystemGraphicsData
408  GetGraphicsData() const override;
409 
410 private:
411  // differences between VCL, Quartz and kHiThemeOrientation coordinate systems
412  // make some graphics seem to be vertically-mirrored from a VCL perspective
413  bool IsFlipped() const;
414 
415  void ApplyXorContext();
416  void Pattern50Fill();
417  UInt32 getState( ControlState nState );
418  UInt32 getTrackState( ControlState nState );
419  static bool GetRawFontData( const PhysicalFontFace* pFontData,
420  std::vector<unsigned char>& rBuffer,
421  bool* pJustCFF );
422 };
423 
424 // --- some trivial inlines
425 
426 #ifdef MACOSX
427 
428 inline void AquaSalGraphics::RefreshRect( const NSRect& rRect )
429 {
430  RefreshRect( rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height );
431 }
432 
433 #endif
434 
435 #endif // INCLUDED_VCL_INC_QUARTZ_SALGDI_H
436 
437 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~CoreTextFontFace() override
void InvalidateContext()
bool Init(void)
XorEmulation * mpXorEmulation
CoreTextFontFace(const FontAttributes &, sal_IntPtr nFontID)
virtual void GetDevFontList(PhysicalFontCollection *) override
CTFontCollectionRef mpCTFontCollection
SalROPColor
Definition: salgtype.hxx:71
sal_Int32 mnRealDPIX
device resolution of this graphics
CFMutableDictionaryRef GetStyleDict(void) const
Definition: quartz/salgdi.h:93
virtual void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override
bool mbFontCapabilitiesRead
Definition: quartz/salgdi.h:80
virtual bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
virtual bool AddTempDevFont(PhysicalFontCollection *, const OUString &rFileURL, const OUString &rFontName) override
#define MAX_FALLBACK
Definition: sallayout.hxx:42
virtual bool drawGradient(const tools::PolyPolygon &, const Gradient &) override
long Long
virtual void drawPixel(tools::Long nX, tools::Long nY) 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)
virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
void GetFontMetric(ImplFontMetricDataRef const &)
RGBAColor maFillColor
brush color RGBA
virtual void SetROPLineColor(SalROPColor nROPColor) override
void AnnounceFonts(PhysicalFontCollection &) const
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 copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
sal_uInt16 sal_GlyphId
Definition: glyphitem.hxx:28
virtual bool drawNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaptions, const Color &rBackgroundColor)
Draw the requested control.
OutDevSupportType
Definition: vclenum.hxx:196
virtual sal_uInt16 GetBitCount() const override
virtual void GetResolution(sal_Int32 &rDPIX, sal_Int32 &rDPIY) override
RGBAColor maTextColor
CGLayerHolder maLayer
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry) override
std::unordered_map< sal_IntPtr, rtl::Reference< CoreTextFontFace > > maFontContainer
virtual void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry) override
virtual void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
~CoreTextStyle() override
hb_font_t * ImplInitHbFont() 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 Color getPixel(tools::Long nX, tools::Long nY) override
bool GetFontCapabilities(vcl::FontCapabilities &) const override
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
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry) override
virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
vcl::FontCapabilities maFontCapabilities
Definition: quartz/salgdi.h:79
virtual void ClearDevFontCache() override
virtual bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
Blend the bitmap with the current buffer.
void RefreshRect(const CGRect &)
bool mbPrinter
is this a printer graphics
virtual bool isNativeControlSupported(ControlType eType, ControlPart ePart)
Query the platform layer for native control support.
CGContextHolder maCSContextHolder
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
virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
SalInvert
Definition: salgtype.hxx:75
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.
bool HasChar(sal_uInt32 cChar) const
bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon &, bool) const override
bool IsPenVisible() const
FontCharMapRef GetFontCharMap() const override
virtual SystemGraphicsData GetGraphicsData() const override
sal_Int32 mnRealDPIY
sal_IntPtr GetFontId() const override
CGContextHolder maContextHolder
void AddFont(CoreTextFontFace *)
const sal_IntPtr mnFontId
Definition: quartz/salgdi.h:77
virtual tools::Long GetGraphicsWidth() const override
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 ...
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()
unsigned char sal_uInt8
rtl::Reference< LogicalFontInstance > CreateFontInstance(const FontSelectPattern &) const override
~SystemFontList(void)
bool IsFlipped() const
virtual void SetXORMode(bool bSet, bool bInvertOnly) override
int GetFontTable(uint32_t nTagCode, unsigned char *) const
virtual bool setClipRegion(const vcl::Region &) override
void ImplDrawPixel(tools::Long nX, tools::Long nY, const RGBAColor &)
virtual SalGraphicsImpl * GetImpl() const override
virtual std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
UInt32 getState(ControlState nState)
virtual bool hasFastDrawTransformedBitmap() const override
Used e.g.
virtual void FreeEmbedFontData(const void *pData, tools::Long nDataLen) override
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 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
float mfFontStretch
<1.0: font is squeezed, >1.0 font is stretched, else 1.0
Definition: quartz/salgdi.h:96
virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
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]
CGContextHolder maBGContextHolder
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
Definition: salgdi.hxx:64
void Pattern50Fill()
virtual FontCharMapRef GetFontCharMap() const override
virtual void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry) override
CFArrayRef mpCTFontArray
virtual void GetFontMetric(ImplFontMetricDataRef &, int nFallbackLevel) override
CGMutablePathRef mxClipPath
path representing current clip region
virtual OUString getRenderBackendName() const override
virtual const void * GetEmbedFontData(const PhysicalFontFace *, tools::Long *pDataLen) override
bool ImplGetGlyphBoundRect(sal_GlyphId, tools::Rectangle &, bool) const override
virtual void ResetClipRegion() override
PolyFlags
virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override