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
51#include <impfontmetricdata.hxx>
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
107
108 CTFontRef mpCTFont;
109};
110
111// TODO: move into cross-platform headers
112
114{
115public:
118
119 bool Init( void );
121
123 CoreTextFontFace* GetFontDataFromId( sal_IntPtr nFontId ) const;
124
125 CTFontCollectionRef fontCollection() { return mpCTFontCollection; }
126
127private:
128 CTFontCollectionRef mpCTFontCollection;
129 CFArrayRef mpCTFontArray;
130
131 std::unordered_map<sal_IntPtr, rtl::Reference<CoreTextFontFace>> maFontContainer;
132};
133
134namespace sal::aqua
135{
138}
139
141{
143 CGMutablePathRef mxClipPath;
144
148
151
152 // Graphics types
153#ifdef MACOSX
154 AquaSalFrame* mpFrame;
156 bool mbWindow;
157#else // IOS
158 // mirror AquaSalVirtualDevice::mbForeignContext for SvpSalGraphics objects related to such
160#endif
165
166 CGLayerHolder maLayer; // Quartz graphics layer
167 CGContextHolder maContextHolder; // Quartz drawing context
168 CGContextHolder maBGContextHolder; // Quartz drawing context for CGLayer
169 CGContextHolder maCSContextHolder; // Quartz drawing context considering the color space
172 int mnXorMode; // 0: off 1: on 2: invert only
173 int mnBitmapDepth; // zero unless bitmap
174
178
179 std::unique_ptr<XorEmulation> mpXorEmulation;
180
182 : mxClipPath(nullptr)
185#ifdef MACOSX
186 , mpFrame(nullptr)
187 , mbWindow(false)
188#else
189 , mbForeignContext(false)
190#endif
191 , mbPrinter(false)
192 , mbVirDev(false)
193 , mnWidth(0)
194 , mnHeight(0)
195 , mnXorMode(0)
196 , mnBitmapDepth(0)
198 , mbNonAntialiasedText( false )
199 {}
200
202 {
203 if (mxClipPath)
204 {
205 CGPathRelease(mxClipPath);
206 mxClipPath = nullptr;
207 }
208 }
209
211 {
213 }
214
216 void setState();
217
218 bool isPenVisible() const
219 {
220 return maLineColor.IsVisible();
221 }
222 bool isBrushVisible() const
223 {
224 return maFillColor.IsVisible();
225 }
226
227 void refreshRect(float lX, float lY, float lWidth, float lHeight)
228 {
229#ifdef MACOSX
230 if (!mbWindow) // view only on Window graphics
231 return;
232
233 if (mpFrame)
234 {
235 // update a little more around the designated rectangle
236 // this helps with antialiased rendering
237 // Rounding down x and width can accumulate a rounding error of up to 2
238 // The decrementing of x, the rounding error and the antialiasing border
239 // require that the width and the height need to be increased by four
240 const tools::Rectangle aVclRect(
241 Point(tools::Long(lX - 1), tools::Long(lY - 1)),
242 Size(tools::Long(lWidth + 4), tools::Long(lHeight + 4)));
243
244 mpFrame->maInvalidRect.Union(aVclRect);
245 }
246#else
247 (void) lX;
248 (void) lY;
249 (void) lWidth;
250 (void) lHeight;
251 return;
252#endif
253 }
254
255 // apply the XOR mask to the target context if active and dirty
257 {
258 if (!mpXorEmulation)
259 return;
260 if (mpXorEmulation->UpdateTarget())
261 {
262 refreshRect(0, 0, mnWidth, mnHeight); // TODO: refresh minimal changerect
263 }
264 }
265
266 // differences between VCL, Quartz and kHiThemeOrientation coordinate systems
267 // make some graphics seem to be vertically-mirrored from a VCL perspective
268 bool isFlipped() const
269 {
270 #ifdef MACOSX
271 return mbWindow;
272 #else
273 return false;
274 #endif
275 }
276};
277
279{
280public:
281 virtual ~AquaGraphicsBackendBase() = 0;
284 {
285 return mpImpl;
286 }
288 virtual bool drawNativeControl(ControlType nType,
289 ControlPart nPart,
290 const tools::Rectangle &rControlRegion,
291 ControlState nState,
292 const ImplControlValue &aValue) = 0;
293 virtual void drawTextLayout(const GenericSalLayout& layout, bool bTextRenderModeForResolutionIndependentLayout) = 0;
294 virtual void Flush() {}
295 virtual void Flush( const tools::Rectangle& ) {}
297protected:
299 : mrShared( rShared ), mpImpl(impl)
300 {}
302 ControlPart nPart,
303 const tools::Rectangle &rControlRegion,
304 ControlState nState,
305 const ImplControlValue &aValue,
306 CGContextRef context,
307 AquaSalFrame* mpFrame);
309private:
311};
312
314
316{
317private:
318 void drawPixelImpl( tools::Long nX, tools::Long nY, const RGBAColor& rColor); // helper to draw single pixels
319
320#ifdef MACOSX
321 void refreshRect(const NSRect& rRect)
322 {
323 mrShared.refreshRect(rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height);
324 }
325#else
326 void refreshRect(const CGRect& /*rRect*/)
327 {}
328#endif
329
331
332#ifdef MACOSX
333 void copyScaledArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
334 tools::Long nSrcWidth, tools::Long nSrcHeight, AquaSharedAttributes* pSrcShared);
335#endif
336
337public:
340
341 void Init() override;
342
343 void freeResources() override;
344
345 OUString getRenderBackendName() const override
346 {
347 return "aqua";
348 }
349
350 void setClipRegion(vcl::Region const& rRegion) override;
351 void ResetClipRegion() override;
352
353 sal_uInt16 GetBitCount() const override;
354
356
357 void SetLineColor() override;
358 void SetLineColor(Color nColor) override;
359 void SetFillColor() override;
360 void SetFillColor(Color nColor) override;
361 void SetXORMode(bool bSet, bool bInvertOnly) override;
362 void SetROPLineColor(SalROPColor nROPColor) override;
363 void SetROPFillColor(SalROPColor nROPColor) override;
364
365 void drawPixel(tools::Long nX, tools::Long nY) override;
366 void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override;
367
368 void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override;
369 void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override;
370 void drawPolyLine(sal_uInt32 nPoints, const Point* pPointArray) override;
371 void drawPolygon(sal_uInt32 nPoints, const Point* pPointArray) override;
372 void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32* pPoints,
373 const Point** pPointArray) override;
374
375 bool drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice,
376 const basegfx::B2DPolyPolygon&, double fTransparency) override;
377
378 bool drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice, const basegfx::B2DPolygon&,
379 double fTransparency, double fLineWidth, const std::vector<double>* pStroke,
380 basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle,
381 bool bPixelSnapHairline) override;
382
383 bool drawPolyLineBezier(sal_uInt32 nPoints, const Point* pPointArray,
384 const PolyFlags* pFlagArray) override;
385
386 bool drawPolygonBezier(sal_uInt32 nPoints, const Point* pPointArray,
387 const PolyFlags* pFlagArray) override;
388
389 bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32* pPoints,
390 const Point* const* pPointArray,
391 const PolyFlags* const* pFlagArray) override;
392
393 void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
394 tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override;
395
396 void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
397
398 void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap) override;
399
400 void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
401 const SalBitmap& rMaskBitmap) override;
402
403 void drawMask(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
404 Color nMaskColor) override;
405
406 std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth,
407 tools::Long nHeight) override;
408
410
412 SalInvert nFlags) override;
413
414 void invert(sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags) override;
415
417 void* pPtr, sal_uInt32 nSize) override;
418
419 bool blendBitmap(const SalTwoRect&, const SalBitmap& rBitmap) override;
420
421 bool blendAlphaBitmap(const SalTwoRect&, const SalBitmap& rSrcBitmap,
422 const SalBitmap& rMaskBitmap, const SalBitmap& rAlphaBitmap) override;
423
424 bool drawAlphaBitmap(const SalTwoRect&, const SalBitmap& rSourceBitmap,
425 const SalBitmap& rAlphaBitmap) override;
426
428 const basegfx::B2DPoint& rY, const SalBitmap& rSourceBitmap,
429 const SalBitmap* pAlphaBitmap, double fAlpha) override;
430
431 bool hasFastDrawTransformedBitmap() const override;
432
434 sal_uInt8 nTransparency) override;
435
436 bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) override;
438 SalGradient const& rGradient) override;
439
440 virtual bool drawNativeControl(ControlType nType,
441 ControlPart nPart,
442 const tools::Rectangle &rControlRegion,
443 ControlState nState,
444 const ImplControlValue &aValue) override;
445
446 virtual void drawTextLayout(const GenericSalLayout& layout, bool bTextRenderModeForResolutionIndependentLayout) override;
447
448 bool supportsOperation(OutDevSupportType eType) const override;
449};
450
452{
454 std::unique_ptr<AquaGraphicsBackendBase> mpBackend;
455
457 sal_Int32 mnRealDPIX;
458 sal_Int32 mnRealDPIY;
459
460 // Device Font settings
462
463public:
464 AquaSalGraphics(bool bPrinter = false);
465 virtual ~AquaSalGraphics() override;
466
467 void SetVirDevGraphics(SalVirtualDevice* pVirDev,CGLayerHolder const &rLayer, CGContextRef, int nBitDepth = 0);
468#ifdef MACOSX
469 void initResolution( NSWindow* );
470 void copyResolution( AquaSalGraphics& );
471 void updateResolution();
472
473 void SetWindowGraphics( AquaSalFrame* pFrame );
474 bool IsWindowGraphics() const { return maShared.mbWindow; }
475 void SetPrinterGraphics(CGContextRef, sal_Int32 nRealDPIX, sal_Int32 nRealDPIY);
476 AquaSalFrame* getGraphicsFrame() const { return maShared.mpFrame; }
477 void setGraphicsFrame( AquaSalFrame* pFrame ) { maShared.mpFrame = pFrame; }
478#endif
479
480#ifdef MACOSX
481 void UpdateWindow( NSRect& ); // delivered in NSView coordinates
482 void RefreshRect(const NSRect& rRect)
483 {
484 maShared.refreshRect(rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height);
485 }
486#else
487 void RefreshRect( const CGRect& ) {}
488#endif
489
490 void Flush();
491 void Flush( const tools::Rectangle& );
493
495 // InvalidateContext does an UnsetState and sets mrContext to 0
497
499 {
500 return mpBackend.get();
501 }
502
503 virtual SalGraphicsImpl* GetImpl() const override;
504
505#ifdef MACOSX
506
507protected:
508
509 // native widget rendering methods that require mirroring
510
511 virtual bool isNativeControlSupported( ControlType nType, ControlPart nPart ) override;
512
513 virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
514 const Point& aPos, bool& rIsInside ) override;
515 virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
516 ControlState nState, const ImplControlValue& aValue,
517 const OUString& aCaption, const Color& rBackgroundColor ) override;
518 virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
519 const ImplControlValue& aValue, const OUString& aCaption,
520 tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
521#endif
522
523public:
524 // get device resolution
525 virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
526 // set the text color to a specific color
527 virtual void SetTextColor( Color nColor ) override;
528 // set the font
529 virtual void SetFont( LogicalFontInstance*, int nFallbackLevel ) override;
530 // get the current font's metrics
531 virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
532 // get the repertoire of the current font
533 virtual FontCharMapRef GetFontCharMap() const override;
534 virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
535 // graphics must fill supplied font list
537 // graphics must drop any cached font info
538 virtual void ClearDevFontCache() override;
539 virtual bool AddTempDevFont( vcl::font::PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
540
541 virtual std::unique_ptr<GenericSalLayout>
542 GetTextLayout(int nFallbackLevel) override;
543 virtual void DrawTextLayout( const GenericSalLayout& ) override;
544
545 virtual SystemGraphicsData
546 GetGraphicsData() const override;
547};
548
549/* 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 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()
virtual void drawTextLayout(const GenericSalLayout &layout, bool bTextRenderModeForResolutionIndependentLayout)=0
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
virtual void drawTextLayout(const GenericSalLayout &layout, bool bTextRenderModeForResolutionIndependentLayout) 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
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]
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)
virtual void GetFontMetric(ImplFontMetricDataRef &, int nFallbackLevel) override
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
CTFontRef GetCTFont() const
Definition: quartz/salgdi.h:96
bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon &, bool) const override
bool ImplGetGlyphBoundRect(sal_GlyphId, tools::Rectangle &, 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 &)
void GetFontMetric(ImplFontMetricDataRef const &)
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:68
SalInvert
Definition: salgtype.hxx:72
#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:174