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()) );
144 if (!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11))
151 const double fDividend(rFontMatrix.m10 + rFontMatrix.m11);
152 double fStretch = rFontMatrix.m00 + rFontMatrix.m01;
154 if (!::basegfx::fTools::equalZero(fDividend))
155 fStretch /= fDividend;
157 const ::tools::Long nNewWidth = ::basegfx::fround(aSize.
Width() * fStretch);
168 if( rPolyPoly.Count() != 1 )
171 const ::tools::Polygon& rPoly( rPolyPoly[0] );
173 sal_uInt16
nCount( rPoly.GetSize() );
186 const rendering::ViewState& rViewState,
187 const rendering::RenderState& rRenderState )
200 const rendering::ViewState& rViewState,
201 const rendering::RenderState& rRenderState )
212 return ::tools::PolyPolygon( aTemp );
216 const ::basegfx::B2DHomMatrix& rTransform )
218 SAL_INFO(
"canvas.vcl",
"::vclcanvas::tools::transformBitmap()" );
219 SAL_INFO(
"canvas.vcl",
"::vclcanvas::tools::transformBitmap: 0x" << std::hex << &rBitmap );
229 const ::basegfx::B2DRectangle aSrcRect( 0, 0,
const Size & GetSizePixel() const
void EnableMapMode(bool bEnable=true)
void SetAntialiasing(AntialiasingFlags nMode)
FontMetric GetFontMetric() const
AntialiasingFlags GetAntialiasing() const
bool IsMapModeEnabled() const
void setX(tools::Long nX)
void setY(tools::Long nY)
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 SetFontSize(const Size &)
void SetOrientation(Degree10 nLineOrientation)
void SetAverageFontWidth(tools::Long nWidth)
void SetFontHeight(tools::Long nHeight)
const Size & GetFontSize() const
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)