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:
Kurt Zenker
2005-11-02 12:43:58 +00:00
parent 36f9a4d595
commit c571b8b359

View File

@@ -4,9 +4,9 @@
* *
* $RCSfile: implsprite.cxx,v $ * $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 Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
@@ -180,6 +180,9 @@ namespace cppcanvas
if( mxSprite.is() && mxGraphicDevice.is() ) if( mxSprite.is() && mxGraphicDevice.is() )
{ {
if( rClipPoly.count() == 0 )
mxSprite->clip( uno::Reference< rendering::XPolyPolygon2D >() );
else
mxSprite->clip( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( mxGraphicDevice, mxSprite->clip( ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon( mxGraphicDevice,
rClipPoly ) ); rClipPoly ) );
} }
@@ -191,6 +194,12 @@ namespace cppcanvas
OSL_ENSURE( mxSprite.is(), "ImplSprite::transform(): Invalid sprite"); OSL_ENSURE( mxSprite.is(), "ImplSprite::transform(): Invalid sprite");
if( mxSprite.is() && mxGraphicDevice.is() ) if( mxSprite.is() && mxGraphicDevice.is() )
{
if( rClipPoly.count() == 0 )
{
mxSprite->clip( uno::Reference< rendering::XPolyPolygon2D >() );
}
else
{ {
::basegfx::B2DPolyPolygon aTransformedClipPoly( rClipPoly ); ::basegfx::B2DPolyPolygon aTransformedClipPoly( rClipPoly );
@@ -207,6 +216,7 @@ namespace cppcanvas
aTransformedClipPoly ) ); aTransformedClipPoly ) );
} }
} }
}
void ImplSprite::show() void ImplSprite::show()
{ {
@@ -224,6 +234,14 @@ namespace cppcanvas
mxSprite->hide(); 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 uno::Reference< rendering::XSprite > ImplSprite::getUNOSprite() const
{ {
return mxSprite; return mxSprite;