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#include "salgeom.hxx"
38#endif
39#include <postmac.h>
40
42#include <vcl/metric.hxx>
43
44
46#include <impfontmetricdata.hxx>
48#include <salgdi.hxx>
49
51#include <unordered_map>
52#include <hb-ot.h>
53
54#include <quartz/CGHelpers.hxx>
55
56class AquaSalFrame;
57class FontAttributes;
58class XorEmulation;
59
60// CoreText-specific physically available font face
62{
63public:
64 CoreTextFontFace( const FontAttributes&, sal_IntPtr nFontID );
65 virtual ~CoreTextFontFace() override;
66
67 sal_IntPtr GetFontId() const override;
68
69 int GetFontTable( uint32_t nTagCode, unsigned char* ) const;
70 int GetFontTable( const char pTagName[5], unsigned char* ) const;
71
73
74 virtual hb_blob_t* GetHbTable(hb_tag_t nTag) const override;
75
76private:
77 const sal_IntPtr mnFontId;
78};
79
81{
83
84public:
85 ~CoreTextStyle() override;
86
89
90 CFMutableDictionaryRef GetStyleDict( void ) const { return mpStyleDict; }
91
98
99private:
101
102 virtual void ImplInitHbFont(hb_font_t*) override;
104
105 void SetFontVariationsOnHBFont(hb_font_t*) const;
106
108 CFMutableDictionaryRef mpStyleDict;
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{
137}
138
140{
142 CGMutablePathRef mxClipPath;
143
147
150
151 // Graphics types
152#ifdef MACOSX
153 AquaSalFrame* mpFrame;
155 bool mbWindow;
156#else // IOS
157 // mirror AquaSalVirtualDevice::mbForeignContext for SvpSalGraphics objects related to such
159#endif
164
165 CGLayerHolder maLayer; // Quartz graphics layer
166 CGContextHolder maContextHolder; // Quartz drawing context
167 CGContextHolder maBGContextHolder; // Quartz drawing context for CGLayer
168 CGContextHolder maCSContextHolder; // Quartz drawing context considering the color space
171 int mnXorMode; // 0: off 1: on 2: invert only
172 int mnBitmapDepth; // zero unless bitmap
173
177
178 std::unique_ptr<XorEmulation> mpXorEmulation;
179
181 : mxClipPath(nullptr)
184#ifdef MACOSX
185 , mpFrame(nullptr)
186 , mbWindow(false)
187#else
188 , mbForeignContext(false)
189#endif
190 , mbPrinter(false)
191 , mbVirDev(false)
192 , mnWidth(0)
193 , mnHeight(0)
194 , mnXorMode(0)
195 , mnBitmapDepth(0)
197 , mbNonAntialiasedText( false )
198 {}
199
201 {
202 if (mxClipPath)
203 {
204 CGPathRelease(mxClipPath);
205 mxClipPath = nullptr;
206 }
207 }
208
210 {
212 }
213
215 void setState();
216
217 bool isPenVisible() const
218 {
219 return maLineColor.IsVisible();
220 }
221 bool isBrushVisible() const
222 {
223 return maFillColor.IsVisible();
224 }
225
226 void refreshRect(float lX, float lY, float lWidth, float lHeight)
227 {
228#ifdef MACOSX
229 if (!mbWindow) // view only on Window graphics
230 return;
231
232 if (mpFrame)
233 {
234 // update a little more around the designated rectangle
235 // this helps with antialiased rendering
236 // Rounding down x and width can accumulate a rounding error of up to 2
237 // The decrementing of x, the rounding error and the antialiasing border
238 // require that the width and the height need to be increased by four
239 const tools::Rectangle aVclRect(
240 Point(tools::Long(lX - 1), tools::Long(lY - 1)),
241 Size(tools::Long(lWidth + 4), tools::Long(lHeight + 4)));
242
243 mpFrame->maInvalidRect.Union(aVclRect);
244 }
245#else
246 (void) lX;
247 (void) lY;
248 (void) lWidth;
249 (void) lHeight;
250 return;
251#endif
252 }
253
254 // apply the XOR mask to the target context if active and dirty
256 {
257 if (!mpXorEmulation)
258 return;
259 if (mpXorEmulation->UpdateTarget())
260 {
261 refreshRect(0, 0, mnWidth, mnHeight); // TODO: refresh minimal changerect
262 }
263 }
264
265 // differences between VCL, Quartz and kHiThemeOrientation coordinate systems
266 // make some graphics seem to be vertically-mirrored from a VCL perspective
267 bool isFlipped() const
268 {
269 #ifdef MACOSX
270 return mbWindow;
271 #else
272 return false;
273 #endif
274 }
275};
276
278{
279public:
281 : mrShared( rShared )
282 {}
283 virtual ~AquaGraphicsBackendBase() = 0;
286 {
287 if(mpImpl == nullptr)
288 mpImpl = dynamic_cast<SalGraphicsImpl*>(this);
289 return mpImpl;
290 }
292 virtual bool drawNativeControl(ControlType nType,
293 ControlPart nPart,
294 const tools::Rectangle &rControlRegion,
295 ControlState nState,
296 const ImplControlValue &aValue) = 0;
297 virtual void drawTextLayout(const GenericSalLayout& layout, bool bTextRenderModeForResolutionIndependentLayout) = 0;
298 virtual void Flush() {}
299 virtual void Flush( const tools::Rectangle& ) {}
300protected:
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 bool 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:
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& );
492
494 // InvalidateContext does an UnsetState and sets mrContext to 0
496
498 {
499 return mpBackend.get();
500 }
501
502 virtual SalGraphicsImpl* GetImpl() const override;
503
504#ifdef MACOSX
505
506protected:
507
508 // native widget rendering methods that require mirroring
509
510 virtual bool isNativeControlSupported( ControlType nType, ControlPart nPart ) override;
511
512 virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
513 const Point& aPos, bool& rIsInside ) override;
514 virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion,
515 ControlState nState, const ImplControlValue& aValue,
516 const OUString& aCaption, const Color& rBackgroundColor ) override;
517 virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState,
518 const ImplControlValue& aValue, const OUString& aCaption,
519 tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) override;
520#endif
521
522public:
523 // get device resolution
524 virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
525 // set the text color to a specific color
526 virtual void SetTextColor( Color nColor ) override;
527 // set the font
528 virtual void SetFont( LogicalFontInstance*, int nFallbackLevel ) override;
529 // get the current font's metrics
530 virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) override;
531 // get the repertoire of the current font
532 virtual FontCharMapRef GetFontCharMap() const override;
533 virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const override;
534 // graphics must fill supplied font list
536 // graphics must drop any cached font info
537 virtual void ClearDevFontCache() override;
538 virtual bool AddTempDevFont( vcl::font::PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) override;
539
540 // GetEmbedFontData: gets the font data for a font marked
541 // embeddable by GetDevFontList or NULL in case of error
542 // parameters: pFont: describes the font in question
543 // pDataLen: out parameter, contains the byte length of the returned buffer
544 virtual const void* GetEmbedFontData(const vcl::font::PhysicalFontFace*, tools::Long* pDataLen)
545 override;
546 // frees the font data again
547 virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
548
549 virtual std::unique_ptr<GenericSalLayout>
550 GetTextLayout(int nFallbackLevel) override;
551 virtual void DrawTextLayout( const GenericSalLayout& ) override;
552
553 virtual SystemGraphicsData
554 GetGraphicsData() const override;
555
556private:
557 static bool GetRawFontData( const vcl::font::PhysicalFontFace* pFontData,
558 std::vector<unsigned char>& rBuffer,
559 bool* pJustCFF );
560};
561
562/* 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 * 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 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 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
bool setClipRegion(vcl::Region const &rRegion) 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
virtual void FreeEmbedFontData(const void *pData, tools::Long nDataLen) override
void RefreshRect(const CGRect &)
virtual SystemGraphicsData GetGraphicsData() const override
virtual std::unique_ptr< GenericSalLayout > GetTextLayout(int nFallbackLevel) override
rtl::Reference< CoreTextStyle > mpTextStyle[MAX_FALLBACK]
virtual const void * GetEmbedFontData(const vcl::font::PhysicalFontFace *, tools::Long *pDataLen) override
AquaGraphicsBackendBase * getAquaGraphicsBackend() const
virtual void GetDevFontList(vcl::font::PhysicalFontCollection *) override
static bool GetRawFontData(const vcl::font::PhysicalFontFace *pFontData, std::vector< unsigned char > &rBuffer, bool *pJustCFF)
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
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 &)
const sal_IntPtr mnFontId
Definition: quartz/salgdi.h:77
int GetFontTable(const char pTagName[5], unsigned char *) const
sal_IntPtr GetFontId() const override
int GetFontTable(uint32_t nTagCode, unsigned char *) const
CoreTextFontFace(const FontAttributes &, sal_IntPtr nFontID)
rtl::Reference< LogicalFontInstance > CreateFontInstance(const vcl::font::FontSelectPattern &) const override
virtual hb_blob_t * GetHbTable(hb_tag_t nTag) const override
virtual ~CoreTextFontFace() override
float mfFontRotation
text rotation in radian
Definition: quartz/salgdi.h:95
bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon &, bool) const override
bool mbFauxBold
faux bold - true, if font doesn't have proper bold variants
Definition: quartz/salgdi.h:97
float mfFontStretch
<1.0: font is squeezed, >1.0 font is stretched, else 1.0
Definition: quartz/salgdi.h:93
void SetFontVariationsOnHBFont(hb_font_t *) const
void GetFontMetric(ImplFontMetricDataRef const &)
~CoreTextStyle() override
CFMutableDictionaryRef GetStyleDict(void) const
Definition: quartz/salgdi.h:90
CFMutableDictionaryRef mpStyleDict
CoreText text style object.
bool ImplGetGlyphBoundRect(sal_GlyphId, tools::Rectangle &, bool) const override
CoreTextStyle(const vcl::font::PhysicalFontFace &, const vcl::font::FontSelectPattern &)
virtual void ImplInitHbFont(hb_font_t *) override
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()
long Long
PolyFlags
SalROPColor
Definition: salgtype.hxx:70
SalInvert
Definition: salgtype.hxx:74
#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