INTEGRATION: CWS canvas02 (1.5.8); FILE MERGED
2005/10/24 16:28:43 thb 1.5.8.3: #i48939# Providing the sprite priority also on the cppcanvas wrapper 2005/10/09 09:22:10 thb 1.5.8.2: RESYNC: (1.5-1.6); FILE MERGED 2005/06/17 23:15:11 thb 1.5.8.1: #i48939# Handle clip correctly for transparency groups; adapted clip handling for sprites (after clarifying the UNO API semantics)
This commit is contained in:
parent
36f9a4d595
commit
c571b8b359
1 changed files with 32 additions and 14 deletions
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: implsprite.cxx,v $
|
||||
*
|
||||
* $Revision: 1.6 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2005-09-08 08:29:43 $
|
||||
* last change: $Author: kz $ $Date: 2005-11-02 13:43:58 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -180,8 +180,11 @@ namespace cppcanvas
|
|||
|
||||
if( mxSprite.is() && mxGraphicDevice.is() )
|
||||
{
|
||||
mxSprite->clip( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( mxGraphicDevice,
|
||||
rClipPoly ) );
|
||||
if( rClipPoly.count() == 0 )
|
||||
mxSprite->clip( uno::Reference< rendering::XPolyPolygon2D >() );
|
||||
else
|
||||
mxSprite->clip( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( mxGraphicDevice,
|
||||
rClipPoly ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,19 +195,26 @@ namespace cppcanvas
|
|||
|
||||
if( mxSprite.is() && mxGraphicDevice.is() )
|
||||
{
|
||||
::basegfx::B2DPolyPolygon aTransformedClipPoly( rClipPoly );
|
||||
if( rClipPoly.count() == 0 )
|
||||
{
|
||||
mxSprite->clip( uno::Reference< rendering::XPolyPolygon2D >() );
|
||||
}
|
||||
else
|
||||
{
|
||||
::basegfx::B2DPolyPolygon aTransformedClipPoly( rClipPoly );
|
||||
|
||||
// extract linear part of canvas view transformation (linear means:
|
||||
// without translational components)
|
||||
::basegfx::B2DHomMatrix aViewTransform( mpTransformArbiter->getTransformation() );
|
||||
aViewTransform.set( 0, 2, 0.0 );
|
||||
aViewTransform.set( 1, 2, 0.0 );
|
||||
// extract linear part of canvas view transformation (linear means:
|
||||
// without translational components)
|
||||
::basegfx::B2DHomMatrix aViewTransform( mpTransformArbiter->getTransformation() );
|
||||
aViewTransform.set( 0, 2, 0.0 );
|
||||
aViewTransform.set( 1, 2, 0.0 );
|
||||
|
||||
// transform polygon from view to device coordinate space
|
||||
aTransformedClipPoly.transform( aViewTransform );
|
||||
// transform polygon from view to device coordinate space
|
||||
aTransformedClipPoly.transform( aViewTransform );
|
||||
|
||||
mxSprite->clip( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( mxGraphicDevice,
|
||||
aTransformedClipPoly ) );
|
||||
mxSprite->clip( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( mxGraphicDevice,
|
||||
aTransformedClipPoly ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,6 +234,14 @@ namespace cppcanvas
|
|||
mxSprite->hide();
|
||||
}
|
||||
|
||||
void ImplSprite::setPriority( double fPriority )
|
||||
{
|
||||
OSL_ENSURE( mxSprite.is(), "ImplSprite::setPriority(): Invalid sprite");
|
||||
|
||||
if( mxSprite.is() )
|
||||
mxSprite->setPriority(fPriority);
|
||||
}
|
||||
|
||||
uno::Reference< rendering::XSprite > ImplSprite::getUNOSprite() const
|
||||
{
|
||||
return mxSprite;
|
||||
|
|
Loading…
Reference in a new issue