INTEGRATION: CWS presfixes03 (1.5.2); FILE MERGED
2005/04/01 16:09:42 thb 1.5.2.1: #i36190#, #i39245# Changed uno::Sequence::operator[] for nonconst sequences to use naked ptr; added support for true bezier polygons (and removed subdivision, where it was added because of that canvas deficiency); overhauled mtf renderer to provide faithful bounds also for subsetted meta files
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: action.hxx,v $
|
* $RCSfile: action.hxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
*
|
*
|
||||||
* last change: $Author: rt $ $Date: 2005-03-30 08:24:45 $
|
* last change: $Author: obo $ $Date: 2005-04-18 09:58:09 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -73,6 +73,7 @@
|
|||||||
namespace basegfx
|
namespace basegfx
|
||||||
{
|
{
|
||||||
class B2DHomMatrix;
|
class B2DHomMatrix;
|
||||||
|
class B2DRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -130,6 +131,9 @@ namespace cppcanvas
|
|||||||
|
|
||||||
@param rTransformation
|
@param rTransformation
|
||||||
Transformation matrix to apply before rendering
|
Transformation matrix to apply before rendering
|
||||||
|
|
||||||
|
@return true, if rendering was successful. If
|
||||||
|
rendering failed, false is returned.
|
||||||
*/
|
*/
|
||||||
virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation ) const = 0;
|
virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation ) const = 0;
|
||||||
|
|
||||||
@@ -150,6 +154,32 @@ namespace cppcanvas
|
|||||||
virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation,
|
virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation,
|
||||||
const Subset& rSubset ) const = 0;
|
const Subset& rSubset ) const = 0;
|
||||||
|
|
||||||
|
/** Query bounds of this action on the associated canvas
|
||||||
|
|
||||||
|
@param rTransformation
|
||||||
|
Transformation matrix to apply
|
||||||
|
|
||||||
|
@return the bounds for this action in device
|
||||||
|
coordinate space.
|
||||||
|
*/
|
||||||
|
virtual ::basegfx::B2DRange getBounds( const ::basegfx::B2DHomMatrix& rTransformation ) const = 0;
|
||||||
|
|
||||||
|
/** Query bounds for the given part of the action on the
|
||||||
|
associated canvas.
|
||||||
|
|
||||||
|
@param rTransformation
|
||||||
|
Transformation matrix to apply.
|
||||||
|
|
||||||
|
@param rSubset
|
||||||
|
Subset of the action to query. See Subset description
|
||||||
|
for index semantics.
|
||||||
|
|
||||||
|
@return the bounds for the given subset in device
|
||||||
|
coordinate space.
|
||||||
|
*/
|
||||||
|
virtual ::basegfx::B2DRange getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
|
||||||
|
const Subset& rSubset ) const = 0;
|
||||||
|
|
||||||
/** Query action count.
|
/** Query action count.
|
||||||
|
|
||||||
This method returns the number of subset actions
|
This method returns the number of subset actions
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: bitmapaction.cxx,v $
|
* $RCSfile: bitmapaction.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
*
|
*
|
||||||
* last change: $Author: rt $ $Date: 2005-03-30 08:25:13 $
|
* last change: $Author: obo $ $Date: 2005-04-18 09:58:44 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -95,6 +95,9 @@
|
|||||||
#ifndef _BGFX_VECTOR_B2DSIZE_HXX
|
#ifndef _BGFX_VECTOR_B2DSIZE_HXX
|
||||||
#include <basegfx/vector/b2dsize.hxx>
|
#include <basegfx/vector/b2dsize.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _BGFX_RANGE_B2DRANGE_HXX
|
||||||
|
#include <basegfx/range/b2drange.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
|
#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
|
||||||
#include <basegfx/tools/canvastools.hxx>
|
#include <basegfx/tools/canvastools.hxx>
|
||||||
#endif
|
#endif
|
||||||
@@ -130,6 +133,10 @@ namespace cppcanvas
|
|||||||
virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation,
|
virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation,
|
||||||
const Subset& rSubset ) const;
|
const Subset& rSubset ) const;
|
||||||
|
|
||||||
|
virtual ::basegfx::B2DRange getBounds( const ::basegfx::B2DHomMatrix& rTransformation ) const;
|
||||||
|
virtual ::basegfx::B2DRange getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
|
||||||
|
const Subset& rSubset ) const;
|
||||||
|
|
||||||
virtual sal_Int32 getActionCount() const;
|
virtual sal_Int32 getActionCount() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -241,6 +248,32 @@ namespace cppcanvas
|
|||||||
return render( rTransformation );
|
return render( rTransformation );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::basegfx::B2DRange BitmapAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation ) const
|
||||||
|
{
|
||||||
|
rendering::RenderState aLocalState( maState );
|
||||||
|
::canvas::tools::prependToRenderState(aLocalState, rTransformation);
|
||||||
|
|
||||||
|
const geometry::IntegerSize2D aSize( mxBitmap->getSize() );
|
||||||
|
|
||||||
|
return tools::calcDevicePixelBounds( ::basegfx::B2DRange( 0,0,
|
||||||
|
aSize.Width,
|
||||||
|
aSize.Height ),
|
||||||
|
mpCanvas->getViewState(),
|
||||||
|
aLocalState );
|
||||||
|
}
|
||||||
|
|
||||||
|
::basegfx::B2DRange BitmapAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
|
||||||
|
const Subset& rSubset ) const
|
||||||
|
{
|
||||||
|
// bitmap only contains a single action, empty bounds
|
||||||
|
// if subset requests different range
|
||||||
|
if( rSubset.mnSubsetBegin != 0 ||
|
||||||
|
rSubset.mnSubsetEnd != 1 )
|
||||||
|
return ::basegfx::B2DRange();
|
||||||
|
|
||||||
|
return getBounds( rTransformation );
|
||||||
|
}
|
||||||
|
|
||||||
sal_Int32 BitmapAction::getActionCount() const
|
sal_Int32 BitmapAction::getActionCount() const
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user