33 #include <config_cairo_canvas.h>
41 class FontSelectPattern;
42 class PhysicalFontFace;
43 class PhysicalFontCollection;
60 class AbstractTrueTypeFont;
61 class FileDefinitionWidgetDraw;
91 GetImpl()->setAntiAlias(bNew);
101 m_bTextRenderModeForResolutionIndependentLayout = bNew;
106 return m_bTextRenderModeForResolutionIndependentLayout;
112 virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0;
115 virtual sal_uInt16 GetBitCount()
const = 0;
121 virtual void ResetClipRegion() = 0;
131 virtual void SetFillColor() = 0;
135 virtual void SetFillColor(
Color nColor ) = 0;
138 virtual void SetXORMode(
bool bSet,
bool bInvertOnly ) = 0;
141 virtual void SetROPLineColor(
SalROPColor nROPColor ) = 0;
144 virtual void SetROPFillColor(
SalROPColor nROPColor ) = 0;
147 virtual void SetTextColor(
Color nColor ) = 0;
168 virtual void ClearDevFontCache() = 0;
170 virtual bool AddTempDevFont(
172 const OUString& rFileURL,
173 const OUString& rFontName ) = 0;
187 virtual bool CreateFontSubset(
188 const OUString& rToFile,
203 virtual void FreeEmbedFontData(
const void* pData,
tools::Long nDataLen ) = 0;
209 virtual void GetGlyphWidths(
212 std::vector< sal_Int32 >& rWidths,
215 virtual std::unique_ptr<GenericSalLayout>
216 GetTextLayout(
int nFallbackLevel) = 0;
229 bool mirror( sal_uInt32 nPoints,
const Point *pPtAry, Point *pPtAry2,
const OutputDevice& rOutDev )
const;
248 void DrawPolyLine( sal_uInt32 nPoints, Point
const * pPtAry,
const OutputDevice& rOutDev );
252 void DrawPolyPolygon(
254 const sal_uInt32* pPoints,
255 const Point** pPtAry,
258 bool DrawPolyPolygon(
261 double i_fTransparency,
267 double i_fTransparency,
269 const std::vector< double >* i_pStroke,
271 css::drawing::LineCap i_eLineCap,
272 double i_fMiterMinimumAngle,
273 bool bPixelSnapHairline,
276 bool DrawPolyLineBezier(
282 bool DrawPolygonBezier(
288 bool DrawPolyPolygonBezier(
290 const sal_uInt32* pPoints,
291 const Point*
const* pPtAry,
339 std::shared_ptr<SalBitmap> GetBitmap(
378 bool HitTestNativeScrollbar(
388 bool DrawNativeControl(
394 const OUString& aCaption,
396 const Color& rBackgroundColor = COL_AUTO );
401 bool GetNativeControlRegion(
421 bool BlendAlphaBitmap(
428 bool DrawAlphaBitmap(
434 bool DrawTransformedBitmap(
443 bool HasFastDrawTransformedBitmap()
const;
451 virtual OUString getRenderBackendName()
const;
455 #if ENABLE_CAIRO_CANVAS
458 virtual bool SupportsCairo()
const = 0;
467 #endif // ENABLE_CAIRO_CANVAS
473 virtual bool setClipRegion(
const vcl::Region& ) = 0;
483 virtual void drawPolyLine( sal_uInt32 nPoints,
const Point* pPtAry ) = 0;
485 virtual void drawPolygon( sal_uInt32 nPoints,
const Point* pPtAry ) = 0;
487 virtual void drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const Point** pPtAry ) = 0;
492 double fTransparency) = 0;
497 double fTransparency,
499 const std::vector< double >* pStroke,
501 css::drawing::LineCap,
502 double fMiterMinimumAngle,
503 bool bPixelSnapHairline) = 0;
505 virtual bool drawPolyLineBezier(
510 virtual bool drawPolygonBezier(
515 virtual bool drawPolyPolygonBezier(
517 const sal_uInt32* pPoints,
518 const Point*
const* pPtAry,
521 virtual bool drawGradient(
532 virtual void copyArea(
536 bool bWindowInvalidate ) = 0;
549 virtual void drawMask(
552 Color nMaskColor ) = 0;
564 virtual void invert( sal_uInt32 nPoints,
const Point* pPtAry,
SalInvert nFlags ) = 0;
566 virtual bool drawEPS(
570 sal_uInt32 nSize ) = 0;
573 virtual bool blendBitmap(
578 virtual bool blendAlphaBitmap(
596 virtual bool drawAlphaBitmap(
605 virtual bool drawTransformedBitmap(
620 virtual bool hasFastDrawTransformedBitmap()
const = 0;
632 virtual bool drawAlphaRect(
656 bool m_bAntiAlias : 1;
657 bool m_bTextRenderModeForResolutionIndependentLayout : 1;
672 bool initWidgetDrawBackends(
bool bForce =
false);
679 std::vector<sal_Int32>& rWidths,
Ucs2UIntMap& rUnicodeEnc);
682 const bool bVertical,
const sal_GlyphId* pGlyphIds,
683 const sal_uInt8* pEncoding, sal_Int32* pGlyphWidths,
686 static bool CreateCFFfontSubset(
const unsigned char* pFontBytes,
int nByteLength,
687 const OString& rSysPath,
const sal_GlyphId* pGlyphIds,
688 const sal_uInt8* pEncoding, sal_Int32* pGlyphWidths,
791 void drawPolygon( sal_uInt32 nPoints,
const Point* pPtAry )
override
796 void drawPolyPolygon(sal_uInt32 nPoly,
const sal_uInt32* pPoints,
const Point** pPtAry)
override
804 double fTransparency)
override
812 double fTransparency,
814 const std::vector< double >* pStroke,
816 css::drawing::LineCap eLineCap,
817 double fMiterMinimumAngle,
818 bool bPixelSnapHairline)
override
820 return GetImpl()->
drawPolyLine(rObjectToDevice, rPolygon, fTransparency, fLineWidth, pStroke, eJoin, eLineCap, fMiterMinimumAngle, bPixelSnapHairline);
834 const sal_uInt32* pPoints,
835 const Point*
const* pPtAry,
836 const PolyFlags*
const* pFlgAry)
override
853 tools::Long nHeight,
void* pPtr, sal_uInt32 nSize)
override
865 bool bWindowInvalidate)
override
867 GetImpl()->
copyArea(nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, bWindowInvalidate);
916 const SalBitmap* pAlphaBitmap,
double fAlpha)
override
tools::Long m_nLastMirrorTranslation
std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry)=0
virtual void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry)=0
bool drawGradient(const tools::PolyPolygon &rPolygon, const Gradient &rGradient) override
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap)=0
virtual bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap)=0
virtual void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics)=0
virtual void SetXORMode(bool bSet, bool bInvertOnly)=0
void setTextRenderModeForResolutionIndependentLayout(bool bNew)
void drawRect(tools::Long nX, tools::Long nY, tools::Long nDX, tools::Long nDY) override
virtual void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate)=0
void drawPolygon(VirtualDevice *dev, bool drawFrame, tools::Polygon const &orig, Size const &pSize)
draws a polygon knowing penSize
bool getTextRenderModeForResolutionIndependentLayoutEnabled() const
virtual bool supportsOperation(OutDevSupportType eType) const =0
void ResetClipRegion() override
void SetLineColor(Color nColor) override
bool hasFastDrawTransformedBitmap() const override
Returns true if the drawTransformedBitmap() call is fast, and so it should be used directly without t...
virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)=0
void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override
virtual bool implDrawGradient(basegfx::B2DPolyPolygon const &, SalGradient const &)
virtual bool drawGradient(const tools::PolyPolygon &rPolygon, const Gradient &rGradient)=0
void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry) override
bool blendBitmap(const SalTwoRect &rPosAry, const SalBitmap &rBitmap) override
Blend the bitmap with the current buffer.
virtual bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap)=0
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const SalBitmap &rMaskBitmap) override
basegfx::B2DHomMatrix m_aLastMirror
bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry) override
void SetLineColor() override
tools::Long GetGraphicsWidth() const override
void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override
std::shared_ptr< Surface > SurfaceSharedPtr
void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
virtual void SetLineColor()=0
virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2)=0
void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry) override
virtual bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient)=0
bool supportsOperation(OutDevSupportType eType) const override
virtual tools::Long GetGraphicsWidth() const =0
virtual bool hasFastDrawTransformedBitmap() const =0
bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry) override
void drawLine(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize)
draws a line from orig to dest knowing penSize
bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency) override
Render solid rectangle with given transparency.
void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
void invert(sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags) override
void drawPixel(tools::Long nX, tools::Long nY) override
bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient) override
A PhysicalFontFaceCollection is created by a PhysicalFontCollection and becomes invalid when original...
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
MirrorMode m_eLastMirrorMode
bool setClipRegion(const vcl::Region &i_rClip) override
std::unique_ptr< vcl::WidgetDrawInterface > m_pWidgetDraw
virtual bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency)=0
void SetFillColor() override
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
virtual OUString getRenderBackendName() const =0
virtual bool setClipRegion(const vcl::Region &)=0
virtual SalGraphicsImpl * GetImpl() const =0
bool blendAlphaBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSourceBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap) override
Draw the bitmap by blending using the mask and alpha channel.
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry)=0
void SetFillColor(Color nColor) override
abstract base class for physical font faces
vcl::WidgetDrawInterface * forWidget()
#define VCL_PLUGIN_PUBLIC
virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags)=0
void setAntiAlias(bool bNew)
bool UpdateSettings(AllSettings &)
virtual bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap)=0
void SetROPLineColor(SalROPColor aColor) override
void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
void SetXORMode(bool bSet, bool bInvertOnly) override
SalLayoutFlags GetLayout() const
OUString getRenderBackendName() const override
bool drawPolyLine(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolygon &rPolygon, double fTransparency, double fLineWidth, const std::vector< double > *pStroke, basegfx::B2DLineJoin eJoin, css::drawing::LineCap eLineCap, double fMiterMinimumAngle, bool bPixelSnapHairline) override
virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize)=0
void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry) override
bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
void SetROPFillColor(SalROPColor aColor) override
sal_uInt16 GetBitCount() const override
virtual void ResetClipRegion()=0
virtual void SetFillColor()=0
virtual void SetROPFillColor(SalROPColor nROPColor)=0
virtual void drawPixel(tools::Long nX, tools::Long nY)=0
void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha) override
draw transformed bitmap (maybe with alpha) where Null, X, Y define the coordinate system ...
bool drawPolyPolygon(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &rPolyPolygon, double fTransparency) override
void SetLayout(SalLayoutFlags aLayout)
virtual Color getPixel(tools::Long nX, tools::Long nY)=0
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
virtual std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)=0
virtual void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor)=0
bool getAntiAlias() const
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry)=0
virtual void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry)=0
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
virtual void SetROPLineColor(SalROPColor nROPColor)=0
virtual sal_uInt16 GetBitCount() const =0
virtual bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha)=0
Implementation class for SalGraphics.
bool IsNativeControlSupported(ControlType, ControlPart)
virtual void handleDamage(const tools::Rectangle &rDamagedRegion)
Handle damage done by drawing with a widget draw override.
Return value of GetTTGlobalFontInfo()
Color getPixel(tools::Long nX, tools::Long nY) override
virtual bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry)=0
bool drawAlphaBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
Render bitmap with alpha channel.