LibreOffice Module canvas (master) 1
Classes | Functions
canvas::tools Namespace Reference

Classes

class  ElapsedTime
 Calculate elapsed time. More...
 
class  ValueMap
 A very simplistic map for ASCII strings and arbitrary value types. More...
 

Functions

geometry::RealSize2D createInfiniteSize2D ()
 Create a RealSize2D with both coordinate values set to +infinity. More...
 
rendering::RenderState & initRenderState (rendering::RenderState &renderState)
 
rendering::ViewStateinitViewState (rendering::ViewState &viewState)
 
::basegfx::B2DHomMatrixgetViewStateTransform (::basegfx::B2DHomMatrix &transform, const rendering::ViewState &viewState)
 
rendering::ViewStatesetViewStateTransform (rendering::ViewState &viewState, const ::basegfx::B2DHomMatrix &transform)
 
::basegfx::B2DHomMatrixgetRenderStateTransform (::basegfx::B2DHomMatrix &transform, const rendering::RenderState &renderState)
 
rendering::RenderState & setRenderStateTransform (rendering::RenderState &renderState, const ::basegfx::B2DHomMatrix &transform)
 
rendering::RenderState & appendToRenderState (rendering::RenderState &renderState, const ::basegfx::B2DHomMatrix &rTransform)
 
rendering::RenderState & prependToRenderState (rendering::RenderState &renderState, const ::basegfx::B2DHomMatrix &rTransform)
 
::basegfx::B2DHomMatrixmergeViewAndRenderTransform (::basegfx::B2DHomMatrix &combinedTransform, const rendering::ViewState &viewState, const rendering::RenderState &renderState)
 
geometry::AffineMatrix2D & setIdentityAffineMatrix2D (geometry::AffineMatrix2D &matrix)
 
geometry::Matrix2D & setIdentityMatrix2D (geometry::Matrix2D &matrix)
 
uno::Reference< rendering::XIntegerBitmapColorSpace > const & getStdColorSpace ()
 Return a color space for a default RGBA integer format. More...
 
uno::Reference< rendering::XIntegerBitmapColorSpace > const & getStdColorSpaceWithoutAlpha ()
 Return a color space for a default RGB integer format. More...
 
rendering::IntegerBitmapLayout getStdMemoryLayout (const geometry::IntegerSize2D &rBmpSize)
 
uno::Sequence< sal_Int8colorToStdIntSequence (const ::Color &rColor)
 Convert standard 8888 RGBA color to vcl color. More...
 
::basegfx::B2DHomMatrixcalcRectToOriginTransform (::basegfx::B2DHomMatrix &o_transform, const ::basegfx::B2DRange &i_srcRect, const ::basegfx::B2DHomMatrix &i_transformation)
 Calc a transform that maps the upper, left corner of a rectangle to the origin. More...
 
::basegfx::B2DRangecalcTransformedRectBounds (::basegfx::B2DRange &o_Rect, const ::basegfx::B2DRange &i_Rect, const ::basegfx::B2DHomMatrix &i_Transformation)
 Calc the bounding rectangle of a transformed rectangle. More...
 
bool isInside (const ::basegfx::B2DRange &rContainedRect, const ::basegfx::B2DRange &rTransformRect, const ::basegfx::B2DHomMatrix &rTransformation)
 Check whether a given rectangle is within another transformed rectangle. More...
 
bool clipScrollArea (::basegfx::B2IRange &io_rSourceArea, ::basegfx::B2IPoint &io_rDestPoint, std::vector< ::basegfx::B2IRange > &o_ClippedAreas, const ::basegfx::B2IRange &rBounds)
 
::basegfx::B2IRange spritePixelAreaFromB2DRange (const ::basegfx::B2DRange &rRange)
 Clip a blit between two differently surfaces. More...
 
uno::Sequence< uno::Any > & getDeviceInfo (const uno::Reference< rendering::XCanvas > &i_rxCanvas, uno::Sequence< uno::Any > &o_rxParams)
 
awt::Rectangle getAbsoluteWindowRect (const awt::Rectangle &rRect, const uno::Reference< awt::XWindow2 > &xWin)
 
::basegfx::B2DPolyPolygon getBoundMarksPolyPolygon (const ::basegfx::B2DRange &rRange)
 Retrieve for small bound marks around each corner of the given rectangle. More...
 
int calcGradientStepCount (::basegfx::B2DHomMatrix &rTotalTransform, const rendering::ViewState &viewState, const rendering::RenderState &renderState, const rendering::Texture &texture, int nColorSteps)
 
void clipOutDev (const rendering::ViewState &viewState, const rendering::RenderState &renderState, OutputDevice &rOutDev, OutputDevice *p2ndOutDev)
 
void extractExtraFontProperties (const uno::Sequence< beans::PropertyValue > &rExtraFontProperties, sal_uInt32 &rEmphasisMark)
 
void verifyInput (const geometry::RealPoint2D &rPoint, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyInput (const geometry::RealBezierSegment2D &rSegment, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyInput (const geometry::RealRectangle2D &rRect, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyInput (const geometry::AffineMatrix2D &matrix, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyInput (const geometry::Matrix2D &matrix, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyInput (const rendering::ViewState &viewState, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyInput (const rendering::RenderState &renderState, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos, sal_Int32 nMinColorComponents)
 
void verifyInput (const rendering::Texture &texture, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyInput (const rendering::StrokeAttributes &strokeAttributes, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyInput (const rendering::IntegerBitmapLayout &bitmapLayout, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyInput (const rendering::FontRequest &fontRequest, const char *pStr, const uno::Reference< uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 
void verifyIndexRange (const geometry::IntegerRectangle2D &rect, const geometry::IntegerSize2D &size)
 
void verifyIndexRange (const geometry::IntegerPoint2D &pos, const geometry::IntegerSize2D &size)
 
void verifyBitmapSize (const geometry::IntegerSize2D &size, const char *pStr, const uno::Reference< uno::XInterface > &xIf)
 
void verifySpriteSize (const geometry::RealSize2D &size, const char *pStr, const uno::Reference< uno::XInterface > &xIf)
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::geometry::AffineMatrix2D &rMatrix, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Verify that the given transformation contains valid floating point values. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::geometry::Matrix2D &rMatrix, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Verify that the given transformation contains valid floating point values. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::geometry::RealPoint2D &rPoint, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Verify that the given point contains valid floating point values. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::geometry::RealBezierSegment2D &rSegment, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Verify that the given bezier segment contains valid floating point values. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::geometry::RealRectangle2D &rRect, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Verify that the given rectangle contains valid floating point values. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::rendering::ViewState &viewState, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Basic check for view state validity. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::rendering::RenderState &renderState, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos, sal_Int32 nMinColorComponents=0)
 Basic check for render state validity. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::rendering::StrokeAttributes &strokeAttributes, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Basic check for stroke attributes validity. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::rendering::Texture &texture, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Basic check for texture validity. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::rendering::IntegerBitmapLayout &bitmapLayout, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Basic check for bitmap layout validity. More...
 
CANVASTOOLS_DLLPUBLIC void verifyInput (const css::rendering::FontRequest &fontRequest, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Basic check for font request validity. More...
 
template<class Interface >
void verifyInput (const css::uno::Reference< Interface > &rRef, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Templatized check for uno::Reference validity. More...
 
template<typename SequenceContent >
void verifyInput (const css::uno::Sequence< SequenceContent > &rSequence, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf, ::sal_Int16 nArgPos)
 Templatized check for content-of-sequence validity. More...
 
template<typename T >
void verifyInput (const T &, const char *, const css::uno::Reference< css::uno::XInterface > &, ::sal_Int16)
 Catch-all, to handle cases that DON'T need input checking (i.e. the Integer geometry ones) More...
 
template<typename Arg0 >
void verifyArgs (const Arg0 &rArg0, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf)
 
template<typename Arg0 , typename Arg1 >
void verifyArgs (const Arg0 &rArg0, const Arg1 &rArg1, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf)
 
template<typename Arg0 , typename Arg1 , typename Arg2 >
void verifyArgs (const Arg0 &rArg0, const Arg1 &rArg1, const Arg2 &rArg2, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf)
 
template<typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
void verifyArgs (const Arg0 &rArg0, const Arg1 &rArg1, const Arg2 &rArg2, const Arg3 &rArg3, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf)
 
template<typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
void verifyArgs (const Arg0 &rArg0, const Arg1 &rArg1, const Arg2 &rArg2, const Arg3 &rArg3, const Arg4 &rArg4, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf)
 
template<typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
void verifyArgs (const Arg0 &rArg0, const Arg1 &rArg1, const Arg2 &rArg2, const Arg3 &rArg3, const Arg4 &rArg4, const Arg5 &rArg5, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf)
 
template<typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
void verifyArgs (const Arg0 &rArg0, const Arg1 &rArg1, const Arg2 &rArg2, const Arg3 &rArg3, const Arg4 &rArg4, const Arg5 &rArg5, const Arg6 &rArg6, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf)
 
template<typename NumType >
void verifyRange (NumType arg, NumType lowerBound, NumType upperBound)
 Range checker, which throws css::lang::IllegalArgument exception, when range is violated. More...
 
template<typename NumType >
void verifyRange (NumType arg, NumType bound, bool bLowerBound=true)
 Range checker, which throws css::lang::IllegalArgument exception, when range is violated. More...
 
CANVASTOOLS_DLLPUBLIC void verifyIndexRange (const css::geometry::IntegerRectangle2D &rect, const css::geometry::IntegerSize2D &size)
 Range checker, which throws css::lang::IndexOutOfBounds exception, when index range is violated. More...
 
CANVASTOOLS_DLLPUBLIC void verifyIndexRange (const css::geometry::IntegerPoint2D &pos, const css::geometry::IntegerSize2D &size)
 Range checker, which throws css::lang::IndexOutOfBounds exception, when index range is violated. More...
 
CANVASTOOLS_DLLPUBLIC void verifyBitmapSize (const css::geometry::IntegerSize2D &size, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf)
 Range checker, which throws css::lang::IndexOutOfBounds exception, when the size is negative or null. More...
 
CANVASTOOLS_DLLPUBLIC void verifySpriteSize (const css::geometry::RealSize2D &size, const char *pStr, const css::uno::Reference< css::uno::XInterface > &xIf)
 Range checker, which throws css::lang::IndexOutOfBounds exception, when the size is negative or null. More...
 
sal_uInt32 nextPow2 (sal_uInt32 x)
 Compute the next highest power of 2 of a 32-bit value. More...
 
sal_Int32 roundDown (const double &rVal)
 Count the number of 1-bits of a n-bit value. More...
 
sal_Int32 roundUp (const double &rVal)
 Round given floating point value up to next integer. More...
 
CANVASTOOLS_DLLPUBLIC css::rendering::RenderState & initRenderState (css::rendering::RenderState &renderState)
 
CANVASTOOLS_DLLPUBLIC css::rendering::ViewStateinitViewState (css::rendering::ViewState &viewState)
 
CANVASTOOLS_DLLPUBLIC::basegfx::B2DHomMatrix & getViewStateTransform (::basegfx::B2DHomMatrix &transform, const css::rendering::ViewState &viewState)
 
CANVASTOOLS_DLLPUBLIC css::rendering::ViewStatesetViewStateTransform (css::rendering::ViewState &viewState, const ::basegfx::B2DHomMatrix &transform)
 
CANVASTOOLS_DLLPUBLIC::basegfx::B2DHomMatrix & getRenderStateTransform (::basegfx::B2DHomMatrix &transform, const css::rendering::RenderState &renderState)
 
CANVASTOOLS_DLLPUBLIC css::rendering::RenderState & setRenderStateTransform (css::rendering::RenderState &renderState, const ::basegfx::B2DHomMatrix &transform)
 
CANVASTOOLS_DLLPUBLIC css::rendering::RenderState & appendToRenderState (css::rendering::RenderState &renderState, const ::basegfx::B2DHomMatrix &transform)
 
CANVASTOOLS_DLLPUBLIC css::rendering::RenderState & prependToRenderState (css::rendering::RenderState &renderState, const ::basegfx::B2DHomMatrix &transform)
 
CANVASTOOLS_DLLPUBLIC::basegfx::B2DHomMatrix & mergeViewAndRenderTransform (::basegfx::B2DHomMatrix &transform, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
 
CANVASTOOLS_DLLPUBLIC css::geometry::AffineMatrix2D & setIdentityAffineMatrix2D (css::geometry::AffineMatrix2D &matrix)
 
CANVASTOOLS_DLLPUBLIC css::geometry::Matrix2D & setIdentityMatrix2D (css::geometry::Matrix2D &matrix)
 
CANVASTOOLS_DLLPUBLIC bool clipScrollArea (::basegfx::B2IRange &io_rSourceArea, ::basegfx::B2IPoint &io_rDestPoint, ::std::vector< ::basegfx::B2IRange > &o_ClippedAreas, const ::basegfx::B2IRange &rBounds)
 Clip a scroll to the given bound rect. More...
 
CANVASTOOLS_DLLPUBLIC css::uno::Sequence< css::uno::Any > & getDeviceInfo (const css::uno::Reference< css::rendering::XCanvas > &i_rxCanvas, css::uno::Sequence< css::uno::Any > &o_rxParams)
 Retrieve various internal properties of the actual canvas implementation. More...
 
CANVASTOOLS_DLLPUBLIC css::rendering::IntegerBitmapLayout getStdMemoryLayout (const css::geometry::IntegerSize2D &rBitmapSize)
 Return a memory layout for a default RGBA integer format. More...
 
template<typename Target , typename Source >
Target numeric_cast (Source arg)
 Cast numeric value into another (numeric) data type. More...
 
CANVASTOOLS_DLLPUBLIC css::awt::Rectangle getAbsoluteWindowRect (const css::awt::Rectangle &rRect, const css::uno::Reference< css::awt::XWindow2 > &xWin)
 
CANVASTOOLS_DLLPUBLIC int calcGradientStepCount (::basegfx::B2DHomMatrix &rTotalTransform, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::rendering::Texture &texture, int nColorSteps)
 Calculate number of gradient "strips" to generate (takes into account device resolution) More...
 
CANVASTOOLS_DLLPUBLIC void clipOutDev (const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, OutputDevice &rOutDev, OutputDevice *p2ndOutDev=nullptr)
 
CANVASTOOLS_DLLPUBLIC void extractExtraFontProperties (const css::uno::Sequence< css::beans::PropertyValue > &rExtraFontProperties, sal_uInt32 &rEmphasisMark)
 

Function Documentation

◆ appendToRenderState() [1/2]

CANVASTOOLS_DLLPUBLIC css::rendering::RenderState & canvas::tools::appendToRenderState ( css::rendering::RenderState &  renderState,
const ::basegfx::B2DHomMatrix transform 
)

◆ appendToRenderState() [2/2]

rendering::RenderState & canvas::tools::appendToRenderState ( rendering::RenderState &  renderState,
const ::basegfx::B2DHomMatrix rTransform 
)

Definition at line 122 of file canvastools.cxx.

References getRenderStateTransform(), and setRenderStateTransform().

◆ calcGradientStepCount() [1/2]

CANVASTOOLS_DLLPUBLIC int canvas::tools::calcGradientStepCount ( ::basegfx::B2DHomMatrix rTotalTransform,
const css::rendering::ViewState viewState,
const css::rendering::RenderState &  renderState,
const css::rendering::Texture &  texture,
int  nColorSteps 
)

Calculate number of gradient "strips" to generate (takes into account device resolution)

Parameters
nColorStepsMaximal integer difference between all color stops, needed for smooth gradient color differences

◆ calcGradientStepCount() [2/2]

int canvas::tools::calcGradientStepCount ( ::basegfx::B2DHomMatrix rTotalTransform,
const rendering::ViewState viewState,
const rendering::RenderState &  renderState,
const rendering::Texture &  texture,
int  nColorSteps 
)

◆ calcRectToOriginTransform()

CANVASTOOLS_DLLPUBLIC::basegfx::B2DHomMatrix & canvas::tools::calcRectToOriginTransform ( ::basegfx::B2DHomMatrix o_transform,
const ::basegfx::B2DRange i_srcRect,
const ::basegfx::B2DHomMatrix i_transformation 
)

Calc a transform that maps the upper, left corner of a rectangle to the origin.

The method is a specialized version of calcRectToRectTransform() (Removed now), mapping the input rectangle's the upper, left corner to the origin, and leaving the size untouched.

Parameters
o_transformOutput parameter, to receive the resulting transformation matrix.
i_srcRectInput parameter, specifies the original source rectangle. The resulting transformation will exactly map the source rectangle's upper, left corner to the origin.
i_transformationThe original transformation matrix. This is changed with translations (if necessary), to exactly map the source rectangle to the origin.
Returns
a reference to the resulting transformation matrix
See also
calcRectToRectTransform()
calcTransformedRectBounds()

Definition at line 894 of file canvastools.cxx.

References calcTransformedRectBounds(), basegfx::utils::createTranslateB2DHomMatrix(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinX(), and basegfx::Range2D< typename TYPE, typename TRAITS >::getMinY().

Referenced by vclcanvas::tools::transformBitmap().

◆ calcTransformedRectBounds()

CANVASTOOLS_DLLPUBLIC::basegfx::B2DRange & canvas::tools::calcTransformedRectBounds ( ::basegfx::B2DRange o_Rect,
const ::basegfx::B2DRange i_Rect,
const ::basegfx::B2DHomMatrix i_Transformation 
)

Calc the bounding rectangle of a transformed rectangle.

The method applies the given transformation to the specified input rectangle, and returns the bounding box of the resulting output area.

Parameters
o_RectOutput rectangle
i_RectInput rectangle
i_TransformationTransformation to apply to the input rectangle
Returns
a reference to the resulting rectangle

Definition at line 921 of file canvastools.cxx.

References basegfx::Range2D< typename TYPE, typename TRAITS >::expand(), basegfx::Range2D< typename TYPE, typename TRAITS >::reset(), basegfx::Tuple2D< typename TYPE >::setX(), and basegfx::Tuple2D< typename TYPE >::setY().

Referenced by calcRectToOriginTransform(), canvas::CanvasCustomSpriteHelper::getUpdateArea(), vclcanvas::CanvasHelper::implDrawBitmap(), vclcanvas::tools::transformBitmap(), and canvas::CanvasCustomSpriteHelper::updateClipState().

◆ clipOutDev() [1/2]

CANVASTOOLS_DLLPUBLIC void canvas::tools::clipOutDev ( const css::rendering::ViewState viewState,
const css::rendering::RenderState &  renderState,
OutputDevice rOutDev,
OutputDevice p2ndOutDev = nullptr 
)

◆ clipOutDev() [2/2]

void canvas::tools::clipOutDev ( const rendering::ViewState viewState,
const rendering::RenderState &  renderState,
OutputDevice rOutDev,
OutputDevice p2ndOutDev 
)

◆ clipScrollArea() [1/2]

CANVASTOOLS_DLLPUBLIC bool canvas::tools::clipScrollArea ( ::basegfx::B2IRange io_rSourceArea,
::basegfx::B2IPoint io_rDestPoint,
::std::vector< ::basegfx::B2IRange > &  o_ClippedAreas,
const ::basegfx::B2IRange rBounds 
)

Clip a scroll to the given bound rect.

Parameters
io_rSourceAreaSource area to scroll. The resulting clipped source area is returned therein.
io_rDestPointDestination point of the scroll (upper, left corner of rSourceArea after the scroll). The new, resulting destination point is returned therein.q
o_ClippedAreasVector of rectangles in the destination area coordinate system, which are clipped away from the source area, and thus need extra updates (i.e. they are not correctly copy from the scroll operation, since there was no information about them in the source).
rBoundsBounds to clip against.
Returns
false, if the resulting scroll area is empty

◆ clipScrollArea() [2/2]

bool canvas::tools::clipScrollArea ( ::basegfx::B2IRange io_rSourceArea,
::basegfx::B2IPoint io_rDestPoint,
std::vector< ::basegfx::B2IRange > &  o_ClippedAreas,
const ::basegfx::B2IRange rBounds 
)

◆ colorToStdIntSequence()

CANVASTOOLS_DLLPUBLIC css::uno::Sequence< sal_Int8 > canvas::tools::colorToStdIntSequence ( const ::Color rColor)

Convert standard 8888 RGBA color to vcl color.

Definition at line 874 of file canvastools.cxx.

◆ createInfiniteSize2D()

CANVASTOOLS_DLLPUBLIC css::geometry::RealSize2D canvas::tools::createInfiniteSize2D ( )

◆ extractExtraFontProperties() [1/2]

CANVASTOOLS_DLLPUBLIC void canvas::tools::extractExtraFontProperties ( const css::uno::Sequence< css::beans::PropertyValue > &  rExtraFontProperties,
sal_uInt32 &  rEmphasisMark 
)

◆ extractExtraFontProperties() [2/2]

void canvas::tools::extractExtraFontProperties ( const uno::Sequence< beans::PropertyValue > &  rExtraFontProperties,
sal_uInt32 &  rEmphasisMark 
)

Definition at line 1296 of file canvastools.cxx.

◆ getAbsoluteWindowRect() [1/2]

awt::Rectangle canvas::tools::getAbsoluteWindowRect ( const awt::Rectangle &  rRect,
const uno::Reference< awt::XWindow2 > &  xWin 
)

◆ getAbsoluteWindowRect() [2/2]

CANVASTOOLS_DLLPUBLIC css::awt::Rectangle canvas::tools::getAbsoluteWindowRect ( const css::awt::Rectangle &  rRect,
const css::uno::Reference< css::awt::XWindow2 > &  xWin 
)

◆ getBoundMarksPolyPolygon()

CANVASTOOLS_DLLPUBLIC::basegfx::B2DPolyPolygon canvas::tools::getBoundMarksPolyPolygon ( const ::basegfx::B2DRange rRange)

Retrieve for small bound marks around each corner of the given rectangle.

Definition at line 1127 of file canvastools.cxx.

References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolygon::append(), and basegfx::B2DPolygon::clear().

Referenced by vclcanvas::SpriteHelper::redraw().

◆ getDeviceInfo() [1/2]

CANVASTOOLS_DLLPUBLIC css::uno::Sequence< css::uno::Any > & canvas::tools::getDeviceInfo ( const css::uno::Reference< css::rendering::XCanvas > &  i_rxCanvas,
css::uno::Sequence< css::uno::Any > &  o_rxParams 
)

Retrieve various internal properties of the actual canvas implementation.

This method retrieves a bunch of internal, implementation- and platform-dependent values from the canvas implementation. Among them are for example operating system window handles. The actual layout and content of the returned sequence is dependent on the component implementation, undocumented and subject to change.

Parameters
i_rxCanvasInput parameter, the canvas representation for which the device information is to be retrieved
o_rxParamsOutput parameter, the sequence of Anys that hold the device parameters. Layout is as described above
Returns
A reference to the resulting sequence of parameters

◆ getDeviceInfo() [2/2]

uno::Sequence< uno::Any > & canvas::tools::getDeviceInfo ( const uno::Reference< rendering::XCanvas > &  i_rxCanvas,
uno::Sequence< uno::Any > &  o_rxParams 
)

Definition at line 1078 of file canvastools.cxx.

◆ getRenderStateTransform() [1/2]

CANVASTOOLS_DLLPUBLIC::basegfx::B2DHomMatrix & canvas::tools::getRenderStateTransform ( ::basegfx::B2DHomMatrix transform,
const css::rendering::RenderState &  renderState 
)

◆ getRenderStateTransform() [2/2]

::basegfx::B2DHomMatrix & canvas::tools::getRenderStateTransform ( ::basegfx::B2DHomMatrix transform,
const rendering::RenderState &  renderState 
)

Definition at line 108 of file canvastools.cxx.

Referenced by appendToRenderState(), and prependToRenderState().

◆ getStdColorSpace()

CANVASTOOLS_DLLPUBLIC css::uno::Reference< css::rendering::XIntegerBitmapColorSpace > const & canvas::tools::getStdColorSpace ( )

Return a color space for a default RGBA integer format.

Use this method for dead-simple bitmap implementations, that map all their formats to 8888 RGBA color.

Definition at line 847 of file canvastools.cxx.

References SPACE.

Referenced by oglcanvas::SpriteDeviceHelper::getColorSpace(), and getStdMemoryLayout().

◆ getStdColorSpaceWithoutAlpha()

CANVASTOOLS_DLLPUBLIC css::uno::Reference< css::rendering::XIntegerBitmapColorSpace > const & canvas::tools::getStdColorSpaceWithoutAlpha ( )

Return a color space for a default RGB integer format.

Use this method for dead-simple bitmap implementations, that map all their formats to 8888 RGB color (the last byte is unused).

Definition at line 853 of file canvastools.cxx.

References SPACE.

Referenced by vclcanvas::CanvasHelper::getMemoryLayout(), and vclcanvas::CanvasBitmapHelper::getMemoryLayout().

◆ getStdMemoryLayout() [1/2]

CANVASTOOLS_DLLPUBLIC css::rendering::IntegerBitmapLayout canvas::tools::getStdMemoryLayout ( const css::geometry::IntegerSize2D &  rBitmapSize)

Return a memory layout for a default RGBA integer format.

Use this method for dead-simple bitmap implementations, that map all their formats to 8888 RGBA color.

◆ getStdMemoryLayout() [2/2]

rendering::IntegerBitmapLayout canvas::tools::getStdMemoryLayout ( const geometry::IntegerSize2D &  rBmpSize)

◆ getViewStateTransform() [1/2]

CANVASTOOLS_DLLPUBLIC::basegfx::B2DHomMatrix & canvas::tools::getViewStateTransform ( ::basegfx::B2DHomMatrix transform,
const css::rendering::ViewState viewState 
)

◆ getViewStateTransform() [2/2]

::basegfx::B2DHomMatrix & canvas::tools::getViewStateTransform ( ::basegfx::B2DHomMatrix transform,
const rendering::ViewState viewState 
)

Definition at line 94 of file canvastools.cxx.

◆ initRenderState() [1/2]

CANVASTOOLS_DLLPUBLIC css::rendering::RenderState & canvas::tools::initRenderState ( css::rendering::RenderState &  renderState)

◆ initRenderState() [2/2]

rendering::RenderState & canvas::tools::initRenderState ( rendering::RenderState &  renderState)

Definition at line 74 of file canvastools.cxx.

References setIdentityAffineMatrix2D().

◆ initViewState() [1/2]

CANVASTOOLS_DLLPUBLIC css::rendering::ViewState & canvas::tools::initViewState ( css::rendering::ViewState viewState)

◆ initViewState() [2/2]

rendering::ViewState & canvas::tools::initViewState ( rendering::ViewState viewState)

Definition at line 85 of file canvastools.cxx.

References setIdentityAffineMatrix2D().

◆ isInside()

CANVASTOOLS_DLLPUBLIC bool canvas::tools::isInside ( const ::basegfx::B2DRange rContainedRect,
const ::basegfx::B2DRange rTransformRect,
const ::basegfx::B2DHomMatrix rTransformation 
)

Check whether a given rectangle is within another transformed rectangle.

This method checks for polygonal containedness, i.e. the transformed rectangle is not represented as an axis-aligned rectangle anymore (like calcTransformedRectBounds()), but polygonal. Thus, the insideness test is based on tight bounds.

Parameters
rContainedRectThis rectangle is checked, whether it is fully within the transformed rTransformRect.
rTransformRectThis rectangle is transformed, and then checked whether it fully contains rContainedRect.
rTransformationThis transformation is applied to rTransformRect

Definition at line 959 of file canvastools.cxx.

References isInside(), and basegfx::B2DPolygon::transform().

Referenced by canvas::CanvasCustomSpriteHelper::checkDrawBitmap(), and isInside().

◆ mergeViewAndRenderTransform() [1/2]

::basegfx::B2DHomMatrix & canvas::tools::mergeViewAndRenderTransform ( ::basegfx::B2DHomMatrix combinedTransform,
const rendering::ViewState viewState,
const rendering::RenderState &  renderState 
)

◆ mergeViewAndRenderTransform() [2/2]

CANVASTOOLS_DLLPUBLIC::basegfx::B2DHomMatrix & canvas::tools::mergeViewAndRenderTransform ( ::basegfx::B2DHomMatrix transform,
const css::rendering::ViewState viewState,
const css::rendering::RenderState &  renderState 
)

◆ nextPow2()

sal_uInt32 canvas::tools::nextPow2 ( sal_uInt32  x)
inline

Compute the next highest power of 2 of a 32-bit value.

Code devised by Sean Anderson, in good ole HAKMEM tradition.

Returns
1 << (lg(x - 1) + 1)

Definition at line 88 of file canvastools.hxx.

References x.

◆ numeric_cast()

template<typename Target , typename Source >
Target canvas::tools::numeric_cast ( Source  arg)
inline

Cast numeric value into another (numeric) data type.

Apart from converting the numeric value, this template also checks if any overflow, underflow, or sign information is lost (if yes, it throws an uno::RuntimeException.

Definition at line 364 of file canvastools.hxx.

References max, and SAL_WARN.

◆ prependToRenderState() [1/2]

CANVASTOOLS_DLLPUBLIC css::rendering::RenderState & canvas::tools::prependToRenderState ( css::rendering::RenderState &  renderState,
const ::basegfx::B2DHomMatrix transform 
)

◆ prependToRenderState() [2/2]

rendering::RenderState & canvas::tools::prependToRenderState ( rendering::RenderState &  renderState,
const ::basegfx::B2DHomMatrix rTransform 
)

Definition at line 131 of file canvastools.cxx.

References getRenderStateTransform(), and setRenderStateTransform().

◆ roundDown()

sal_Int32 canvas::tools::roundDown ( const double &  rVal)
inline

Count the number of 1-bits of a n-bit value.

Round given floating point value down to next integer

Definition at line 108 of file canvastools.hxx.

◆ roundUp()

sal_Int32 canvas::tools::roundUp ( const double &  rVal)
inline

Round given floating point value up to next integer.

Definition at line 115 of file canvastools.hxx.

◆ setIdentityAffineMatrix2D() [1/2]

CANVASTOOLS_DLLPUBLIC css::geometry::AffineMatrix2D & canvas::tools::setIdentityAffineMatrix2D ( css::geometry::AffineMatrix2D &  matrix)

◆ setIdentityAffineMatrix2D() [2/2]

geometry::AffineMatrix2D & canvas::tools::setIdentityAffineMatrix2D ( geometry::AffineMatrix2D &  matrix)

◆ setIdentityMatrix2D() [1/2]

CANVASTOOLS_DLLPUBLIC css::geometry::Matrix2D & canvas::tools::setIdentityMatrix2D ( css::geometry::Matrix2D &  matrix)

◆ setIdentityMatrix2D() [2/2]

geometry::Matrix2D & canvas::tools::setIdentityMatrix2D ( geometry::Matrix2D &  matrix)

Definition at line 167 of file canvastools.cxx.

◆ setRenderStateTransform() [1/2]

CANVASTOOLS_DLLPUBLIC css::rendering::RenderState & canvas::tools::setRenderStateTransform ( css::rendering::RenderState &  renderState,
const ::basegfx::B2DHomMatrix transform 
)

◆ setRenderStateTransform() [2/2]

rendering::RenderState & canvas::tools::setRenderStateTransform ( rendering::RenderState &  renderState,
const ::basegfx::B2DHomMatrix transform 
)

Definition at line 114 of file canvastools.cxx.

Referenced by appendToRenderState(), and prependToRenderState().

◆ setViewStateTransform() [1/2]

CANVASTOOLS_DLLPUBLIC css::rendering::ViewState & canvas::tools::setViewStateTransform ( css::rendering::ViewState viewState,
const ::basegfx::B2DHomMatrix transform 
)

◆ setViewStateTransform() [2/2]

rendering::ViewState & canvas::tools::setViewStateTransform ( rendering::ViewState viewState,
const ::basegfx::B2DHomMatrix transform 
)

Definition at line 100 of file canvastools.cxx.

◆ spritePixelAreaFromB2DRange()

CANVASTOOLS_DLLPUBLIC::basegfx::B2IRange canvas::tools::spritePixelAreaFromB2DRange ( const ::basegfx::B2DRange rRange)

Clip a blit between two differently surfaces.

This method clips source and dest rect for a clip between two differently clipped surfaces, such that the resulting blit rects are fully within both clip areas.

Parameters
io_rSourceAreaSource area of the blit. Returned therein is the computed clipped source area.
io_rDestPointDest area of the blit. Returned therein is the computed clipped dest area.
rSourceBoundsClip bounds of the source surface
rDestBoundsClip bounds of the dest surface
Returns
false, if the resulting blit is empty, i.e. fully clipped away.

Definition at line 1065 of file canvastools.cxx.

Referenced by cairocanvas::SpriteCanvasHelper::scrollUpdate(), dxcanvas::SpriteCanvasHelper::scrollUpdate(), and vclcanvas::SpriteCanvasHelper::scrollUpdate().

◆ verifyArgs() [1/7]

template<typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
void canvas::tools::verifyArgs ( const Arg0 &  rArg0,
const Arg1 &  rArg1,
const Arg2 &  rArg2,
const Arg3 &  rArg3,
const Arg4 &  rArg4,
const Arg5 &  rArg5,
const Arg6 &  rArg6,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf 
)

Definition at line 473 of file verifyinput.hxx.

References verifyInput().

◆ verifyArgs() [2/7]

template<typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
void canvas::tools::verifyArgs ( const Arg0 &  rArg0,
const Arg1 &  rArg1,
const Arg2 &  rArg2,
const Arg3 &  rArg3,
const Arg4 &  rArg4,
const Arg5 &  rArg5,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf 
)

Definition at line 450 of file verifyinput.hxx.

References verifyInput().

◆ verifyArgs() [3/7]

template<typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
void canvas::tools::verifyArgs ( const Arg0 &  rArg0,
const Arg1 &  rArg1,
const Arg2 &  rArg2,
const Arg3 &  rArg3,
const Arg4 &  rArg4,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf 
)

Definition at line 430 of file verifyinput.hxx.

References verifyInput().

◆ verifyArgs() [4/7]

template<typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
void canvas::tools::verifyArgs ( const Arg0 &  rArg0,
const Arg1 &  rArg1,
const Arg2 &  rArg2,
const Arg3 &  rArg3,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf 
)

Definition at line 413 of file verifyinput.hxx.

References verifyInput().

◆ verifyArgs() [5/7]

template<typename Arg0 , typename Arg1 , typename Arg2 >
void canvas::tools::verifyArgs ( const Arg0 &  rArg0,
const Arg1 &  rArg1,
const Arg2 &  rArg2,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf 
)

Definition at line 399 of file verifyinput.hxx.

References verifyInput().

◆ verifyArgs() [6/7]

template<typename Arg0 , typename Arg1 >
void canvas::tools::verifyArgs ( const Arg0 &  rArg0,
const Arg1 &  rArg1,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf 
)

Definition at line 388 of file verifyinput.hxx.

References verifyInput().

◆ verifyArgs() [7/7]

template<typename Arg0 >
void canvas::tools::verifyArgs ( const Arg0 &  rArg0,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf 
)

Definition at line 380 of file verifyinput.hxx.

References verifyInput().

Referenced by canvas::BitmapCanvasBase2< Base, CanvasHelper, Mutex, UnambiguousBase >::copyRect(), canvas::SpriteCanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::createClonedSprite(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::createFont(), canvas::SpriteCanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::createSpriteFromAnimation(), canvas::SpriteCanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::createSpriteFromBitmaps(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::drawBezier(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::drawBitmap(), canvas::CanvasCustomSpriteBase< Base, SpriteHelper, CanvasHelper, Mutex, UnambiguousBase >::drawBitmap(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::drawBitmapModulated(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::drawLine(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::drawPoint(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::drawPolyPolygon(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::drawText(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::drawTextLayout(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::fillPolyPolygon(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::fillTexturedPolyPolygon(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::fillTextureMappedPolyPolygon(), canvas::IntegerBitmapBase< Base >::getData(), canvas::IntegerBitmapBase< Base >::getPixel(), canvas::CanvasCustomSpriteBase< Base, SpriteHelper, CanvasHelper, Mutex, UnambiguousBase >::move(), oglcanvas::CanvasCustomSprite::move(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::queryAvailableFonts(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::queryStrokeShapes(), canvas::IntegerBitmapBase< Base >::setData(), canvas::IntegerBitmapBase< Base >::setPixel(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::strokePolyPolygon(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::strokeTexturedPolyPolygon(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::strokeTextureMappedPolyPolygon(), and canvas::CanvasCustomSpriteBase< Base, SpriteHelper, CanvasHelper, Mutex, UnambiguousBase >::transform().

◆ verifyBitmapSize() [1/2]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyBitmapSize ( const css::geometry::IntegerSize2D &  size,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf 
)

Range checker, which throws css::lang::IndexOutOfBounds exception, when the size is negative or null.

Parameters
sizeSize to verify

◆ verifyBitmapSize() [2/2]

void canvas::tools::verifyBitmapSize ( const geometry::IntegerSize2D &  size,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf 
)

◆ verifyIndexRange() [1/4]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyIndexRange ( const css::geometry::IntegerPoint2D &  pos,
const css::geometry::IntegerSize2D &  size 
)

Range checker, which throws css::lang::IndexOutOfBounds exception, when index range is violated.

Parameters
posPosition to verify
sizeGiven position must be within ((0,0), (size.Width, size.Height))

◆ verifyIndexRange() [2/4]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyIndexRange ( const css::geometry::IntegerRectangle2D &  rect,
const css::geometry::IntegerSize2D &  size 
)

Range checker, which throws css::lang::IndexOutOfBounds exception, when index range is violated.

Parameters
rectRect to verify
sizeGiven rectangle must be within ((0,0), (size.Width, size.Height))

◆ verifyIndexRange() [3/4]

void canvas::tools::verifyIndexRange ( const geometry::IntegerPoint2D &  pos,
const geometry::IntegerSize2D &  size 
)

Definition at line 629 of file verifyinput.cxx.

References pos, and size.

◆ verifyIndexRange() [4/4]

void canvas::tools::verifyIndexRange ( const geometry::IntegerRectangle2D &  rect,
const geometry::IntegerSize2D &  size 
)

◆ verifyInput() [1/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::geometry::AffineMatrix2D &  rMatrix,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Verify that the given transformation contains valid floating point values.

Parameters
rMatrixMatrix to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [2/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::geometry::Matrix2D &  rMatrix,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Verify that the given transformation contains valid floating point values.

Parameters
rMatrixMatrix to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [3/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::geometry::RealBezierSegment2D &  rSegment,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Verify that the given bezier segment contains valid floating point values.

Parameters
rSegmentSegment to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [4/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::geometry::RealPoint2D &  rPoint,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Verify that the given point contains valid floating point values.

Parameters
rPointPoint to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [5/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::geometry::RealRectangle2D &  rRect,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Verify that the given rectangle contains valid floating point values.

Parameters
rRectRect to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [6/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::rendering::FontRequest &  fontRequest,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Basic check for font request validity.

Parameters
fontRequestFont request to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [7/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::rendering::IntegerBitmapLayout &  bitmapLayout,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Basic check for bitmap layout validity.

Parameters
bitmapLayoutBitmap layout to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [8/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::rendering::RenderState &  renderState,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos,
sal_Int32  nMinColorComponents = 0 
)

Basic check for render state validity.

Parameters
renderStateRenderstate to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
nMinColorComponentsMinimal number of color components available in RenderState::DeviceColor
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [9/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::rendering::StrokeAttributes &  strokeAttributes,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Basic check for stroke attributes validity.

Parameters
strokeAttributesAttributes to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [10/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::rendering::Texture &  texture,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Basic check for texture validity.

Parameters
textureTexture to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [11/25]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifyInput ( const css::rendering::ViewState viewState,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Basic check for view state validity.

Parameters
viewStateViewstate to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

◆ verifyInput() [12/25]

template<class Interface >
void canvas::tools::verifyInput ( const css::uno::Reference< Interface > &  rRef,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Templatized check for uno::Reference validity.

Parameters
rRefReference to check against non-NILness
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

Definition at line 321 of file verifyinput.hxx.

◆ verifyInput() [13/25]

template<typename SequenceContent >
void canvas::tools::verifyInput ( const css::uno::Sequence< SequenceContent > &  rSequence,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Templatized check for content-of-sequence validity.

Parameters
rSequenceSequence of things to check
xIfThe interface that should be reported as the one generating the exception.
nArgPosArgument position on the call site (i.e. the position of the argument, checked here, on the UNO interface method. Counting starts at 0).
Exceptions
alang::IllegalArgumentException, if anything is wrong

Definition at line 357 of file verifyinput.hxx.

References verifyInput().

◆ verifyInput() [14/25]

void canvas::tools::verifyInput ( const geometry::AffineMatrix2D &  matrix,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 196 of file verifyinput.cxx.

◆ verifyInput() [15/25]

void canvas::tools::verifyInput ( const geometry::Matrix2D &  matrix,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 232 of file verifyinput.cxx.

◆ verifyInput() [16/25]

void canvas::tools::verifyInput ( const geometry::RealBezierSegment2D &  rSegment,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 80 of file verifyinput.cxx.

◆ verifyInput() [17/25]

void canvas::tools::verifyInput ( const geometry::RealPoint2D &  rPoint,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

◆ verifyInput() [18/25]

void canvas::tools::verifyInput ( const geometry::RealRectangle2D &  rRect,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 147 of file verifyinput.cxx.

◆ verifyInput() [19/25]

void canvas::tools::verifyInput ( const rendering::FontRequest &  fontRequest,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 567 of file verifyinput.cxx.

References verifyInput().

◆ verifyInput() [20/25]

void canvas::tools::verifyInput ( const rendering::IntegerBitmapLayout &  bitmapLayout,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 498 of file verifyinput.cxx.

◆ verifyInput() [21/25]

void canvas::tools::verifyInput ( const rendering::RenderState &  renderState,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos,
sal_Int32  nMinColorComponents 
)

Definition at line 273 of file verifyinput.cxx.

References verifyInput().

◆ verifyInput() [22/25]

void canvas::tools::verifyInput ( const rendering::StrokeAttributes &  strokeAttributes,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 411 of file verifyinput.cxx.

◆ verifyInput() [23/25]

void canvas::tools::verifyInput ( const rendering::Texture &  texture,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 314 of file verifyinput.cxx.

References verifyInput().

◆ verifyInput() [24/25]

void canvas::tools::verifyInput ( const rendering::ViewState viewState,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 264 of file verifyinput.cxx.

References verifyInput().

◆ verifyInput() [25/25]

template<typename T >
void canvas::tools::verifyInput ( const T &  ,
const char *  ,
const css::uno::Reference< css::uno::XInterface > &  ,
::sal_Int16   
)

Catch-all, to handle cases that DON'T need input checking (i.e. the Integer geometry ones)

Definition at line 370 of file verifyinput.hxx.

◆ verifyRange() [1/2]

template<typename NumType >
void canvas::tools::verifyRange ( NumType  arg,
NumType  bound,
bool  bLowerBound = true 
)
inline

Range checker, which throws css::lang::IllegalArgument exception, when range is violated.

The checked range is half open, i.e. only bound by the specified value.

Parameters
argArg to check
boundBound to check against
bLowerBoundWhen true, given bound is the lower bound. When false, given bound is the upper bound.

Definition at line 520 of file verifyinput.hxx.

◆ verifyRange() [2/2]

template<typename NumType >
void canvas::tools::verifyRange ( NumType  arg,
NumType  lowerBound,
NumType  upperBound 
)
inline

◆ verifySpriteSize() [1/2]

CANVASTOOLS_DLLPUBLIC void canvas::tools::verifySpriteSize ( const css::geometry::RealSize2D &  size,
const char *  pStr,
const css::uno::Reference< css::uno::XInterface > &  xIf 
)

Range checker, which throws css::lang::IndexOutOfBounds exception, when the size is negative or null.

Parameters
sizeSize to verify

◆ verifySpriteSize() [2/2]

void canvas::tools::verifySpriteSize ( const geometry::RealSize2D &  size,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf 
)