20#ifndef INCLUDED_CANVAS_CANVASTOOLS_HXX
21#define INCLUDED_CANVAS_CANVASTOOLS_HXX
23#include <com/sun/star/uno/Reference.hxx>
24#include <com/sun/star/uno/Sequence.hxx>
25#include <com/sun/star/uno/RuntimeException.hpp>
26#include <osl/diagnose.h>
27#include <rtl/ustring.hxx>
50 struct AffineMatrix2D;
58 struct IntegerBitmapLayout;
61 class XIntegerBitmapColorSpace;
110 return static_cast< sal_Int32
>( floor( rVal ) );
115 inline sal_Int32
roundUp(
const double& rVal )
117 return static_cast< sal_Int32
>( ceil( rVal ) );
134 CANVASTOOLS_DLLPUBLIC ::basegfx::B2DHomMatrix&
136 const css::rendering::ViewState& viewState );
140 const ::basegfx::B2DHomMatrix& transform );
142 CANVASTOOLS_DLLPUBLIC ::basegfx::B2DHomMatrix&
144 const css::rendering::RenderState& renderState );
148 const ::basegfx::B2DHomMatrix& transform );
152 const ::basegfx::B2DHomMatrix& transform );
156 const ::basegfx::B2DHomMatrix& transform );
158 CANVASTOOLS_DLLPUBLIC ::basegfx::B2DHomMatrix&
160 const css::rendering::ViewState& viewState,
161 const css::rendering::RenderState& renderState );
195 const ::basegfx::B2DRange& i_Rect,
196 const ::basegfx::B2DHomMatrix& i_Transformation );
226 const ::basegfx::B2DRange& i_srcRect,
227 const ::basegfx::B2DHomMatrix& i_transformation );
250 const ::basegfx::B2DRange& rTransformRect,
251 const ::basegfx::B2DHomMatrix& rTransformation );
278 ::std::vector< ::basegfx::B2IRange >& o_ClippedAreas,
279 const ::basegfx::B2IRange& rBounds );
325 const css::uno::Reference< css::rendering::XCanvas >& i_rxCanvas,
326 css::uno::Sequence< css::uno::Any >& o_rxParams );
349 const css::geometry::IntegerSize2D& rBitmapSize );
364 template<
typename Target,
typename Source >
inline Target
numeric_cast( Source arg )
367 typedef ::std::numeric_limits< Source > SourceLimits;
368 typedef ::std::numeric_limits< Target > TargetLimits;
373 if( ( arg<0 && !TargetLimits::is_signed) ||
374 ( SourceLimits::is_signed && arg<TargetLimits::min()) ||
377# if OSL_DEBUG_LEVEL > 2
378 SAL_WARN(
"canvas",
"numeric_cast detected data loss");
380 throw css::uno::RuntimeException(
381 "numeric_cast detected data loss",
385 return static_cast<Target
>(arg);
389 const css::awt::Rectangle& rRect,
390 const css::uno::Reference< css::awt::XWindow2 >& xWin );
404 const css::rendering::ViewState& viewState,
405 const css::rendering::RenderState& renderState,
406 const css::rendering::Texture& texture,
448 ::std::size_t nEntries,
449 bool bCaseSensitive ) :
461 SAL_WARN(
"canvas",
"ValueMap::ValueMap(): Key is not lowercase " << pMap->
maKey);
472 SAL_WARN(
"canvas",
"ValueMap::ValueMap(): Map is not sorted, keys are wrong, "
473 << pMap[0].
maKey <<
" and " << pMap[1].
maKey);
474 OSL_FAIL(
"ValueMap::ValueMap(): Map is not sorted" );
477 const OString aStr2( pMap[1].
maKey );
479 aStr2 != aStr2.toAsciiLowerCase() )
481 SAL_WARN(
"canvas",
"ValueMap::ValueMap(): Key is not lowercase" << pMap[1].
maKey);
507 RTL_TEXTENCODING_ASCII_US ) );
523 if( strcmp( pRes->
maKey, aSearchKey.
maKey ) == 0 )
539 return strcmp( rLHS.
maKey,
549 const css::rendering::RenderState& renderState,
554 sal_uInt32& rEmphasisMark);
#define SAL_WARN(area, stream)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)