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)
 
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)
 
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...
 

Function Documentation

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

Definition at line 125 of file canvastools.cxx.

References getRenderStateTransform(), and setRenderStateTransform().

CANVASTOOLS_DLLPUBLIC css::rendering::RenderState& canvas::tools::appendToRenderState ( css::rendering::RenderState &  renderState,
const ::basegfx::B2DHomMatrix transform 
)
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
int canvas::tools::calcGradientStepCount ( ::basegfx::B2DHomMatrix rTotalTransform,
const rendering::ViewState viewState,
const rendering::RenderState &  renderState,
const rendering::Texture &  texture,
int  nColorSteps 
)
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 912 of file canvastools.cxx.

References calcTransformedRectBounds(), basegfx::utils::createTranslateB2DHomMatrix(), basegfx::B2DRange::getMinX(), and basegfx::B2DRange::getMinY().

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

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 936 of file canvastools.cxx.

References basegfx::B2DRange::expand(), basegfx::B2DRange::reset(), basegfx::B2DTuple::setX(), and basegfx::B2DTuple::setY().

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

CANVASTOOLS_DLLPUBLIC void canvas::tools::clipOutDev ( const css::rendering::ViewState viewState,
const css::rendering::RenderState &  renderState,
OutputDevice rOutDev,
OutputDevice p2ndOutDev = nullptr 
)
void canvas::tools::clipOutDev ( const rendering::ViewState viewState,
const rendering::RenderState &  renderState,
OutputDevice rOutDev,
OutputDevice p2ndOutDev 
)
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
bool canvas::tools::clipScrollArea ( ::basegfx::B2IRange io_rSourceArea,
::basegfx::B2IPoint io_rDestPoint,
std::vector< ::basegfx::B2IRange > &  o_ClippedAreas,
const ::basegfx::B2IRange rBounds 
)
CANVASTOOLS_DLLPUBLIC css::uno::Sequence< sal_Int8 > canvas::tools::colorToStdIntSequence ( const ::Color rColor)

Convert standard 8888 RGBA color to vcl color.

Definition at line 892 of file canvastools.cxx.

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

Definition at line 1313 of file canvastools.cxx.

References Name.

CANVASTOOLS_DLLPUBLIC css::awt::Rectangle canvas::tools::getAbsoluteWindowRect ( const css::awt::Rectangle &  rRect,
const css::uno::Reference< css::awt::XWindow2 > &  xWin 
)
awt::Rectangle canvas::tools::getAbsoluteWindowRect ( const awt::Rectangle &  rRect,
const uno::Reference< awt::XWindow2 > &  xWin 
)
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 1144 of file canvastools.cxx.

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

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

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
uno::Sequence< uno::Any >& canvas::tools::getDeviceInfo ( const uno::Reference< rendering::XCanvas > &  i_rxCanvas,
uno::Sequence< uno::Any > &  o_rxParams 
)

Definition at line 1093 of file canvastools.cxx.

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

Definition at line 111 of file canvastools.cxx.

Referenced by appendToRenderState(), and prependToRenderState().

CANVASTOOLS_DLLPUBLIC ::basegfx::B2DHomMatrix& canvas::tools::getRenderStateTransform ( ::basegfx::B2DHomMatrix transform,
const css::rendering::RenderState &  renderState 
)
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 867 of file canvastools.cxx.

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

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 872 of file canvastools.cxx.

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

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.

rendering::IntegerBitmapLayout canvas::tools::getStdMemoryLayout ( const geometry::IntegerSize2D &  rBmpSize)
::basegfx::B2DHomMatrix& canvas::tools::getViewStateTransform ( ::basegfx::B2DHomMatrix transform,
const rendering::ViewState viewState 
)

Definition at line 97 of file canvastools.cxx.

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

Definition at line 77 of file canvastools.cxx.

References setIdentityAffineMatrix2D().

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

Definition at line 88 of file canvastools.cxx.

References setIdentityAffineMatrix2D().

CANVASTOOLS_DLLPUBLIC css::rendering::ViewState& canvas::tools::initViewState ( css::rendering::ViewState viewState)
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 974 of file canvastools.cxx.

References basegfx::utils::createPolygonFromRect(), and basegfx::B2DPolygon::transform().

Referenced by canvas::CanvasCustomSpriteHelper::checkDrawBitmap().

::basegfx::B2DHomMatrix& canvas::tools::mergeViewAndRenderTransform ( ::basegfx::B2DHomMatrix combinedTransform,
const rendering::ViewState viewState,
const rendering::RenderState &  renderState 
)
CANVASTOOLS_DLLPUBLIC ::basegfx::B2DHomMatrix& canvas::tools::mergeViewAndRenderTransform ( ::basegfx::B2DHomMatrix transform,
const css::rendering::ViewState viewState,
const css::rendering::RenderState &  renderState 
)
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.

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, min, and SAL_WARN.

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

Definition at line 134 of file canvastools.cxx.

References getRenderStateTransform(), and setRenderStateTransform().

CANVASTOOLS_DLLPUBLIC css::rendering::RenderState& canvas::tools::prependToRenderState ( css::rendering::RenderState &  renderState,
const ::basegfx::B2DHomMatrix transform 
)
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.

sal_Int32 canvas::tools::roundUp ( const double &  rVal)
inline
geometry::AffineMatrix2D& canvas::tools::setIdentityAffineMatrix2D ( geometry::AffineMatrix2D &  matrix)
CANVASTOOLS_DLLPUBLIC css::geometry::AffineMatrix2D& canvas::tools::setIdentityAffineMatrix2D ( css::geometry::AffineMatrix2D &  matrix)
geometry::Matrix2D& canvas::tools::setIdentityMatrix2D ( geometry::Matrix2D &  matrix)

Definition at line 170 of file canvastools.cxx.

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

Definition at line 117 of file canvastools.cxx.

Referenced by appendToRenderState(), and prependToRenderState().

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

Definition at line 103 of file canvastools.cxx.

CANVASTOOLS_DLLPUBLIC css::rendering::ViewState& canvas::tools::setViewStateTransform ( css::rendering::ViewState viewState,
const ::basegfx::B2DHomMatrix transform 
)
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 1080 of file canvastools.cxx.

References basegfx::fround().

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

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

Definition at line 381 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::CanvasCustomSpriteBase< Base, SpriteHelper, CanvasHelper, Mutex, UnambiguousBase >::drawBitmap(), canvas::CanvasBase< Base, 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< BitmapCanvasBase2< Base, CanvasHelper, Mutex, UnambiguousBase > >::getData(), canvas::IntegerBitmapBase< BitmapCanvasBase2< Base, CanvasHelper, Mutex, UnambiguousBase > >::getPixel(), oglcanvas::CanvasCustomSprite::move(), canvas::CanvasCustomSpriteBase< Base, SpriteHelper, CanvasHelper, Mutex, UnambiguousBase >::move(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::queryAvailableFonts(), canvas::CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >::queryStrokeShapes(), canvas::IntegerBitmapBase< BitmapCanvasBase2< Base, CanvasHelper, Mutex, UnambiguousBase > >::setData(), canvas::IntegerBitmapBase< BitmapCanvasBase2< Base, CanvasHelper, Mutex, UnambiguousBase > >::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().

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 389 of file verifyinput.hxx.

References verifyInput().

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 400 of file verifyinput.hxx.

References verifyInput().

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 414 of file verifyinput.hxx.

References verifyInput().

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 431 of file verifyinput.hxx.

References verifyInput().

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 451 of file verifyinput.hxx.

References verifyInput().

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 474 of file verifyinput.hxx.

References verifyInput().

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
void canvas::tools::verifyBitmapSize ( const geometry::IntegerSize2D &  size,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf 
)
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))
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))
void canvas::tools::verifyIndexRange ( const geometry::IntegerRectangle2D &  rect,
const geometry::IntegerSize2D &  size 
)
void canvas::tools::verifyIndexRange ( const geometry::IntegerPoint2D &  pos,
const geometry::IntegerSize2D &  size 
)

Definition at line 644 of file verifyinput.cxx.

void canvas::tools::verifyInput ( const geometry::RealPoint2D &  rPoint,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)
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
void canvas::tools::verifyInput ( const geometry::RealBezierSegment2D &  rSegment,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf,
::sal_Int16  nArgPos 
)

Definition at line 91 of file verifyinput.cxx.

References void().

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

Definition at line 158 of file verifyinput.cxx.

References void().

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

Definition at line 207 of file verifyinput.cxx.

References void().

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

Definition at line 243 of file verifyinput.cxx.

References void().

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

Definition at line 275 of file verifyinput.cxx.

References verifyInput().

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
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 284 of file verifyinput.cxx.

References verifyInput().

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
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 322 of file verifyinput.hxx.

References void().

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

Definition at line 325 of file verifyinput.cxx.

References verifyInput().

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 358 of file verifyinput.hxx.

References verifyInput().

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 371 of file verifyinput.hxx.

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

Definition at line 426 of file verifyinput.cxx.

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

Definition at line 513 of file verifyinput.cxx.

References void().

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

Definition at line 582 of file verifyinput.cxx.

References verifyInput().

template<typename NumType >
void canvas::tools::verifyRange ( NumType  arg,
NumType  lowerBound,
NumType  upperBound 
)
inline
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 521 of file verifyinput.hxx.

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
void canvas::tools::verifySpriteSize ( const geometry::RealSize2D &  size,
const char *  pStr,
const uno::Reference< uno::XInterface > &  xIf 
)