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 
133 namespace sal::aqua
134 {
135 float getWindowScaling();
136 }
137 
139 {
141  CGMutablePathRef mxClipPath;
142 
146 
149 
150  // Graphics types
151 #ifdef MACOSX
152  AquaSalFrame* mpFrame;
154  bool mbWindow;
155 #else // IOS
156  // mirror AquaSalVirtualDevice::mbForeignContext for SvpSalGraphics objects related to such
158 #endif
159  bool mbPrinter;
162  bool mbVirDev;
163 
164  CGLayerHolder maLayer; // Quartz graphics layer
165  CGContextHolder maContextHolder; // Quartz drawing context
166  CGContextHolder maBGContextHolder; // Quartz drawing context for CGLayer
167  CGContextHolder maCSContextHolder; // Quartz drawing context considering the color space
168  int mnWidth;
169  int mnHeight;
170  int mnXorMode; // 0: off 1: on 2: invert only
171  int mnBitmapDepth; // zero unless bitmap
172 
173  std::unique_ptr<XorEmulation> mpXorEmulation;
174 
176  : mxClipPath(nullptr)
177  , maLineColor(COL_WHITE)
178  , maFillColor(COL_BLACK)
179 #ifdef MACOSX
180  , mpFrame(nullptr)
181  , mbWindow(false)
182 #else
183  , mbForeignContext(false)
184 #endif
185  , mbPrinter(false)
186  , mbVirDev(false)
187  , mnWidth(0)
188  , mnHeight(0)
189  , mnXorMode(0)
190  , mnBitmapDepth(0)
191  {}
192 
194  {
195  if (mxClipPath)
196  {
197  CGPathRelease(mxClipPath);
198  mxClipPath = nullptr;
199  }
200  }
201 
202  void unsetState()
203  {
204  unsetClipPath();
205  }
206 
207  bool checkContext();
208  void setState();
209 
210  bool isPenVisible() const
211  {
212  return maLineColor.IsVisible();
213  }
214  bool isBrushVisible() const
215  {
216  return maFillColor.IsVisible();
217  }
218 
219  void refreshRect(float lX, float lY, float lWidth, float lHeight)
220  {
221 #ifdef MACOSX
222  if (!mbWindow) // view only on Window graphics
223  return;
224 
225  if (mpFrame)
226  {
227  // update a little more around the designated rectangle
228  // this helps with antialiased rendering
229  // Rounding down x and width can accumulate a rounding error of up to 2
230  // The decrementing of x, the rounding error and the antialiasing border
231  // require that the width and the height need to be increased by four
232  const tools::Rectangle aVclRect(
233  Point(tools::Long(lX - 1), tools::Long(lY - 1)),
234  Size(tools::Long(lWidth + 4), tools::Long(lHeight + 4)));
235 
236  mpFrame->maInvalidRect.Union(aVclRect);
237  }
238 #else
239  (void) lX;
240  (void) lY;
241  (void) lWidth;
242  (void) lHeight;
243  return;
244 #endif
245  }
246 
247  // apply the XOR mask to the target context if active and dirty
249  {
250  if (!mpXorEmulation)
251  return;
252  if (mpXorEmulation->UpdateTarget())
253  {
254  refreshRect(0, 0, mnWidth, mnHeight); // TODO: refresh minimal changerect
255  }
256  }
257 
258  // differences between VCL, Quartz and kHiThemeOrientation coordinate systems
259  // make some graphics seem to be vertically-mirrored from a VCL perspective
260  bool isFlipped() const
261  {
262  #ifdef MACOSX
263  return mbWindow;
264  #else
265  return false;
266  #endif
267  }
268 };
269 
271 {
272 private:
274 
275  void drawPixelImpl( tools::Long nX, tools::Long nY, const RGBAColor& rColor); // helper to draw single pixels
276 
277 #ifdef MACOSX
278  void refreshRect(const NSRect& rRect)
279  {
280  mrShared.refreshRect(rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height);
281  }
282 #else
283  void refreshRect(const CGRect& /*rRect*/)
284  {}
285 #endif
286 
287  void pattern50Fill();
288 
289 #ifdef MACOSX
290  void copyScaledArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
291  tools::Long nSrcWidth, tools::Long nSrcHeight, AquaSharedAttributes* pSrcShared);
292 #endif
293 
294 public:
296  ~AquaGraphicsBackend() override;
297 
298  void Init() override;
299 
300  void freeResources() override;
301 
302  OUString getRenderBackendName() const override
303  {
304  return "aqua";
305  }
306 
307  bool setClipRegion(vcl::Region const& rRegion) override;
308  void ResetClipRegion() override;
309 
310  sal_uInt16 GetBitCount() const override;
311 
312  tools::Long GetGraphicsWidth() const override;
313 
314  void SetLineColor() override;
315  void SetLineColor(Color nColor) override;
316  void SetFillColor() override;
317  void SetFillColor(Color nColor) override;
318  void SetXORMode(bool bSet, bool bInvertOnly) override;
319  void SetROPLineColor(SalROPColor nROPColor) override;
320  void SetROPFillColor(SalROPColor nROPColor) override;
321 
322  void drawPixel(tools::Long nX, tools::Long nY) override;
323  void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override;
324 
325  void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override;
326  void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override;
327  void drawPolyLine(sal_uInt32 nPoints, const Point* pPointArray) override;
328  void drawPolygon(sal_uInt32 nPoints, const Point* pPointArray) override;
329  void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32* pPoints,
330  const Point** pPointArray) override;
331 
332  bool drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice,
333  const basegfx::B2DPolyPolygon&, double fTransparency) override;
334 
335  bool drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice, const basegfx::B2DPolygon&,
336  double fTransparency, double fLineWidth, const std::vector<double>* pStroke,
337  basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle,
338  bool bPixelSnapHairline) override;
339 
340  bool drawPolyLineBezier(sal_uInt32 nPoints, const Point* pPointArray,
341  const PolyFlags* pFlagArray) override;
342 
343  bool drawPolygonBezier(sal_uInt32 nPoints, const Point* pPointArray,
344  const PolyFlags* pFlagArray) override;
345 
346  bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32* pPoints,
347  const Point* const* pPointArray,
348  const PolyFlags* const* pFlagArray) override;
349 
350  void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
351  tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override;
352 
353  void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
354 
355  void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap) override;
356 
357  void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
358  const SalBitmap& rMaskBitmap) override;
359 
360  void drawMask(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
361  Color nMaskColor) override;
362 
363  std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth,
364  tools::Long nHeight) override;
365 
366  Color getPixel(tools::Long nX, tools::Long nY) override;
367 
368  void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
369  SalInvert nFlags) override;
370 
371  void invert(sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags) override;
372 
373  bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
374  void* pPtr, sal_uInt32 nSize) override;
375 
376  bool blendBitmap(const SalTwoRect&, const SalBitmap& rBitmap) override;
377 
378  bool blendAlphaBitmap(const SalTwoRect&, const SalBitmap& rSrcBitmap,
379  const SalBitmap& rMaskBitmap, const SalBitmap& rAlphaBitmap) override;
380 
381  bool drawAlphaBitmap(const SalTwoRect&, const SalBitmap& rSourceBitmap,
382  const SalBitmap& rAlphaBitmap) override;
383 
384  bool drawTransformedBitmap(const basegfx::B2DPoint& rNull, const basegfx::B2DPoint& rX,
385  const basegfx::B2DPoint& rY, const SalBitmap& rSourceBitmap,
386  const SalBitmap* pAlphaBitmap, double fAlpha) override;
387 
388  bool hasFastDrawTransformedBitmap() const override;
389 
390  bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight,
391  sal_uInt8 nTransparency) override;
392 
393  bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) override;
394  bool implDrawGradient(basegfx::B2DPolyPolygon const& rPolyPolygon,
395  SalGradient const& rGradient) override;
396 
397  bool supportsOperation(OutDevSupportType eType) const override;
398 };
399 
401 {
403  std::unique_ptr<AquaGraphicsBackend> mpBackend;
404 
406  sal_Int32 mnRealDPIX;
407  sal_Int32 mnRealDPIY;
408 
409  // Device Font settings
414 
415 public:
416  AquaSalGraphics();
417  virtual ~AquaSalGraphics() override;
418 
419  void SetVirDevGraphics(CGLayerHolder const &rLayer, CGContextRef, int nBitDepth = 0);
420 #ifdef MACOSX
421  void initResolution( NSWindow* );
422  void copyResolution( AquaSalGraphics& );
423  void updateResolution();
424 
425  void SetWindowGraphics( AquaSalFrame* pFrame );
426  bool IsWindowGraphics() const { return maShared.mbWindow; }
427  void SetPrinterGraphics(CGContextRef, sal_Int32 nRealDPIX, sal_Int32 nRealDPIY);
428  AquaSalFrame* getGraphicsFrame() const { return maShared.mpFrame; }
429  void setGraphicsFrame( AquaSalFrame* pFrame ) { maShared.mpFrame = pFrame; }
430 #endif
431 
432 #ifdef MACOSX
433  void UpdateWindow( NSRect& ); // delivered in NSView coordinates
434  void RefreshRect(const NSRect& rRect)
435  {
436  maShared.refreshRect(rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height);
437  }
438 #else
439  void RefreshRect( const CGRect& ) {}
440 #endif
441 
442  void UnsetState();
443  // InvalidateContext does an UnsetState and sets mrContext to 0
444  void InvalidateContext();
445 
447  {
448  return mpBackend.get();
449  }
450 
451  virtual SalGraphicsImpl* GetImpl() const override;
452 
453 #ifdef MACOSX
454 
455 protected:
456 
457  // native widget rendering methods that require mirroring
458 
459  virtual bool isNativeControlSupported( ControlType nType, ControlPart nPart ) override;
460 
461  virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
462  const Point& aPos, bool& rIsInside ) override;
463  virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
464  ControlState nState, const ImplControlValue& aValue,
465  const OUString& aCaption, const Color& rBackgroundColor ) override;
466  virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
467  const ImplControlValue& aValue, const OUString& aCaption,
468  tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
469 #endif
470 
471 public:
472  // get device resolution
473  virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
474  // set the text color to a specific color
475  virtual void SetTextColor( Color nColor ) override;
476  // set the font
477  virtual void SetFont( LogicalFontInstance*, int nFallbackLevel ) override;
478  // get the current font's metrics
479  virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
480  // get the repertoire of the current font
481  virtual FontCharMapRef GetFontCharMap() const override;
482  virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
483  // graphics must fill supplied font list
484  virtual void GetDevFontList( PhysicalFontCollection* ) override;
485  // graphics must drop any cached font info
486  virtual void ClearDevFontCache() override;
487  virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
488  // CreateFontSubset: a method to get a subset of glyhps of a font
489  // inside a new valid font file
490  // returns TRUE if creation of subset was successful
491  // parameters: rToFile: contains an osl file URL to write the subset to
492  // pFont: describes from which font to create a subset
493  // pGlyphIDs: the glyph ids to be extracted
494  // pEncoding: the character code corresponding to each glyph
495  // pWidths: the advance widths of the corresponding glyphs (in PS font units)
496  // nGlyphs: the number of glyphs
497  // rInfo: additional outgoing information
498  // implementation note: encoding 0 with glyph id 0 should be added implicitly
499  // as "undefined character"
500  virtual bool CreateFontSubset( const OUString& rToFile,
501  const PhysicalFontFace* pFont,
502  const sal_GlyphId* pGlyphIds,
503  const sal_uInt8* pEncoding,
504  sal_Int32* pWidths,
505  int nGlyphs,
506  FontSubsetInfo& rInfo // out parameter
507  ) override;
508 
509  // GetEmbedFontData: gets the font data for a font marked
510  // embeddable by GetDevFontList or NULL in case of error
511  // parameters: pFont: describes the font in question
512  // pDataLen: out parameter, contains the byte length of the returned buffer
513  virtual const void* GetEmbedFontData(const PhysicalFontFace*, tools::Long* pDataLen)
514  override;
515  // frees the font data again
516  virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
517 
518  virtual void GetGlyphWidths( const PhysicalFontFace*,
519  bool bVertical,
520  std::vector< sal_Int32 >& rWidths,
521  Ucs2UIntMap& rUnicodeEnc ) override;
522 
523  virtual std::unique_ptr<GenericSalLayout>
524  GetTextLayout(int nFallbackLevel) override;
525  virtual void DrawTextLayout( const GenericSalLayout& ) override;
526 
527  virtual SystemGraphicsData
528  GetGraphicsData() const override;
529 
530 private:
531  UInt32 getState( ControlState nState );
532  UInt32 getTrackState( ControlState nState );
533  static bool GetRawFontData( const PhysicalFontFace* pFontData,
534  std::vector<unsigned char>& rBuffer,
535  bool* pJustCFF );
536 };
537 
538 
539 #endif // INCLUDED_VCL_INC_QUARTZ_SALGDI_H
540 
541 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
float getWindowScaling()
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
virtual ~CoreTextFontFace() override
void InvalidateContext()
bool Init(void)
void SetLineColor() override
CoreTextFontFace(const FontAttributes &, sal_IntPtr nFontID)
bool mbPrinter
is this a printer graphics
virtual void GetDevFontList(PhysicalFontCollection *) override
RGBAColor maFillColor
brush color RGBA
CTFontCollectionRef mpCTFontCollection
SalROPColor
Definition: salgtype.hxx:70
sal_Int32 mnRealDPIX
device resolution of this graphics
bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPointArray, const PolyFlags *pFlagArray) override
CFMutableDictionaryRef GetStyleDict(void) const
Definition: quartz/salgdi.h:93
bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency) override
CGContextHolder maContextHolder
void SetXORMode(bool bSet, bool bInvertOnly) override
bool mbFontCapabilitiesRead
Definition: quartz/salgdi.h:80
bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPointArray, const PolyFlags *const *pFlagArray) override
virtual bool AddTempDevFont(PhysicalFontCollection *, const OUString &rFileURL, const OUString &rFontName) override
#define MAX_FALLBACK
Definition: sallayout.hxx:42
long Long
bool mbFauxBold
faux bold - true, if font doesn't have proper bold variants
CoreTextFontFace * GetFontDataFromId(sal_IntPtr nFontId) const
bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient) override
float mfFontRotation
text rotation in radian
Definition: quartz/salgdi.h:98
static bool GetRawFontData(const PhysicalFontFace *pFontData, std::vector< unsigned char > &rBuffer, bool *pJustCFF)
void GetFontMetric(ImplFontMetricDataRef const &)
std::unique_ptr< AquaGraphicsBackend > mpBackend
AquaSharedAttributes & mrShared
void AnnounceFonts(PhysicalFontCollection &) const
void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
SystemFontList(void)
sal_uInt16 sal_GlyphId
Definition: glyphitem.hxx:29
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
bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPointArray, const PolyFlags *pFlagArray) override
void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
virtual void GetResolution(sal_Int32 &rDPIX, sal_Int32 &rDPIY) override
RGBAColor maTextColor
std::unordered_map< sal_IntPtr, rtl::Reference< CoreTextFontFace > > maFontContainer
~CoreTextStyle() override
void drawPixelImpl(tools::Long nX, tools::Long nY, const RGBAColor &rColor)
void drawPolyLine(sal_uInt32 nPoints, const Point *pPointArray) override
hb_font_t * ImplInitHbFont() override
virtual ~AquaSalGraphics() override
void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
UInt32 getTrackState(ControlState nState)
void freeResources() override
virtual void SetTextColor(Color nColor) override
CGContextHolder maBGContextHolder
void SetVirDevGraphics(CGLayerHolder const &rLayer, CGContextRef, int nBitDepth=0)
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 ...
OUString getRenderBackendName() const 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.
void Init() override
CFMutableDictionaryRef mpStyleDict
CoreText text style object.
std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
void SetROPLineColor(SalROPColor nROPColor) override
void SetROPFillColor(SalROPColor nROPColor) override
CGLayerHolder maLayer
abstract base class for physical font faces
void drawPixel(tools::Long nX, tools::Long nY) override
bool setClipRegion(vcl::Region const &rRegion) override
void ResetClipRegion() override
vcl::FontCapabilities maFontCapabilities
Definition: quartz/salgdi.h:79
~AquaGraphicsBackend() override
bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap) override
virtual void ClearDevFontCache() override
void RefreshRect(const CGRect &)
AquaGraphicsBackend * getAquaGraphicsBackend() const
virtual bool isNativeControlSupported(ControlType eType, ControlPart ePart)
Query the platform layer for native control support.
void refreshRect(const CGRect &)
bool isFlipped() const
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.
tools::Rectangle maInvalidRect
Definition: osx/salframe.h:87
sal_uInt16 GetBitCount() const override
CoreTextStyle(const PhysicalFontFace &, const FontSelectPattern &)
bool IsVisible() const
SalInvert
Definition: salgtype.hxx:74
bool HasChar(sal_uInt32 cChar) const
tools::Long GetGraphicsWidth() const override
bool drawGradient(const tools::PolyPolygon &rPolygon, const Gradient &rGradient) override
void SetFillColor() override
bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon &, bool) const override
bool isPenVisible() const
FontCharMapRef GetFontCharMap() const override
virtual SystemGraphicsData GetGraphicsData() const override
void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
sal_Int32 mnRealDPIY
void refreshRect(float lX, float lY, float lWidth, float lHeight)
std::unique_ptr< XorEmulation > mpXorEmulation
sal_IntPtr GetFontId() const override
bool isBrushVisible() const
void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPointArray) override
void AddFont(CoreTextFontFace *)
const sal_IntPtr mnFontId
Definition: quartz/salgdi.h:77
bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
AquaGraphicsBackend(AquaSharedAttributes &rShared)
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 drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
bool hasFastDrawTransformedBitmap() const override
Used e.g.
tools::Rectangle & Union(const tools::Rectangle &rRect)
unsigned char sal_uInt8
bool mbVirDev
is this a virtual device graphics
rtl::Reference< LogicalFontInstance > CreateFontInstance(const FontSelectPattern &) const override
~SystemFontList(void)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
int GetFontTable(uint32_t nTagCode, unsigned char *) const
bool supportsOperation(OutDevSupportType eType) const override
CGMutablePathRef mxClipPath
path representing current clip region
virtual SalGraphicsImpl * GetImpl() const override
UInt32 getState(ControlState nState)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
AquaSharedAttributes maShared
virtual void FreeEmbedFontData(const void *pData, tools::Long nDataLen) 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
void drawPolygon(sal_uInt32 nPoints, const Point *pPointArray) override
bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) 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
float mfFontStretch
<1.0: font is squeezed, >1.0 font is stretched, else 1.0
Definition: quartz/salgdi.h:96
CGContextHolder maCSContextHolder
rtl::Reference< CoreTextStyle > mpTextStyle[MAX_FALLBACK]
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
Definition: salgdi.hxx:64
virtual FontCharMapRef GetFontCharMap() const override
Color getPixel(tools::Long nX, tools::Long nY) override
void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override
RGBAColor maLineColor
Drawing colors pen color RGBA.
CFArrayRef mpCTFontArray
virtual void GetFontMetric(ImplFontMetricDataRef &, int nFallbackLevel) override
virtual const void * GetEmbedFontData(const PhysicalFontFace *, tools::Long *pDataLen) override
bool ImplGetGlyphBoundRect(sal_GlyphId, tools::Rectangle &, bool) const override
PolyFlags
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo