LibreOffice Module vcl (master)  1
salgdi.hxx
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_SALGDI_HXX
21 #define INCLUDED_VCL_INC_SALGDI_HXX
22 
23 #include <vcl/outdev.hxx>
24 
25 #include "impfontmetricdata.hxx"
26 #include "salgdiimpl.hxx"
27 #include "sallayout.hxx"
28 #include "SalGradient.hxx"
30 #include "WidgetDrawInterface.hxx"
31 
32 #include <config_cairo_canvas.h>
33 
34 #include <map>
35 #include <vector>
36 
38 class SalBitmap;
39 class FontSelectPattern;
40 class FontAttributes;
41 class PhysicalFontFace;
42 class SalLayout;
43 class ImplLayoutArgs;
44 namespace tools { class Rectangle; }
45 class FontSubsetInfo;
46 class OpenGLContext;
47 class OutputDevice;
48 class FreetypeFont;
49 struct SystemGraphicsData;
50 
51 namespace basegfx {
52  class B2DVector;
53  class B2DPolygon;
54  class B2DPolyPolygon;
55 }
56 
57 namespace vcl
58 {
59 class AbstractTrueTypeFont;
60 class FileDefinitionWidgetDraw;
62 }
63 
64 typedef sal_Unicode sal_Ucs; // TODO: use sal_UCS4 instead of sal_Unicode
65 typedef std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap;
66 
67 // note: if you add any new methods to class SalGraphics using coordinates
68 // make sure they have a corresponding protected pure virtual method
69 // which has to be implemented by the platform dependent part.
70 // Add a method that performs coordinate mirroring if required, (see
71 // existing methods as sample) and then calls the equivalent pure method.
72 
73 // note: all positions are in pixel and relative to
74 // the top/left-position of the virtual output area
75 
77 {
78 public:
79  SalGraphics();
80  ~SalGraphics() COVERITY_NOEXCEPT_FALSE override;
81 
82  virtual SalGraphicsImpl* GetImpl() const = 0;
83 
85  rtl::Reference<OpenGLContext> GetOpenGLContext() const;
86 
87  void setAntiAlias(bool bNew) { m_bAntiAlias = bNew; }
88  bool getAntiAlias() const { return m_bAntiAlias; }
89 
90  // public SalGraphics methods, the interface to the independent vcl part
91 
92  // get device resolution
93  virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0;
94 
95  // get the depth of the device
96  virtual sal_uInt16 GetBitCount() const = 0;
97 
98  // get the width of the device
99  virtual tools::Long GetGraphicsWidth() const = 0;
100 
101  // set the clip region to empty
102  virtual void ResetClipRegion() = 0;
103 
104  // set the line color to transparent (= don't draw lines)
105 
106  virtual void SetLineColor() = 0;
107 
108  // set the line color to a specific color
109  virtual void SetLineColor( Color nColor ) = 0;
110 
111  // set the fill color to transparent (= don't fill)
112  virtual void SetFillColor() = 0;
113 
114  // set the fill color to a specific color, shapes will be
115  // filled accordingly
116  virtual void SetFillColor( Color nColor ) = 0;
117 
118  // enable/disable XOR drawing
119  virtual void SetXORMode( bool bSet, bool bInvertOnly ) = 0;
120 
121  // set line color for raster operations
122  virtual void SetROPLineColor( SalROPColor nROPColor ) = 0;
123 
124  // set fill color for raster operations
125  virtual void SetROPFillColor( SalROPColor nROPColor ) = 0;
126 
127  // set the text color to a specific color
128  virtual void SetTextColor( Color nColor ) = 0;
129 
130  // set the font
131  virtual void SetFont(LogicalFontInstance*, int nFallbackLevel) = 0;
132 
133  // release the fonts
134  void ReleaseFonts() { SetFont( nullptr, 0 ); }
135 
136  // get the current font's metrics
137  virtual void GetFontMetric( ImplFontMetricDataRef&, int nFallbackLevel ) = 0;
138 
139  // get the repertoire of the current font
140  virtual FontCharMapRef GetFontCharMap() const = 0;
141 
142  // get the layout capabilities of the current font
143  virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const = 0;
144 
145  // graphics must fill supplied font list
146  virtual void GetDevFontList( PhysicalFontCollection* ) = 0;
147 
148  // graphics must drop any cached font info
149  virtual void ClearDevFontCache() = 0;
150 
151  virtual bool AddTempDevFont(
153  const OUString& rFileURL,
154  const OUString& rFontName ) = 0;
155 
156  // CreateFontSubset: a method to get a subset of glyhps of a font
157  // inside a new valid font file
158  // returns true if creation of subset was successful
159  // parameters: rToFile: contains an osl file URL to write the subset to
160  // pFont: describes from which font to create a subset
161  // pGlyphIDs: the glyph ids to be extracted
162  // pEncoding: the character code corresponding to each glyph
163  // pWidths: the advance widths of the corresponding glyphs (in PS font units)
164  // nGlyphs: the number of glyphs
165  // rInfo: additional outgoing information
166  // implementation note: encoding 0 with glyph id 0 should be added implicitly
167  // as "undefined character"
168  virtual bool CreateFontSubset(
169  const OUString& rToFile,
170  const PhysicalFontFace* pFont,
171  const sal_GlyphId* pGlyphIDs,
172  const sal_uInt8* pEncoding,
173  sal_Int32* pWidths,
174  int nGlyphs,
175  FontSubsetInfo& rInfo ) = 0;
176 
177  // GetEmbedFontData: gets the font data for a font marked
178  // embeddable by GetDevFontList or NULL in case of error
179  // parameters: pFont: describes the font in question
180  // pDataLen: out parameter, contains the byte length of the returned buffer
181  virtual const void* GetEmbedFontData(const PhysicalFontFace* pFont, tools::Long* pDataLen) = 0;
182 
183  // free the font data again
184  virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) = 0;
185 
186  // get the same widths as in CreateFontSubset
187  // in case of an embeddable font also fill the mapping
188  // between unicode and glyph id
189  // leave widths vector and mapping untouched in case of failure
190  virtual void GetGlyphWidths(
191  const PhysicalFontFace* pFont,
192  bool bVertical,
193  std::vector< sal_Int32 >& rWidths,
194  Ucs2UIntMap& rUnicodeEnc ) = 0;
195 
196  virtual std::unique_ptr<GenericSalLayout>
197  GetTextLayout(int nFallbackLevel) = 0;
198  virtual void DrawTextLayout( const GenericSalLayout& ) = 0;
199 
200  virtual bool supportsOperation( OutDevSupportType ) const = 0;
201 
202  // mirroring specifics
203  SalLayoutFlags GetLayout() const { return m_nLayout; }
204  void SetLayout( SalLayoutFlags aLayout ) { m_nLayout = aLayout;}
205 
206  void mirror( tools::Long& nX, const OutputDevice& rOutDev ) const;
207  // only called mirror2 to avoid ambiguity
208  [[nodiscard]] tools::Long mirror2( tools::Long nX, const OutputDevice& rOutDev ) const;
209  void mirror( tools::Long& nX, tools::Long nWidth, const OutputDevice *pOutDev, bool bBack = false ) const;
210  bool mirror( sal_uInt32 nPoints, const Point *pPtAry, Point *pPtAry2, const OutputDevice& rOutDev ) const;
211  void mirror( tools::Rectangle& rRect, const OutputDevice&, bool bBack = false ) const;
212  void mirror( vcl::Region& rRgn, const OutputDevice& rOutDev ) const;
213  void mirror( ImplControlValue&, const OutputDevice& ) const;
214  basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice& rOutDev ) const;
215  const basegfx::B2DHomMatrix& getMirror( const OutputDevice *pOutDev ) const;
216 
217  // non virtual methods; these do possible coordinate mirroring and
218  // then delegate to protected virtual methods
219  bool SetClipRegion( const vcl::Region&, const OutputDevice& rOutDev );
220 
221  // draw --> LineColor and FillColor and RasterOp and ClipRegion
222  void DrawPixel( tools::Long nX, tools::Long nY, const OutputDevice& rOutDev );
223  void DrawPixel( tools::Long nX, tools::Long nY, Color nColor, const OutputDevice& rOutDev );
224 
225  void DrawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2, const OutputDevice& rOutDev );
226 
227  void DrawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice& rOutDev );
228 
229  void DrawPolyLine( sal_uInt32 nPoints, Point const * pPtAry, const OutputDevice& rOutDev );
230 
231  void DrawPolygon( sal_uInt32 nPoints, const Point* pPtAry, const OutputDevice& rOutDev );
232 
233  void DrawPolyPolygon(
234  sal_uInt32 nPoly,
235  const sal_uInt32* pPoints,
236  const Point** pPtAry,
237  const OutputDevice& rOutDev );
238 
239  bool DrawPolyPolygon(
240  const basegfx::B2DHomMatrix& rObjectToDevice,
241  const basegfx::B2DPolyPolygon &i_rPolyPolygon,
242  double i_fTransparency,
243  const OutputDevice *i_pOutDev);
244 
245  bool DrawPolyLine(
246  const basegfx::B2DHomMatrix& rObjectToDevice,
247  const basegfx::B2DPolygon& i_rPolygon,
248  double i_fTransparency,
249  double i_fLineWidth,
250  const std::vector< double >* i_pStroke, // MM01
251  basegfx::B2DLineJoin i_eLineJoin,
252  css::drawing::LineCap i_eLineCap,
253  double i_fMiterMinimumAngle,
254  bool bPixelSnapHairline,
255  const OutputDevice* i_pOutDev);
256 
257  bool DrawPolyLineBezier(
258  sal_uInt32 nPoints,
259  const Point* pPtAry,
260  const PolyFlags* pFlgAry,
261  const OutputDevice& rOutDev );
262 
263  bool DrawPolygonBezier(
264  sal_uInt32 nPoints,
265  const Point* pPtAry,
266  const PolyFlags* pFlgAry,
267  const OutputDevice& rOutDev );
268 
269  bool DrawPolyPolygonBezier(
270  sal_uInt32 nPoly,
271  const sal_uInt32* pPoints,
272  const Point* const* pPtAry,
273  const PolyFlags* const* pFlgAry,
274  const OutputDevice& rOutDev );
275 
276  bool DrawGradient(
277  const tools::PolyPolygon& rPolyPoly,
278  const Gradient& rGradient );
279 
280  bool DrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon,
281  SalGradient const & rGradient);
282 
283  // CopyArea --> No RasterOp, but ClipRegion
284  void CopyArea(
285  tools::Long nDestX, tools::Long nDestY,
286  tools::Long nSrcX, tools::Long nSrcY,
287  tools::Long nSrcWidth, tools::Long nSrcHeight,
288  const OutputDevice& rOutDev );
289 
290  // CopyBits --> RasterOp and ClipRegion
291  // CopyBits() CopyBits on same Graphics
292  void CopyBits(
293  const SalTwoRect& rPosAry,
294  const OutputDevice& rOutDev);
295 
296  // CopyBits --> RasterOp and ClipRegion
297  // CopyBits() CopyBits on different Graphics
298  void CopyBits(
299  const SalTwoRect& rPosAry,
300  SalGraphics& rSrcGraphics,
301  const OutputDevice& rOutDev,
302  const OutputDevice& rSrcOutDev );
303 
304 
305  void DrawBitmap(
306  const SalTwoRect& rPosAry,
307  const SalBitmap& rSalBitmap,
308  const OutputDevice* pOutDev );
309 
310  void DrawBitmap(
311  const SalTwoRect& rPosAry,
312  const SalBitmap& rSalBitmap,
313  const SalBitmap& rTransparentBitmap,
314  const OutputDevice* pOutDev );
315 
316  void DrawMask(
317  const SalTwoRect& rPosAry,
318  const SalBitmap& rSalBitmap,
319  Color nMaskColor,
320  const OutputDevice& rOutDev );
321 
322  std::shared_ptr<SalBitmap> GetBitmap(
323  tools::Long nX, tools::Long nY,
324  tools::Long nWidth, tools::Long nHeight,
325  const OutputDevice& rOutDev );
326 
327  Color GetPixel(
328  tools::Long nX, tools::Long nY,
329  const OutputDevice& rOutDev );
330 
331  // invert --> ClipRegion (only Windows)
332  void Invert(
333  tools::Long nX, tools::Long nY,
334  tools::Long nWidth, tools::Long nHeight,
335  SalInvert nFlags,
336  const OutputDevice& rOutDev );
337 
338  void Invert(
339  sal_uInt32 nPoints,
340  const Point* pPtAry,
341  SalInvert nFlags,
342  const OutputDevice& rOutDev );
343 
344  bool DrawEPS(
345  tools::Long nX, tools::Long nY,
346  tools::Long nWidth, tools::Long nHeight,
347  void* pPtr,
348  sal_uInt32 nSize,
349  const OutputDevice& rOutDev );
350 
351  // native widget rendering functions
352 
356  inline bool IsNativeControlSupported(ControlType, ControlPart);
357 
361  bool HitTestNativeScrollbar(
362  ControlPart nPart,
363  const tools::Rectangle& rControlRegion,
364  const Point& aPos,
365  bool& rIsInside,
366  const OutputDevice& rOutDev);
367 
371  bool DrawNativeControl(
372  ControlType nType,
373  ControlPart nPart,
374  const tools::Rectangle& rControlRegion,
375  ControlState nState,
376  const ImplControlValue& aValue,
377  const OUString& aCaption,
378  const OutputDevice& rOutDev,
379  const Color& rBackgroundColor = COL_AUTO );
380 
384  bool GetNativeControlRegion(
385  ControlType nType,
386  ControlPart nPart,
387  const tools::Rectangle& rControlRegion,
388  ControlState nState,
389  const ImplControlValue& aValue,
390  tools::Rectangle &rNativeBoundingRegion,
391  tools::Rectangle &rNativeContentRegion,
392  const OutputDevice& rOutDev );
393 
397  inline bool UpdateSettings(AllSettings&);
398 
399  bool BlendBitmap(
400  const SalTwoRect& rPosAry,
401  const SalBitmap& rSalBitmap,
402  const OutputDevice& rOutDev );
403 
404  bool BlendAlphaBitmap(
405  const SalTwoRect& rPosAry,
406  const SalBitmap& rSalSrcBitmap,
407  const SalBitmap& rSalMaskBitmap,
408  const SalBitmap& rSalAlphaBitmap,
409  const OutputDevice& rOutDev );
410 
411  bool DrawAlphaBitmap(
412  const SalTwoRect&,
413  const SalBitmap& rSourceBitmap,
414  const SalBitmap& rAlphaBitmap,
415  const OutputDevice& rOutDev );
416 
417  bool DrawTransformedBitmap(
418  const basegfx::B2DPoint& rNull,
419  const basegfx::B2DPoint& rX,
420  const basegfx::B2DPoint& rY,
421  const SalBitmap& rSourceBitmap,
422  const SalBitmap* pAlphaBitmap,
423  const OutputDevice& rOutDev );
424 
425  bool DrawAlphaRect(
426  tools::Long nX, tools::Long nY,
427  tools::Long nWidth, tools::Long nHeight,
428  sal_uInt8 nTransparency,
429  const OutputDevice& rOutDev );
430 
431  virtual OUString getRenderBackendName() const;
432 
433  virtual SystemGraphicsData GetGraphicsData() const = 0;
434 
435 #if ENABLE_CAIRO_CANVAS
436 
438  virtual bool SupportsCairo() const = 0;
440  virtual cairo::SurfaceSharedPtr CreateSurface(const cairo::CairoSurfaceSharedPtr& rSurface) const = 0;
442  virtual cairo::SurfaceSharedPtr CreateSurface(const OutputDevice& rRefDevice, int x, int y, int width, int height) const = 0;
444  virtual cairo::SurfaceSharedPtr CreateBitmapSurface(const OutputDevice& rRefDevice, const BitmapSystemData& rData, const Size& rSize) const = 0;
445  virtual css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const = 0;
446 
447 #endif // ENABLE_CAIRO_CANVAS
448 
449 protected:
450 
452 
453  virtual bool setClipRegion( const vcl::Region& ) = 0;
454 
455  // draw --> LineColor and FillColor and RasterOp and ClipRegion
456  virtual void drawPixel( tools::Long nX, tools::Long nY ) = 0;
457  virtual void drawPixel( tools::Long nX, tools::Long nY, Color nColor ) = 0;
458 
459  virtual void drawLine( tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2 ) = 0;
460 
461  virtual void drawRect( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0;
462 
463  virtual void drawPolyLine( sal_uInt32 nPoints, const Point* pPtAry ) = 0;
464 
465  virtual void drawPolygon( sal_uInt32 nPoints, const Point* pPtAry ) = 0;
466 
467  virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point** pPtAry ) = 0;
468 
469  virtual bool drawPolyPolygon(
470  const basegfx::B2DHomMatrix& rObjectToDevice,
472  double fTransparency) = 0;
473 
474  virtual bool drawPolyLine(
475  const basegfx::B2DHomMatrix& rObjectToDevice,
476  const basegfx::B2DPolygon&,
477  double fTransparency,
478  double fLineWidth,
479  const std::vector< double >* pStroke, // MM01
481  css::drawing::LineCap,
482  double fMiterMinimumAngle,
483  bool bPixelSnapHairline) = 0;
484 
485  virtual bool drawPolyLineBezier(
486  sal_uInt32 nPoints,
487  const Point* pPtAry,
488  const PolyFlags* pFlgAry ) = 0;
489 
490  virtual bool drawPolygonBezier(
491  sal_uInt32 nPoints,
492  const Point* pPtAry,
493  const PolyFlags* pFlgAry ) = 0;
494 
495  virtual bool drawPolyPolygonBezier(
496  sal_uInt32 nPoly,
497  const sal_uInt32* pPoints,
498  const Point* const* pPtAry,
499  const PolyFlags* const* pFlgAry ) = 0;
500 
501  virtual bool drawGradient(
502  const tools::PolyPolygon& rPolyPoly,
503  const Gradient& rGradient ) = 0;
504 
505  virtual bool implDrawGradient(basegfx::B2DPolyPolygon const & /*rPolyPolygon*/,
506  SalGradient const & /*rGradient*/)
507  {
508  return false;
509  }
510 
511  // CopyArea --> No RasterOp, but ClipRegion
512  virtual void copyArea(
513  tools::Long nDestX, tools::Long nDestY,
514  tools::Long nSrcX, tools::Long nSrcY,
515  tools::Long nSrcWidth, tools::Long nSrcHeight,
516  bool bWindowInvalidate ) = 0;
517 
518  // CopyBits and DrawBitmap --> RasterOp and ClipRegion
519  // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
520  virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) = 0;
521 
522  virtual void drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) = 0;
523 
524  virtual void drawBitmap(
525  const SalTwoRect& rPosAry,
526  const SalBitmap& rSalBitmap,
527  const SalBitmap& rMaskBitmap ) = 0;
528 
529  virtual void drawMask(
530  const SalTwoRect& rPosAry,
531  const SalBitmap& rSalBitmap,
532  Color nMaskColor ) = 0;
533 
534  virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) = 0;
535 
536  virtual Color getPixel( tools::Long nX, tools::Long nY ) = 0;
537 
538  // invert --> ClipRegion (only Windows or VirDevs)
539  virtual void invert(
540  tools::Long nX, tools::Long nY,
541  tools::Long nWidth, tools::Long nHeight,
542  SalInvert nFlags) = 0;
543 
544  virtual void invert( sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags ) = 0;
545 
546  virtual bool drawEPS(
547  tools::Long nX, tools::Long nY,
548  tools::Long nWidth, tools::Long nHeight,
549  void* pPtr,
550  sal_uInt32 nSize ) = 0;
551 
553  virtual bool blendBitmap(
554  const SalTwoRect&,
555  const SalBitmap& rBitmap ) = 0;
556 
558  virtual bool blendAlphaBitmap(
559  const SalTwoRect&,
560  const SalBitmap& rSrcBitmap,
561  const SalBitmap& rMaskBitmap,
562  const SalBitmap& rAlphaBitmap ) = 0;
563 
576  virtual bool drawAlphaBitmap(
577  const SalTwoRect&,
578  const SalBitmap& rSourceBitmap,
579  const SalBitmap& rAlphaBitmap ) = 0;
580 
582  virtual bool drawTransformedBitmap(
583  const basegfx::B2DPoint& rNull,
584  const basegfx::B2DPoint& rX,
585  const basegfx::B2DPoint& rY,
586  const SalBitmap& rSourceBitmap,
587  const SalBitmap* pAlphaBitmap) = 0;
588 
599  virtual bool drawAlphaRect(
600  tools::Long nX, tools::Long nY,
601  tools::Long nWidth, tools::Long nHeight,
602  sal_uInt8 nTransparency ) = 0;
603 
604 private:
605  SalLayoutFlags m_nLayout; //< 0: mirroring off, 1: mirror x-axis
606 
607  // for buffering the Mirror-Matrix, see ::getMirror
612 
613 protected:
615  bool m_bAntiAlias : 1;
616 
617  inline tools::Long GetDeviceWidth(const OutputDevice* pOutDev) const;
618 
627  virtual inline void handleDamage(const tools::Rectangle& rDamagedRegion);
628 
629  // native controls
630  bool initWidgetDrawBackends(bool bForce = false);
631 
632  std::unique_ptr<vcl::WidgetDrawInterface> m_pWidgetDraw;
633  vcl::WidgetDrawInterface* forWidget() { return m_pWidgetDraw ? m_pWidgetDraw.get() : this; }
634 
635  static void GetGlyphWidths(const vcl::AbstractTrueTypeFont& rTTF,
636  const PhysicalFontFace& rFontFace, bool bVertical,
637  std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc);
638 
639  static bool CreateTTFfontSubset(vcl::AbstractTrueTypeFont& aTTF, const OString& rSysPath,
640  const bool bVertical, const sal_GlyphId* pGlyphIds,
641  const sal_uInt8* pEncoding, sal_Int32* pGlyphWidths,
642  int nGlyphCount);
643 
644  static bool CreateCFFfontSubset(const unsigned char* pFontBytes, int nByteLength,
645  const OString& rSysPath, const sal_GlyphId* pGlyphIds,
646  const sal_uInt8* pEncoding, sal_Int32* pGlyphWidths,
647  int nGlyphCount, FontSubsetInfo& rInfo);
648 
649  static void FillFontSubsetInfo(const vcl::TTGlobalFontInfo& rTTInfo, const OUString& pPSName,
650  FontSubsetInfo& rInfo);
651 };
652 
654 {
655  return forWidget()->isNativeControlSupported(eType, ePart);
656 }
657 
659 {
660  return forWidget()->updateSettings(rSettings);
661 }
662 
664 
665 #endif // INCLUDED_VCL_INC_SALGDI_HXX
666 
667 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SalROPColor
Definition: salgtype.hxx:71
sal_Unicode sal_Ucs
Definition: salgdi.hxx:64
static void drawPolyLine(SalGraphics &rGraphics, const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolygon &i_rPolygon, double i_fTransparency, double i_fLineWidth, const std::vector< double > *i_pStroke, basegfx::B2DLineJoin i_eLineJoin, css::drawing::LineCap i_eLineCap, double i_fMiterMinimumAngle, bool bPixelSnapHairline)
long Long
void drawPolygon(VirtualDevice *dev, bool drawFrame, tools::Polygon const &rect, Size const &pSize)
sal_uInt16 sal_GlyphId
Definition: glyphitem.hxx:26
OutDevSupportType
Definition: vclenum.hxx:198
virtual bool implDrawGradient(basegfx::B2DPolyPolygon const &, SalGradient const &)
Definition: salgdi.hxx:505
sal_uInt16 sal_Unicode
basegfx::B2DHomMatrix m_aLastMirror
Definition: salgdi.hxx:608
static void drawPolyPolygon(SalGraphics &rGraphics, const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &i_rPolyPolygon, double i_fTransparency)
abstract base class for physical font faces
std::shared_ptr< Surface > SurfaceSharedPtr
Definition: cairo.hxx:36
SalLayoutFlags m_nLayout
Definition: salgdi.hxx:605
virtual bool isNativeControlSupported(ControlType eType, ControlPart ePart)
Query the platform layer for native control support.
void drawLine(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize)
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:302
std::unique_ptr< vcl::WidgetDrawInterface > m_pWidgetDraw
Definition: salgdi.hxx:632
SalInvert
Definition: salgtype.hxx:75
tools::Long m_nLastMirrorDeviceLTRButBiDiRtlTranslate
Definition: salgdi.hxx:610
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
Definition: cairo.hxx:34
void ReleaseFonts()
Definition: salgdi.hxx:134
vcl::WidgetDrawInterface * forWidget()
Definition: salgdi.hxx:633
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
#define VCL_PLUGIN_PUBLIC
Definition: dllapi.h:40
void setAntiAlias(bool bNew)
Definition: salgdi.hxx:87
SalLayoutFlags
Definition: outdev.hxx:119
bool UpdateSettings(AllSettings &)
Definition: salgdi.hxx:658
unsigned char sal_uInt8
SalLayoutFlags GetLayout() const
Definition: salgdi.hxx:203
bool m_bLastMirrorDeviceLTRButBiDiRtlSet
Definition: salgdi.hxx:611
tools::Long m_aLastMirrorW
Definition: salgdi.hxx:609
virtual bool updateSettings(AllSettings &rSettings)
void SetLayout(SalLayoutFlags aLayout)
Definition: salgdi.hxx:204
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
static void drawBitmap(SalGraphics &rGraphics, const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap)
bool getAntiAlias() const
Definition: salgdi.hxx:88
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
Definition: salgdi.hxx:65
bool IsNativeControlSupported(ControlType, ControlPart)
Definition: salgdi.hxx:653
virtual void handleDamage(const tools::Rectangle &rDamagedRegion)
Handle damage done by drawing with a widget draw override.
Definition: salgdi.hxx:663
Return value of GetTTGlobalFontInfo()
Definition: sft.hxx:147
PolyFlags