29#include <rtl/math.hxx>
65 const ::OutputDevice& rDev( pCanvasImpl->
getBackBuffer()->getOutDev() );
66 const ::Point aEmptyPoint;
67 return rDev.GetBitmapEx( aEmptyPoint,
68 rDev.GetOutputSizePixel() );
72 uno::Reference< rendering::XIntegerReadOnlyBitmap > xIntBmp(
73 xBitmap, uno::UNO_QUERY_THROW );
81 "bitmapExFromXBitmap(): could not extract bitmap" );
89 const rendering::ViewState& rViewState,
90 const rendering::RenderState& rRenderState,
101 double nRotate, nShearX;
103 aMatrix.
decompose( aScale, aTranslate, nRotate, nShearX );
106 if( !::rtl::math::approxEqual(aScale.
getX(), aScale.
getY()) )
111 const sal_Int32 nScaledFontWidth( ::basegfx::fround(nFontWidth * aScale.
getX()) );
113 if( !nScaledFontWidth )
123 if( !::rtl::math::approxEqual(aScale.
getY(), 1.0) )
129 io_rVCLFont.
SetOrientation(
Degree10( ::basegfx::fround(-basegfx::rad2deg<10>(fmod(nRotate, 2*M_PI))) ) );
132 o_rPoint.setX( ::basegfx::fround(aTranslate.
getX()) );
133 o_rPoint.setY( ::basegfx::fround(aTranslate.
getY()) );
141 if( rPolyPoly.Count() != 1 )
144 const ::tools::Polygon& rPoly( rPolyPoly[0] );
146 sal_uInt16
nCount( rPoly.GetSize() );
159 const rendering::ViewState& rViewState,
160 const rendering::RenderState& rRenderState )
173 const rendering::ViewState& rViewState,
174 const rendering::RenderState& rRenderState )
185 return ::tools::PolyPolygon( aTemp );
189 const ::basegfx::B2DHomMatrix& rTransform )
191 SAL_INFO(
"canvas.vcl",
"::vclcanvas::tools::transformBitmap()" );
192 SAL_INFO(
"canvas.vcl",
"::vclcanvas::tools::transformBitmap: 0x" << std::hex << &rBitmap );
202 const ::basegfx::B2DRectangle aSrcRect( 0, 0,
const Size & GetSizePixel() const
void SetAntialiasing(AntialiasingFlags nMode)
FontMetric GetFontMetric() const
AntialiasingFlags GetAntialiasing() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
bool decompose(B2DTuple &rScale, B2DTuple &rTranslate, double &rRotate, double &rShearX) const
void transform(const basegfx::B2DHomMatrix &rMatrix)
tools::Long GetFontHeight() const
void SetOrientation(Degree10 nLineOrientation)
void SetAverageFontWidth(tools::Long nWidth)
void SetFontHeight(tools::Long nHeight)
tools::Long GetAverageFontWidth() const
BitmapEx getBitmap() const
Not threadsafe! Returned object is shared!
Product of this component's factory.
BackBufferSharedPtr const & getBackBuffer() const
Get window for this canvas.
#define ENSURE_OR_THROW(c, m)
#define SAL_INFO(area, stream)
VCL_DLLPUBLIC bool isVCLSkiaEnabled()
BitmapEx CanvasTransformBitmap(const BitmapEx &rBitmap, const ::basegfx::B2DHomMatrix &rTransform, ::basegfx::B2DRectangle const &rDestRect, ::basegfx::B2DHomMatrix const &rLocalTransform)