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