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#pragma once
21
22#include <sal/config.h>
23
24#include <vector>
25
27#include <tools/long.hxx>
28
29#include <premac.h>
30#ifdef MACOSX
31#include <ApplicationServices/ApplicationServices.h>
32#include <osx/osxvcltypes.h>
33#include <osx/salframe.h>
34#else
35#include <CoreGraphics/CoreGraphics.h>
36#include <CoreText/CoreText.h>
37#endif
38#include <postmac.h>
39
40#ifdef IOS
41// iOS defines a different Point class so include salgeom.hxx after postmac.h
42// so that it will use the Point class in tools/gen.hxx
43#include "salgeom.hxx"
44#endif
45
47#include <vcl/metric.hxx>
48
49
53#include <salgdi.hxx>
54
56#include <unordered_map>
57#include <hb-ot.h>
58
59#include <quartz/CGHelpers.hxx>
60
61class AquaSalFrame;
62class FontAttributes;
63class XorEmulation;
64
65// CoreText-specific physically available font face
67{
68public:
69 CoreTextFontFace( const FontAttributes&, CTFontDescriptorRef xRef );
71
72 sal_IntPtr GetFontId() const override;
73
74 CTFontDescriptorRef GetFontDescriptorRef() const { return mxFontDescriptor; }
75
77
78 hb_blob_t* GetHbTable(hb_tag_t nTag) const override;
79
80 const std::vector<hb_variation_t>& GetVariations(const LogicalFontInstance&) const override;
81
82private:
83 CTFontDescriptorRef mxFontDescriptor;
84};
85
87{
89
90public:
91 ~CoreTextFont() override;
92
95
96 CTFontRef GetCTFont() const { return mpCTFont; }
97
102
103private:
105
106 CTFontRef mpCTFont;
107};
108
109// TODO: move into cross-platform headers
110
112{
113public:
116
117 bool Init( void );
119
121 CoreTextFontFace* GetFontDataFromId( sal_IntPtr nFontId ) const;
122
123 CTFontCollectionRef fontCollection() { return mpCTFontCollection; }
124
125private:
126 CTFontCollectionRef mpCTFontCollection;
127 CFArrayRef mpCTFontArray;
128
129 std::unordered_map<sal_IntPtr, rtl::Reference<CoreTextFontFace>> maFontContainer;
130};
131
132namespace sal::aqua
133{
134#ifdef MACOSX
135NSRect getTotalScreenBounds();
136void resetTotalScreenBounds();
137#endif
140}
141
143{
145 CGMutablePathRef mxClipPath;
146
150
153
154 // Graphics types
155#ifdef MACOSX
156 AquaSalFrame* mpFrame;
158 bool mbWindow;
159#else // IOS
160 // mirror AquaSalVirtualDevice::mbForeignContext for SvpSalGraphics objects related to such
162#endif
167
168 CGLayerHolder maLayer; // Quartz graphics layer
169 CGContextHolder maContextHolder; // Quartz drawing context
170 CGContextHolder maBGContextHolder; // Quartz drawing context for CGLayer
171 CGContextHolder maCSContextHolder; // Quartz drawing context considering the color space
174 int mnXorMode; // 0: off 1: on 2: invert only
175 int mnBitmapDepth; // zero unless bitmap
176
180
181 std::unique_ptr<XorEmulation> mpXorEmulation;
182
184 : mxClipPath(nullptr)
187#ifdef MACOSX
188 , mpFrame(nullptr)
189 , mbWindow(false)
190#else
191 , mbForeignContext(false)
192#endif
193 , mbPrinter(false)
194 , mbVirDev(false)
195 , mnWidth(0)
196 , mnHeight(0)
197 , mnXorMode(0)
198 , mnBitmapDepth(0)
200 , mbNonAntialiasedText( false )
201 {}
202
204 {
205 if (mxClipPath)
206 {
207 CGPathRelease(mxClipPath);
208 mxClipPath = nullptr;
209 }
210 }
211
213 {
215 }
216
218 void setState();
219
220 bool isPenVisible() const
221 {
222 return maLineColor.IsVisible();
223 }
224 bool isBrushVisible() const
225 {
226 return maFillColor.IsVisible();
227 }
228
229 void refreshRect(float lX, float lY, float lWidth, float lHeight)
230 {
231#ifdef MACOSX
232 if (!mbWindow) // view only on Window graphics
233 return;
234
235 if (mpFrame)
236 {
237 // update a little more around the designated rectangle
238 // this helps with antialiased rendering
239 // Rounding down x and width can accumulate a rounding error of up to 2
240 // The decrementing of x, the rounding error and the antialiasing border
241 // require that the width and the height need to be increased by four
242 const tools::Rectangle aVclRect(
243 Point(tools::Long(lX - 1), tools::Long(lY - 1)),
244 Size(tools::Long(lWidth + 4), tools::Long(lHeight + 4)));
245
246 mpFrame->maInvalidRect.Union(aVclRect);
247 }
248#else
249 (void) lX;
250 (void) lY;
251 (void) lWidth;
252 (void) lHeight;
253 return;
254#endif
255 }
256
257 // apply the XOR mask to the target context if active and dirty
259 {
260 if (!mpXorEmulation)
261 return;
262 if (mpXorEmulation->UpdateTarget())
263 {
264 refreshRect(0, 0, mnWidth, mnHeight); // TODO: refresh minimal changerect
265 }
266 }
267
268 // differences between VCL, Quartz and kHiThemeOrientation coordinate systems
269 // make some graphics seem to be vertically-mirrored from a VCL perspective
270 bool isFlipped() const
271 {
272 #ifdef MACOSX
273 return mbWindow;
274 #else
275 return false;
276 #endif
277 }
278};
279
281{
282public:
283 virtual ~AquaGraphicsBackendBase() = 0;
286 {
287 return mpImpl;
288 }
290 virtual bool drawNativeControl(ControlType nType,
291 ControlPart nPart,
292 const tools::Rectangle &rControlRegion,
293 ControlState nState,
294 const ImplControlValue &aValue) = 0;
295 virtual void drawTextLayout(const GenericSalLayout& layout) = 0;
296 virtual void Flush() {}
297 virtual void Flush( const tools::Rectangle& ) {}
299protected:
301 : mrShared( rShared ), mpImpl(impl)
302 {}
304 ControlPart nPart,
305 const tools::Rectangle &rControlRegion,
306 ControlState nState,
307 const ImplControlValue &aValue,
308 CGContextRef context,
309 AquaSalFrame* mpFrame);
311private:
313};
314
316
318{
319private:
320 void drawPixelImpl( tools::Long nX, tools::Long nY, const RGBAColor& rColor); // helper to draw single pixels
321
322#ifdef MACOSX
323 void refreshRect(const NSRect& rRect)
324 {
325 mrShared.refreshRect(rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height);
326 }
327#else
328 void refreshRect(const CGRect& /*rRect*/)
329 {}
330#endif
331
333
334#ifdef MACOSX
335 void copyScaledArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
336 tools::Long nSrcWidth, tools::Long nSrcHeight, AquaSharedAttributes* pSrcShared);
337#endif
338
339public:
342
343 void Init() override;
344
345 void freeResources() override;
346
347 OUString getRenderBackendName() const override
348 {
349 return "aqua";
350 }
351
352 void setClipRegion(vcl::Region const& rRegion) override;
353 void ResetClipRegion() override;
354
355 sal_uInt16 GetBitCount() const override;
356
358
359 void SetLineColor() override;
360 void SetLineColor(Color nColor) override;
361 void SetFillColor() override;
362 void SetFillColor(Color nColor) override;
363 void SetXORMode(bool bSet, bool bInvertOnly) override;
364 void SetROPLineColor(SalROPColor nROPColor) override;
365 void SetROPFillColor(SalROPColor nROPColor) override;
366
367 void drawPixel(tools::Long nX, tools::Long nY) override;
368 void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override;
369
370 void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override;
371 void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override;
372 void drawPolyLine(sal_uInt32 nPoints, const Point* pPointArray) override;
373 void drawPolygon(sal_uInt32 nPoints, const Point* pPointArray) override;
374 void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32* pPoints,
375 const Point** pPointArray) override;
376
377 bool drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice,
378 const basegfx::B2DPolyPolygon&, double fTransparency) override;
379
380 bool drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice, const basegfx::B2DPolygon&,
381 double fTransparency, double fLineWidth, const std::vector<double>* pStroke,
382 basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle,
383 bool bPixelSnapHairline) override;
384
385 bool drawPolyLineBezier(sal_uInt32 nPoints, const Point* pPointArray,
386 const PolyFlags* pFlagArray) override;
387
388 bool drawPolygonBezier(sal_uInt32 nPoints, const Point* pPointArray,
389 const PolyFlags* pFlagArray) override;
390
391 bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32* pPoints,
392 const Point* const* pPointArray,
393 const PolyFlags* const* pFlagArray) override;
394
395 void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
396 tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override;
397
398 void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
399
400 void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap) override;
401
402 void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
403 const SalBitmap& rMaskBitmap) override;
404
405 void drawMask(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
406 Color nMaskColor) override;
407
408 std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth,
409 tools::Long nHeight) override;
410
412
414 SalInvert nFlags) override;
415
416 void invert(sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags) override;
417
419 void* pPtr, sal_uInt32 nSize) override;
420
421 bool blendBitmap(const SalTwoRect&, const SalBitmap& rBitmap) override;
422
423 bool blendAlphaBitmap(const SalTwoRect&, const SalBitmap& rSrcBitmap,
424 const SalBitmap& rMaskBitmap, const SalBitmap& rAlphaBitmap) override;
425
426 bool drawAlphaBitmap(const SalTwoRect&, const SalBitmap& rSourceBitmap,
427 const SalBitmap& rAlphaBitmap) override;
428
430 const basegfx::B2DPoint& rY, const SalBitmap& rSourceBitmap,
431 const SalBitmap* pAlphaBitmap, double fAlpha) override;
432
433 bool hasFastDrawTransformedBitmap() const override;
434
436 sal_uInt8 nTransparency) override;
437
438 bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) override;
440 SalGradient const& rGradient) override;
441
442 virtual bool drawNativeControl(ControlType nType,
443 ControlPart nPart,
444 const tools::Rectangle &rControlRegion,
445 ControlState nState,
446 const ImplControlValue &aValue) override;
447
448 virtual void drawTextLayout(const GenericSalLayout& layout) override;
449
450 bool supportsOperation(OutDevSupportType eType) const override;
451};
452
454{
456 std::unique_ptr<AquaGraphicsBackendBase> mpBackend;
457
459 sal_Int32 mnRealDPIX;
460 sal_Int32 mnRealDPIY;
461
462 // Device Font settings
464
465public:
466 AquaSalGraphics(bool bPrinter = false);
467 virtual ~AquaSalGraphics() override;
468
469 void SetVirDevGraphics(SalVirtualDevice* pVirDev,CGLayerHolder const &rLayer, CGContextRef, int nBitDepth = 0);
470#ifdef MACOSX
471 void initResolution( NSWindow* );
472 void copyResolution( AquaSalGraphics& );
473 void updateResolution();
474
475 void SetWindowGraphics( AquaSalFrame* pFrame );
476 bool IsWindowGraphics() const { return maShared.mbWindow; }
477 void SetPrinterGraphics(CGContextRef, sal_Int32 nRealDPIX, sal_Int32 nRealDPIY);
478 AquaSalFrame* getGraphicsFrame() const { return maShared.mpFrame; }
479 void setGraphicsFrame( AquaSalFrame* pFrame ) { maShared.mpFrame = pFrame; }
480#endif
481
482#ifdef MACOSX
483 void UpdateWindow( NSRect& ); // delivered in NSView coordinates
484 void RefreshRect(const NSRect& rRect)
485 {
486 maShared.refreshRect(rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height);
487 }
488#else
489 void RefreshRect( const CGRect& ) {}
490#endif
491
492 void Flush();
493 void Flush( const tools::Rectangle& );
495
497 // InvalidateContext does an UnsetState and sets mrContext to 0
499
501 {
502 return mpBackend.get();
503 }
504
505 virtual SalGraphicsImpl* GetImpl() const override;
506
507#ifdef MACOSX
508
509protected:
510
511 // native widget rendering methods that require mirroring
512
513 virtual bool isNativeControlSupported( ControlType nType, ControlPart nPart ) override;
514
515 virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
516 const Point& aPos, bool& rIsInside ) override;
517 virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
518 ControlState nState, const ImplControlValue& aValue,
519 const OUString& aCaption, const Color& rBackgroundColor ) override;
520 virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
521 const ImplControlValue& aValue, const OUString& aCaption,
522 tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
523#endif
524
525public:
526 // get device resolution
527 virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
528 // set the text color to a specific color
529 virtual void SetTextColor( Color nColor ) override;
530 // set the font
531 virtual void SetFont( LogicalFontInstance*, int nFallbackLevel ) override;
532 // get the current font's metrics
533 virtual void GetFontMetric( FontMetricDataRef&, int nFallbackLevel ) override;
534 // get the repertoire of the current font
535 virtual FontCharMapRef GetFontCharMap() const override;
536 virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
537 // graphics must fill supplied font list
539 // graphics must drop any cached font info
540 virtual void ClearDevFontCache() override;
541 virtual bool AddTempDevFont( vcl::font::PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
542
543 virtual std::unique_ptr<GenericSalLayout>
544 GetTextLayout(int nFallbackLevel) override;
545 virtual void DrawTextLayout( const GenericSalLayout& ) override;
546
547 virtual SystemGraphicsData
548 GetGraphicsData() const override;
549};
550
551/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
virtual bool drawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue)=0
AquaGraphicsBackendBase(AquaSharedAttributes &rShared, SalGraphicsImpl *impl)
SalGraphicsImpl * mpImpl
AquaSharedAttributes & mrShared
AquaSharedAttributes & GetShared()
virtual void drawTextLayout(const GenericSalLayout &layout)=0
virtual void UpdateGeometryProvider(SalGeometryProvider *)
static bool performDrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, CGContextRef context, AquaSalFrame *mpFrame)
virtual void Flush(const tools::Rectangle &)
virtual ~AquaGraphicsBackendBase()=0
virtual void WindowBackingPropertiesChanged()
SalGraphicsImpl * GetImpl()
void ResetClipRegion() override
void SetFillColor(Color nColor) override
sal_uInt16 GetBitCount() const override
bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
bool supportsOperation(OutDevSupportType eType) const override
void SetROPFillColor(SalROPColor nROPColor) override
void SetLineColor() override
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
bool drawPolyPolygon(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &, double fTransparency) override
void SetLineColor(Color nColor) override
std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
void setClipRegion(vcl::Region const &rRegion) override
void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency) override
bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPointArray, const PolyFlags *const *pFlagArray) override
bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha) override
void refreshRect(const CGRect &)
bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPointArray, const PolyFlags *pFlagArray) override
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
tools::Long GetGraphicsWidth() const override
void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override
void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPointArray) override
virtual void drawTextLayout(const GenericSalLayout &layout) override
bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPointArray, const PolyFlags *pFlagArray) override
bool hasFastDrawTransformedBitmap() const override
~AquaGraphicsBackend() override
bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
void Init() override
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const SalBitmap &rMaskBitmap) override
void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap) override
void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override
void freeResources() override
bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
void SetROPLineColor(SalROPColor nROPColor) override
bool drawGradient(const tools::PolyPolygon &rPolygon, const Gradient &rGradient) override
void drawPolyLine(sal_uInt32 nPoints, const Point *pPointArray) override
OUString getRenderBackendName() const override
void invert(sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags) override
AquaGraphicsBackend(AquaSharedAttributes &rShared)
void drawPixelImpl(tools::Long nX, tools::Long nY, const RGBAColor &rColor)
bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient) override
Color getPixel(tools::Long nX, tools::Long nY) override
void drawPixel(tools::Long nX, tools::Long nY) override
void SetXORMode(bool bSet, bool bInvertOnly) override
virtual bool drawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue) override
void drawPolygon(sal_uInt32 nPoints, const Point *pPointArray) override
void SetFillColor() override
tools::Rectangle maInvalidRect
Definition: osx/salframe.h:87
virtual SalGraphicsImpl * GetImpl() const override
void InvalidateContext()
virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override
virtual void DrawTextLayout(const GenericSalLayout &) override
sal_Int32 mnRealDPIY
virtual FontCharMapRef GetFontCharMap() const override
std::unique_ptr< AquaGraphicsBackendBase > mpBackend
void RefreshRect(const CGRect &)
virtual SystemGraphicsData GetGraphicsData() const override
virtual std::unique_ptr< GenericSalLayout > GetTextLayout(int nFallbackLevel) override
AquaGraphicsBackendBase * getAquaGraphicsBackend() const
virtual void GetDevFontList(vcl::font::PhysicalFontCollection *) override
virtual void SetFont(LogicalFontInstance *, int nFallbackLevel) override
AquaSharedAttributes maShared
virtual void ClearDevFontCache() override
virtual void SetTextColor(Color nColor) override
sal_Int32 mnRealDPIX
device resolution of this graphics
virtual void GetResolution(sal_Int32 &rDPIX, sal_Int32 &rDPIY) override
rtl::Reference< CoreTextFont > mpFont[MAX_FALLBACK]
virtual void GetFontMetric(FontMetricDataRef &, int nFallbackLevel) override
AquaSalGraphics(bool bPrinter=false)
void WindowBackingPropertiesChanged()
virtual bool AddTempDevFont(vcl::font::PhysicalFontCollection *, const OUString &rFileURL, const OUString &rFontName) override
virtual ~AquaSalGraphics() override
void SetVirDevGraphics(SalVirtualDevice *pVirDev, CGLayerHolder const &rLayer, CGContextRef, int nBitDepth=0)
void Flush(const tools::Rectangle &)
CoreTextFontFace(const FontAttributes &, CTFontDescriptorRef xRef)
sal_IntPtr GetFontId() const override
~CoreTextFontFace() override
CTFontDescriptorRef GetFontDescriptorRef() const
Definition: quartz/salgdi.h:74
rtl::Reference< LogicalFontInstance > CreateFontInstance(const vcl::font::FontSelectPattern &) const override
CTFontDescriptorRef mxFontDescriptor
Definition: quartz/salgdi.h:83
const std::vector< hb_variation_t > & GetVariations(const LogicalFontInstance &) const override
hb_blob_t * GetHbTable(hb_tag_t nTag) const override
float mfFontRotation
text rotation in radian
CTFontRef mpCTFont
void GetFontMetric(FontMetricDataRef const &)
CTFontRef GetCTFont() const
Definition: quartz/salgdi.h:96
bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon &, bool) const override
float mfFontStretch
<1.0: font is squeezed, >1.0 font is stretched, else 1.0
Definition: quartz/salgdi.h:99
~CoreTextFont() override
CoreTextFont(const CoreTextFontFace &, const vcl::font::FontSelectPattern &)
bool IsVisible() const
Interface used to share logic on sizing between SalVirtualDevices and SalFrames.
Definition: salgeom.hxx:80
Implementation class for SalGraphics.
Definition: salgdiimpl.hxx:51
A non-visible drawable/buffer (e.g. an X11 Pixmap).
Definition: salvd.hxx:30
CTFontCollectionRef fontCollection()
std::unordered_map< sal_IntPtr, rtl::Reference< CoreTextFontFace > > maFontContainer
CTFontCollectionRef mpCTFontCollection
void AddFont(CoreTextFontFace *)
void AnnounceFonts(vcl::font::PhysicalFontCollection &) const
~SystemFontList(void)
bool Init(void)
CoreTextFontFace * GetFontDataFromId(sal_IntPtr nFontId) const
CFArrayRef mpCTFontArray
SystemFontList(void)
tools::Rectangle & Union(const tools::Rectangle &rRect)
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.
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.
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.
virtual bool isNativeControlSupported(ControlType eType, ControlPart ePart)
Query the platform layer for native control support.
abstract base class for physical font faces
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
uint32_t sal_GlyphId
Definition: glyphid.hxx:24
float getWindowScaling()
void resetWindowScaling()
long Long
PolyFlags
SalROPColor
Definition: salgtype.hxx:69
SalInvert
Definition: salgtype.hxx:73
#define MAX_FALLBACK
Definition: sallayout.hxx:46
bool isBrushVisible() const
CGLayerHolder maLayer
CGContextHolder maContextHolder
std::unique_ptr< XorEmulation > mpXorEmulation
bool mbVirDev
is this a virtual device graphics
bool mbNonAntialiasedText
allows text to be rendered without antialiasing
bool isPenVisible() const
CGContextHolder maBGContextHolder
CGContextHolder maCSContextHolder
bool mbPrinter
is this a printer graphics
RGBAColor maLineColor
Drawing colors pen color RGBA.
CGMutablePathRef mxClipPath
path representing current clip region
void refreshRect(float lX, float lY, float lWidth, float lHeight)
RGBAColor maFillColor
brush color RGBA
bool isFlipped() const
unsigned char sal_uInt8
OutDevSupportType
Definition: vclenum.hxx:163