com::sun::star->css in canvas

Change-Id: I23c3f774834bb7e84e2f02fe05fa9d844adadc9d
Reviewed-on: https://gerrit.libreoffice.org/17259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin
2015-07-22 09:04:57 +00:00
committed by Noel Grandin
parent ed9d6ef1e6
commit a60cc5d62a
84 changed files with 1325 additions and 1364 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ not exclusively by the canvas, Armin's drawinglayer module also make
use of it), which resides in basegfx.
The UNO API used by the canvas is primarily under
com::sun::star::rendering, with com::sun::star::rendering::XCanvas
css::rendering, with css::rendering::XCanvas
being the central interface.
== The slideshow engine ==
+8 -9
View File
@@ -35,24 +35,23 @@ namespace cairocanvas
/** Create an XCachedPrimitive for given GraphicObject
*/
CachedBitmap( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& rUsedViewState,
const ::com::sun::star::rendering::RenderState& rUsedRenderState,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvas >& rTarget );
const css::rendering::ViewState& rUsedViewState,
const css::rendering::RenderState& rUsedRenderState,
const css::uno::Reference< css::rendering::XCanvas >& rTarget );
/// Dispose all internal references
virtual void SAL_CALL disposing() SAL_OVERRIDE;
private:
virtual ::sal_Int8 doRedraw( const ::com::sun::star::rendering::ViewState& rNewState,
const ::com::sun::star::rendering::ViewState& rOldState,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvas >& rTargetCanvas,
virtual ::sal_Int8 doRedraw( const css::rendering::ViewState& rNewState,
const css::rendering::ViewState& rOldState,
const css::uno::Reference<
css::rendering::XCanvas >& rTargetCanvas,
bool bSameViewTransform ) SAL_OVERRIDE;
::cairo::SurfaceSharedPtr mpSurface;
const ::com::sun::star::rendering::RenderState maRenderState;
const css::rendering::RenderState maRenderState;
};
}
+14 -16
View File
@@ -53,13 +53,13 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::rendering::XGraphicDevice,
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::rendering::XGraphicDevice,
css::lang::XMultiServiceFactory,
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName > GraphicDeviceBase_Base;
typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
DeviceHelper,
::osl::MutexGuard,
@@ -105,10 +105,8 @@ namespace cairocanvas
public RepaintTarget
{
public:
Canvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
Canvas( const css::uno::Sequence< css::uno::Any >& aArguments,
const css::uno::Reference< css::uno::XComponentContext >& rxContext );
void initialize();
@@ -126,12 +124,12 @@ namespace cairocanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas, GraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceName
virtual OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getServiceName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// RepaintTarget
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) SAL_OVERRIDE;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) SAL_OVERRIDE;
// SurfaceProvider
virtual ::cairo::SurfaceSharedPtr getSurface() SAL_OVERRIDE;
@@ -141,8 +139,8 @@ namespace cairocanvas
virtual OutputDevice* getOutputDevice() SAL_OVERRIDE;
private:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
css::uno::Sequence< css::uno::Any > maArguments;
css::uno::Reference< css::uno::XComponentContext > mxComponentContext;
};
typedef ::rtl::Reference< Canvas > CanvasRef;
+12 -12
View File
@@ -44,10 +44,10 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo,
css::beans::XFastPropertySet > CanvasBitmapBase_Base;
class CanvasBitmapSpriteSurface_Base :
public ::canvas::BaseMutexHelper<CanvasBitmapBase_Base>,
public SurfaceProvider
@@ -75,7 +75,7 @@ namespace cairocanvas
*/
CanvasBitmap( const ::basegfx::B2ISize& rSize,
const SurfaceProviderRef& rDevice,
::com::sun::star::rendering::XGraphicDevice* pDevice,
css::rendering::XGraphicDevice* pDevice,
bool bHasAlpha );
/// Dispose all internal references
@@ -89,9 +89,9 @@ namespace cairocanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasBitmap, CanvasBitmapBase_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceInfo
virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// SurfaceProvider
virtual ::cairo::SurfaceSharedPtr getSurface() SAL_OVERRIDE;
@@ -102,8 +102,8 @@ namespace cairocanvas
// RepaintTarget
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) SAL_OVERRIDE;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) SAL_OVERRIDE;
// XFastPropertySet
// used to retrieve BitmapEx pointer or X Pixmap handles for this bitmap
@@ -115,8 +115,8 @@ namespace cairocanvas
// 1st a bool value: true - free the pixmap after used by XFreePixmap, false do nothing, the pixmap is used internally in the canvas
// 2nd the pixmap handle
// 3rd the pixmap depth
virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const ::com::sun::star::uno::Any&) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {}
virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const css::uno::Any&) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE {}
private:
SurfaceProviderRef mpSurfaceProvider;
@@ -38,7 +38,7 @@ using namespace ::com::sun::star;
namespace cairocanvas
{
CanvasCustomSprite::CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
CanvasCustomSprite::CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice ) :
mpSpriteCanvas( rRefDevice ),
maSize( ::canvas::tools::roundUp( rSpriteSize.Width ),
@@ -47,10 +47,10 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCustomSprite,
::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite,
css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
/** Mixin Sprite
Have to mixin the Sprite interface before deriving from
@@ -100,7 +100,7 @@ namespace cairocanvas
@param rDevice
Target DX device
*/
CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice );
virtual void disposeThis() SAL_OVERRIDE;
@@ -113,9 +113,9 @@ namespace cairocanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasCustomSprite, CanvasCustomSpriteBase_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
// Sprite
virtual void redraw( const ::cairo::CairoSharedPtr& pCairo,
@@ -126,8 +126,8 @@ namespace cairocanvas
// RepaintTarget
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) SAL_OVERRIDE;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) SAL_OVERRIDE;
// SurfaceProvider
virtual ::cairo::SurfaceSharedPtr getSurface() SAL_OVERRIDE;
+2 -2
View File
@@ -48,8 +48,8 @@ namespace cairocanvas
mpRefDevice( rDevice )
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
maFont->SetVertical( rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
maFont->SetVertical( rFontRequest.FontDescription.IsVertical==css::util::TriState_YES );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
+14 -14
View File
@@ -41,8 +41,8 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCanvasFont,
::com::sun::star::lang::XServiceInfo > CanvasFont_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont,
css::lang::XServiceInfo > CanvasFont_Base;
class CanvasFont : public ::comphelper::OBaseMutex,
public CanvasFont_Base,
@@ -51,31 +51,31 @@ namespace cairocanvas
public:
typedef rtl::Reference<CanvasFont> Reference;
CanvasFont( const ::com::sun::star::rendering::FontRequest& fontRequest,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& extraFontProperties,
const ::com::sun::star::geometry::Matrix2D& rFontMatrix,
CanvasFont( const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties,
const css::geometry::Matrix2D& rFontMatrix,
const SurfaceProviderRef& rDevice );
/// Dispose all internal references
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XCanvasFont
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > SAL_CALL createTextLayout( const ::com::sun::star::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::FontRequest SAL_CALL getFontRequest( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XTextLayout > SAL_CALL createTextLayout( const css::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::FontRequest SAL_CALL getFontRequest( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
vcl::Font getVCLFont() const;
private:
::canvas::vcltools::VCLObject<vcl::Font> maFont;
::com::sun::star::rendering::FontRequest maFontRequest;
css::rendering::FontRequest maFontRequest;
SurfaceProviderRef mpRefDevice;
};
+5 -5
View File
@@ -750,7 +750,7 @@ namespace cairocanvas
/* TODO: multitexturing */
if( pTextures )
{
const ::com::sun::star::rendering::Texture& aTexture ( (*pTextures)[0] );
const css::rendering::Texture& aTexture ( (*pTextures)[0] );
if( aTexture.Bitmap.is() )
{
unsigned char* data = NULL;
@@ -763,7 +763,7 @@ namespace cairocanvas
cairo_save( pCairo );
::com::sun::star::geometry::AffineMatrix2D aTransform( aTexture.AffineTransform );
css::geometry::AffineMatrix2D aTransform( aTexture.AffineTransform );
cairo_matrix_t aScaleMatrix, aTextureMatrix, aScaledTextureMatrix;
cairo_matrix_init( &aTextureMatrix,
@@ -826,7 +826,7 @@ namespace cairocanvas
SAL_INFO( "canvas.cairo", "known implementation" );
::canvas::ParametricPolyPolygon* pPolyImpl = static_cast< ::canvas::ParametricPolyPolygon* >( aTexture.Gradient.get() );
::com::sun::star::geometry::AffineMatrix2D aTransform( aTexture.AffineTransform );
css::geometry::AffineMatrix2D aTransform( aTexture.AffineTransform );
cairo_matrix_t aTextureMatrix;
cairo_matrix_init( &aTextureMatrix,
@@ -1580,7 +1580,7 @@ namespace cairocanvas
namespace
{
class CairoColorSpace : public cppu::WeakImplHelper< com::sun::star::rendering::XIntegerBitmapColorSpace >
class CairoColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
{
private:
uno::Sequence< sal_Int8 > maComponentTags;
@@ -1937,7 +1937,7 @@ namespace cairocanvas
}
};
class CairoNoAlphaColorSpace : public cppu::WeakImplHelper< com::sun::star::rendering::XIntegerBitmapColorSpace >
class CairoNoAlphaColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
{
private:
uno::Sequence< sal_Int8 > maComponentTags;
+119 -138
View File
@@ -78,7 +78,7 @@ namespace cairocanvas
*/
void init( const ::basegfx::B2ISize& rSizePixel,
SurfaceProvider& rSurfaceProvider,
::com::sun::star::rendering::XGraphicDevice* pDevice );
css::rendering::XGraphicDevice* pDevice );
void setSize( const ::basegfx::B2ISize& rSize );
void setSurface( const ::cairo::SurfaceSharedPtr& pSurface, bool bHasAlpha );
@@ -89,143 +89,124 @@ namespace cairocanvas
// XCanvas (only providing, not implementing the
// interface. Also note subtle method parameter differences)
void clear();
void drawLine( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::geometry::RealPoint2D& aStartPoint,
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
void drawBezier( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::geometry::RealBezierSegment2D& aBezierSegment,
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokePolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokeTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokeTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::uno::Reference<
::com::sun::star::geometry::XMapping2D >& xMapping,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
queryStrokeShapes( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::uno::Reference<
::com::sun::star::geometry::XMapping2D >& xMapping );
void drawLine( const css::rendering::XCanvas* pCanvas,
const css::geometry::RealPoint2D& aStartPoint,
const css::geometry::RealPoint2D& aEndPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
void drawBezier( const css::rendering::XCanvas* pCanvas,
const css::geometry::RealBezierSegment2D& aBezierSegment,
const css::geometry::RealPoint2D& aEndPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokePolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokeTexturedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence< css::rendering::Texture >& textures,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokeTextureMappedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence< css::rendering::Texture >& textures,
const css::uno::Reference< css::geometry::XMapping2D >& xMapping,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XPolyPolygon2D >
queryStrokeShapes( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillTexturedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence< css::rendering::Texture >& textures );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillTextureMappedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence< css::rendering::Texture >& textures,
const css::uno::Reference< css::geometry::XMapping2D >& xMapping );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL
createFont( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::rendering::FontRequest& fontRequest,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& extraFontProperties,
const ::com::sun::star::geometry::Matrix2D& fontMatrix );
css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL
createFont( const css::rendering::XCanvas* pCanvas,
const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties,
const css::geometry::Matrix2D& fontMatrix );
::com::sun::star::uno::Sequence< ::com::sun::star::rendering::FontInfo >
queryAvailableFonts( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::rendering::FontInfo& aFilter,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& aFontProperties );
css::uno::Sequence< css::rendering::FontInfo >
queryAvailableFonts( const css::rendering::XCanvas* pCanvas,
const css::rendering::FontInfo& aFilter,
const css::uno::Sequence< css::beans::PropertyValue >& aFontProperties );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawText( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::rendering::StringContext& text,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvasFont >& xFont,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
sal_Int8 textDirection );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawText( const css::rendering::XCanvas* pCanvas,
const css::rendering::StringContext& text,
const css::uno::Reference< css::rendering::XCanvasFont >& xFont,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
sal_Int8 textDirection );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawTextLayout( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XTextLayout >& laidOutText,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawTextLayout( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XTextLayout >& laidOutText,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawBitmap( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawBitmapModulated( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >
css::uno::Reference< css::rendering::XCachedPrimitive >
drawBitmap( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XBitmap >& xBitmap,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawBitmapModulated( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference< css::rendering::XBitmap >& xBitmap,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XGraphicDevice >
getDevice() { return css::uno::Reference< css::rendering::XGraphicDevice >(mpDevice); }
// BitmapCanvasHelper functionality
// ================================
::com::sun::star::geometry::IntegerSize2D getSize();
css::geometry::IntegerSize2D getSize();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
css::uno::Reference< css::rendering::XBitmap >
getScaledBitmap( const css::geometry::RealSize2D& newSize,
bool beFast );
::com::sun::star::uno::Sequence< sal_Int8 >
getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
css::uno::Sequence< sal_Int8 >
getData( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
::com::sun::star::uno::Sequence< sal_Int8 >
getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
css::uno::Sequence< sal_Int8 >
getPixel( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
::com::sun::star::rendering::IntegerBitmapLayout getMemoryLayout();
css::rendering::IntegerBitmapLayout getMemoryLayout();
bool hasAlpha() const { return mbHaveAlpha; }
@@ -234,24 +215,24 @@ namespace cairocanvas
LINE_COLOR, FILL_COLOR, TEXT_COLOR, IGNORE_COLOR
};
void doPolyPolygonPath( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
void doPolyPolygonPath( const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
Operation aOperation,
bool bNoLineJoin = false,
const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::Texture >* pTextures=NULL,
const css::uno::Sequence< css::rendering::Texture >* pTextures=NULL,
cairo_t* pCairo=NULL ) const;
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive > implDrawBitmapSurface(
const ::com::sun::star::rendering::XCanvas* pCanvas,
css::uno::Reference< css::rendering::XCachedPrimitive > implDrawBitmapSurface(
const css::rendering::XCanvas* pCanvas,
const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::geometry::IntegerSize2D& rSize,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::geometry::IntegerSize2D& rSize,
bool bModulateColors,
bool bHasAlpha );
bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
protected:
/** Surface provider
@@ -267,17 +248,17 @@ namespace cairocanvas
Deliberately not a refcounted reference, because of
potential circular references for spritecanvas.
*/
::com::sun::star::rendering::XGraphicDevice* mpDevice;
css::rendering::XGraphicDevice* mpDevice;
private:
VclPtr<VirtualDevice> mpVirtualDevice;
void useStates( const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
void useStates( const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
bool setColor );
com::sun::star::rendering::IntegerBitmapLayout impl_getMemoryLayout( sal_Int32 nWidth, sal_Int32 nHeight );
css::rendering::IntegerBitmapLayout impl_getMemoryLayout( sal_Int32 nWidth, sal_Int32 nHeight );
/// When true, content is able to represent alpha
bool mbHaveAlpha;
@@ -294,9 +275,9 @@ namespace cairocanvas
void doPolyPolygonImplementation( ::basegfx::B2DPolyPolygon aPolyPolygon,
Operation aOperation,
cairo_t* pCairo,
const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::Texture >* pTextures,
const css::uno::Sequence< css::rendering::Texture >* pTextures,
const SurfaceProviderRef& pDevice,
::com::sun::star::rendering::FillRule eFillrule );
css::rendering::FillRule eFillrule );
}
#endif // INCLUDED_CANVAS_SOURCE_CAIRO_CAIRO_CANVASHELPER_HXX
+1 -1
View File
@@ -202,7 +202,7 @@ namespace cairocanvas
uno::Any DeviceHelper::isAccelerated() const
{
return ::com::sun::star::uno::makeAny(false);
return css::uno::makeAny(false);
}
uno::Any DeviceHelper::getDeviceHandle() const
+25 -25
View File
@@ -56,32 +56,32 @@ namespace cairocanvas
void disposing();
// XWindowGraphicDevice
::com::sun::star::geometry::RealSize2D getPhysicalResolution();
::com::sun::star::geometry::RealSize2D getPhysicalSize();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& points );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& points );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
css::geometry::RealSize2D getPhysicalResolution();
css::geometry::RealSize2D getPhysicalSize();
css::uno::Reference< css::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > >& points );
css::uno::Reference< css::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > >& points );
css::uno::Reference< css::rendering::XBitmap > createCompatibleBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XBitmap > createCompatibleAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
::com::sun::star::uno::Any isAccelerated() const;
::com::sun::star::uno::Any getDeviceHandle() const;
::com::sun::star::uno::Any getSurfaceHandle() const;
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XColorSpace > getColorSpace() const;
css::uno::Any isAccelerated() const;
css::uno::Any getDeviceHandle() const;
css::uno::Any getSurfaceHandle() const;
css::uno::Reference<
css::rendering::XColorSpace > getColorSpace() const;
/** called when DumpScreenContent property is enabled on
XGraphicDevice, and writes out bitmaps of current screen.
+2 -2
View File
@@ -40,8 +40,8 @@ namespace cairocanvas
// call this when a bitmap is repainted
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) = 0;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) = 0;
};
}
+19 -21
View File
@@ -51,15 +51,15 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XSpriteCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::rendering::XGraphicDevice,
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::rendering::XBufferController,
::com::sun::star::awt::XWindowListener,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XSpriteCanvas,
css::rendering::XIntegerBitmap,
css::rendering::XGraphicDevice,
css::lang::XMultiServiceFactory,
css::rendering::XBufferController,
css::awt::XWindowListener,
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName > WindowGraphicDeviceBase_Base;
typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
::osl::MutexGuard,
@@ -105,10 +105,8 @@ namespace cairocanvas
public RepaintTarget
{
public:
SpriteCanvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
SpriteCanvas( const css::uno::Sequence< css::uno::Any >& aArguments,
const css::uno::Reference< css::uno::XComponentContext >& rxContext );
void initialize();
@@ -123,14 +121,14 @@ namespace cairocanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( SpriteCanvas, WindowGraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase )
// XBufferController (partial)
virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException) SAL_OVERRIDE;
// XSpriteCanvas (partial)
virtual sal_Bool SAL_CALL updateScreen( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL updateScreen( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceName
virtual OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getServiceName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// SurfaceProvider
virtual ::cairo::SurfaceSharedPtr getSurface() SAL_OVERRIDE;
@@ -141,8 +139,8 @@ namespace cairocanvas
// RepaintTarget
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) SAL_OVERRIDE;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) SAL_OVERRIDE;
::cairo::SurfaceSharedPtr getWindowSurface();
::cairo::SurfaceSharedPtr getBufferSurface();
@@ -152,8 +150,8 @@ namespace cairocanvas
void flush();
private:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
css::uno::Sequence< css::uno::Any > maArguments;
css::uno::Reference< css::uno::XComponentContext > mxComponentContext;
};
typedef ::rtl::Reference< SpriteCanvas > SpriteCanvasRef;
@@ -50,24 +50,20 @@ namespace cairocanvas
void disposing();
// XSpriteCanvas
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XAnimatedSprite > createSpriteFromAnimation(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimation >& animation );
css::uno::Reference< css::rendering::XAnimatedSprite > createSpriteFromAnimation(
const css::uno::Reference< css::rendering::XAnimation >& animation );
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XAnimatedSprite > createSpriteFromBitmaps(
const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap > >& animationBitmaps,
css::uno::Reference< css::rendering::XAnimatedSprite > createSpriteFromBitmaps(
const css::uno::Sequence<
css::uno::Reference<
css::rendering::XBitmap > >& animationBitmaps,
sal_Int8 interpolationMode );
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCustomSprite > createCustomSprite(
const ::com::sun::star::geometry::RealSize2D& spriteSize );
css::uno::Reference< css::rendering::XCustomSprite > createCustomSprite(
const css::geometry::RealSize2D& spriteSize );
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XSprite > createClonedSprite(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite >& original );
css::uno::Reference< css::rendering::XSprite > createClonedSprite(
const css::uno::Reference< css::rendering::XSprite >& original );
/** Actually perform the screen update
@@ -84,7 +84,7 @@ namespace cairocanvas
uno::Any SpriteDeviceHelper::isAccelerated() const
{
return ::com::sun::star::uno::makeAny(true);
return css::uno::makeAny(true);
}
uno::Any SpriteDeviceHelper::getDeviceHandle() const
@@ -55,11 +55,11 @@ namespace cairocanvas
bool showBuffer( bool, bool );
bool switchBuffer( bool, bool bUpdateAll );
::com::sun::star::uno::Any isAccelerated() const;
::com::sun::star::uno::Any getDeviceHandle() const;
::com::sun::star::uno::Any getSurfaceHandle() const;
css::uno::Any isAccelerated() const;
css::uno::Any getDeviceHandle() const;
css::uno::Any getSurfaceHandle() const;
void notifySizeUpdate( const ::com::sun::star::awt::Rectangle& rBounds );
void notifySizeUpdate( const css::awt::Rectangle& rBounds );
void setSize( const ::basegfx::B2ISize& rSize );
::cairo::SurfaceSharedPtr getBufferSurface() { return mpBufferSurface; }
+3 -3
View File
@@ -67,8 +67,8 @@ namespace cairocanvas
@param bShowSpriteBounds
When true, little debug bound rects for sprites are shown
*/
void init( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rSpriteCanvas );
void init( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rSpriteCanvas );
void disposing();
@@ -95,7 +95,7 @@ namespace cairocanvas
private:
virtual ::basegfx::B2DPolyPolygon polyPolygonFromXPolyPolygon2D(
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPoly ) const SAL_OVERRIDE;
css::uno::Reference< css::rendering::XPolyPolygon2D >& xPoly ) const SAL_OVERRIDE;
SpriteCanvasRef mpSpriteCanvas;
@@ -40,7 +40,7 @@ namespace cairocanvas
This interface must be implemented on all canvas
implementations that hand out XCachedPrimitives
*/
class SurfaceProvider : public ::com::sun::star::uno::XInterface
class SurfaceProvider : public css::uno::XInterface
{
public:
virtual ~SurfaceProvider() {}
+30 -30
View File
@@ -40,15 +40,15 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XTextLayout,
::com::sun::star::lang::XServiceInfo > TextLayout_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout,
css::lang::XServiceInfo > TextLayout_Base;
class TextLayout : public ::comphelper::OBaseMutex,
public TextLayout_Base,
private ::boost::noncopyable
{
public:
TextLayout( const ::com::sun::star::rendering::StringContext& aText,
TextLayout( const css::rendering::StringContext& aText,
sal_Int8 nDirection,
sal_Int64 nRandomSeed,
const CanvasFont::Reference& rFont,
@@ -58,46 +58,46 @@ namespace cairocanvas
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XTextLayout
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL applyLogicalAdvancements( const ::com::sun::star::uno::Sequence< double >& aAdvancements ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::geometry::RealRectangle2D SAL_CALL queryTextBounds( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL justify( double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL combinedJustify( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > >& aNextLayouts, double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::TextHit SAL_CALL getTextHit( const ::com::sun::star::geometry::RealPoint2D& aHitPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL getBaselineOffset( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int8 SAL_CALL getMainTextDirection( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::StringContext SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::uno::Reference< css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL applyLogicalAdvancements( const css::uno::Sequence< double >& aAdvancements ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::geometry::RealRectangle2D SAL_CALL queryTextBounds( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL justify( double nSize ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL combinedJustify( const css::uno::Sequence< css::uno::Reference< css::rendering::XTextLayout > >& aNextLayouts, double nSize ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::TextHit SAL_CALL getTextHit( const css::geometry::RealPoint2D& aHitPoint ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL getBaselineOffset( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int8 SAL_CALL getMainTextDirection( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::StringContext SAL_CALL getText( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
bool draw( ::cairo::CairoSharedPtr& pSCairo,
OutputDevice& rOutDev,
const Point& rOutpos,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) const;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) const;
void setupTextOffsets( long* outputOffsets,
const ::com::sun::star::uno::Sequence< double >& inputOffsets,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) const;
const css::uno::Sequence< double >& inputOffsets,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) const;
protected:
virtual ~TextLayout(); // we're a ref-counted UNO class. _We_ destroy ourselves.
private:
::com::sun::star::rendering::StringContext maText;
::com::sun::star::uno::Sequence< double > maLogicalAdvancements;
css::rendering::StringContext maText;
css::uno::Sequence< double > maLogicalAdvancements;
CanvasFont::Reference mpFont;
SurfaceProviderRef mpRefDevice;
sal_Int8 mnTextDirection;
+12 -12
View File
@@ -47,23 +47,23 @@ namespace dxcanvas
virtual ::basegfx::B2IVector getSize() const;
virtual bool hasAlpha() const;
::com::sun::star::uno::Sequence< sal_Int8 > getData(
::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
css::uno::Sequence< sal_Int8 > getData(
css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
void setData(
const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
const css::uno::Sequence< sal_Int8 >& data,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
void setPixel(
const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
const css::uno::Sequence< sal_Int8 >& color,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
::com::sun::star::uno::Sequence< sal_Int8 > getPixel(
::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
css::uno::Sequence< sal_Int8 > getPixel(
css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
private:
// Refcounted global GDI+ state container
+32 -32
View File
@@ -72,51 +72,51 @@ namespace dxcanvas
// =============================================================
void clear();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawTextLayout( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XTextLayout >& laidOutText,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawTextLayout( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XTextLayout >& laidOutText,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
// BitmapCanvasHelper functionality
// ================================
void copyRect( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmapCanvas >& sourceCanvas,
const ::com::sun::star::geometry::RealRectangle2D& sourceRect,
const ::com::sun::star::rendering::ViewState& sourceViewState,
const ::com::sun::star::rendering::RenderState& sourceRenderState,
const ::com::sun::star::geometry::RealRectangle2D& destRect,
const ::com::sun::star::rendering::ViewState& destViewState,
const ::com::sun::star::rendering::RenderState& destRenderState );
void copyRect( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XBitmapCanvas >& sourceCanvas,
const css::geometry::RealRectangle2D& sourceRect,
const css::rendering::ViewState& sourceViewState,
const css::rendering::RenderState& sourceRenderState,
const css::geometry::RealRectangle2D& destRect,
const css::rendering::ViewState& destViewState,
const css::rendering::RenderState& destRenderState );
::com::sun::star::geometry::IntegerSize2D getSize();
css::geometry::IntegerSize2D getSize();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
css::uno::Reference< css::rendering::XBitmap >
getScaledBitmap( const css::geometry::RealSize2D& newSize,
bool beFast );
::com::sun::star::uno::Sequence< sal_Int8 >
getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
css::uno::Sequence< sal_Int8 >
getData( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
void setData( const css::uno::Sequence< sal_Int8 >& data,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
void setPixel( const css::uno::Sequence< sal_Int8 >& color,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
::com::sun::star::uno::Sequence< sal_Int8 >
getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
css::uno::Sequence< sal_Int8 >
getPixel( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapPalette > getPalette();
css::uno::Reference< css::rendering::XBitmapPalette > getPalette();
::com::sun::star::rendering::IntegerBitmapLayout getMemoryLayout();
css::rendering::IntegerBitmapLayout getMemoryLayout();
bool hasAlpha() const;
+25 -27
View File
@@ -47,12 +47,12 @@
namespace dxcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCanvas,
::com::sun::star::rendering::XGraphicDevice,
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase1_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvas,
css::rendering::XGraphicDevice,
css::lang::XMultiServiceFactory,
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName > GraphicDeviceBase1_Base;
typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase1_Base >,
DeviceHelper,
::osl::MutexGuard,
@@ -74,10 +74,10 @@ namespace dxcanvas
class Canvas : public CanvasBaseT
{
public:
Canvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
Canvas( const css::uno::Sequence<
css::uno::Any >& aArguments,
const css::uno::Reference<
css::uno::XComponentContext >& rxContext );
void initialize();
@@ -92,24 +92,24 @@ namespace dxcanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas, GraphicDeviceBase1_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceName
virtual OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException);
virtual OUString SAL_CALL getServiceName( ) throw (css::uno::RuntimeException);
private:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
css::uno::Sequence< css::uno::Any > maArguments;
css::uno::Reference< css::uno::XComponentContext > mxComponentContext;
};
typedef ::rtl::Reference< Canvas > CanvasRef;
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::rendering::XGraphicDevice,
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase2_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::rendering::XGraphicDevice,
css::lang::XMultiServiceFactory,
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName > GraphicDeviceBase2_Base;
typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase2_Base >,
DeviceHelper,
::osl::MutexGuard,
@@ -133,10 +133,8 @@ namespace dxcanvas
class BitmapCanvas : public BitmapCanvasBaseT, public BitmapProvider
{
public:
BitmapCanvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
BitmapCanvas( const css::uno::Sequence< css::uno::Any >& aArguments,
const css::uno::Reference< css::uno::XComponentContext >& rxContext );
void initialize();
@@ -151,14 +149,14 @@ namespace dxcanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( BitmapCanvas, GraphicDeviceBase2_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceName
virtual OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException);
virtual OUString SAL_CALL getServiceName( ) throw (css::uno::RuntimeException);
// BitmapProvider
virtual IBitmapSharedPtr getBitmap() const;
private:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
css::uno::Sequence< css::uno::Any > maArguments;
css::uno::Reference< css::uno::XComponentContext > mxComponentContext;
IBitmapSharedPtr mpTarget;
};
+1 -1
View File
@@ -75,7 +75,7 @@ namespace dxcanvas
{
// sorry, no BitmapEx here...
case 0:
aRes = ::com::sun::star::uno::Any( reinterpret_cast<sal_Int64>( (BitmapEx*) NULL ) );
aRes = css::uno::Any( reinterpret_cast<sal_Int64>( (BitmapEx*) NULL ) );
break;
case 1:
+9 -9
View File
@@ -45,10 +45,10 @@
namespace dxcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo,
css::beans::XFastPropertySet > CanvasBitmapBase_Base;
typedef ::canvas::IntegerBitmapBase<
canvas::BitmapCanvasBase2<
::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
@@ -74,15 +74,15 @@ namespace dxcanvas
virtual void disposeThis() SAL_OVERRIDE;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
virtual OUString SAL_CALL getImplementationName( ) throw (css::uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException);
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (css::uno::RuntimeException);
// BitmapProvider
virtual IBitmapSharedPtr getBitmap() const { return mpBitmap; }
virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const ::com::sun::star::uno::Any&) throw (::com::sun::star::uno::RuntimeException) {}
virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (css::uno::RuntimeException);
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const css::uno::Any&) throw (css::uno::RuntimeException) {}
private:
/** MUST hold here, too, since CanvasHelper only contains a
@@ -39,7 +39,7 @@ using namespace ::com::sun::star;
namespace dxcanvas
{
CanvasCustomSprite::CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
CanvasCustomSprite::CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice,
const IDXRenderModuleSharedPtr& rRenderModule,
const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy,
@@ -45,10 +45,10 @@
namespace dxcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCustomSprite,
::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite,
css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
/** Mixin Sprite
Have to mixin the Sprite interface before deriving from
@@ -96,7 +96,7 @@ namespace dxcanvas
@param rDevice
Target DX device
*/
CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice,
const IDXRenderModuleSharedPtr& rRenderModule,
const ::canvas::ISurfaceProxyManagerSharedPtr& rSurfaceProxy,
@@ -112,9 +112,9 @@ namespace dxcanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasCustomSprite, CanvasCustomSpriteBase_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
// Sprite
virtual void redraw() const;
+1 -1
View File
@@ -160,7 +160,7 @@ namespace dxcanvas
return mpFont;
}
const ::com::sun::star::geometry::Matrix2D& CanvasFont::getFontMatrix() const
const css::geometry::Matrix2D& CanvasFont::getFontMatrix() const
{
::osl::MutexGuard aGuard( m_aMutex );
+16 -16
View File
@@ -43,8 +43,8 @@ namespace dxcanvas
typedef ::boost::shared_ptr< Gdiplus::Font > FontSharedPtr;
typedef ::boost::shared_ptr< Gdiplus::FontFamily > FontFamilySharedPtr;
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCanvasFont,
::com::sun::star::lang::XServiceInfo > CanvasFont_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont,
css::lang::XServiceInfo > CanvasFont_Base;
class CanvasFont : public ::comphelper::OBaseMutex,
public CanvasFont_Base,
@@ -53,36 +53,36 @@ namespace dxcanvas
public:
typedef rtl::Reference<CanvasFont> ImplRef;
CanvasFont( const ::com::sun::star::rendering::FontRequest& fontRequest,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& extraFontProperties,
const ::com::sun::star::geometry::Matrix2D& fontMatrix );
CanvasFont( const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties,
const css::geometry::Matrix2D& fontMatrix );
/// Dispose all internal references
virtual void SAL_CALL disposing();
// XCanvasFont
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > SAL_CALL createTextLayout( const ::com::sun::star::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::rendering::FontRequest SAL_CALL getFontRequest( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (::com::sun::star::uno::RuntimeException);
virtual css::uno::Reference< css::rendering::XTextLayout > SAL_CALL createTextLayout( const css::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (css::uno::RuntimeException);
virtual css::rendering::FontRequest SAL_CALL getFontRequest( ) throw (css::uno::RuntimeException);
virtual css::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (css::uno::RuntimeException);
virtual css::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (css::uno::RuntimeException);
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (css::uno::RuntimeException);
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
double getCellAscent() const;
double getEmHeight() const;
FontSharedPtr getFont() const;
const ::com::sun::star::geometry::Matrix2D& getFontMatrix() const;
const css::geometry::Matrix2D& getFontMatrix() const;
private:
GDIPlusUserSharedPtr mpGdiPlusUser;
FontFamilySharedPtr mpFontFamily;
FontSharedPtr mpFont;
::com::sun::star::rendering::FontRequest maFontRequest;
::com::sun::star::geometry::Matrix2D maFontMatrix;
css::rendering::FontRequest maFontRequest;
css::geometry::Matrix2D maFontMatrix;
};
}
+119 -119
View File
@@ -62,7 +62,7 @@ namespace dxcanvas
Reference device this canvas is associated with
*/
void setDevice( com::sun::star::rendering::XGraphicDevice& rDevice );
void setDevice( css::rendering::XGraphicDevice& rDevice );
/** Set the target for rendering operations
@@ -89,127 +89,127 @@ namespace dxcanvas
// XCanvas (only providing, not implementing the
// interface. Also note subtle method parameter differences)
void clear();
void drawPoint( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::geometry::RealPoint2D& aPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
void drawLine( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::geometry::RealPoint2D& aStartPoint,
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
void drawBezier( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::geometry::RealBezierSegment2D& aBezierSegment,
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokePolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokeTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokeTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::uno::Reference<
::com::sun::star::geometry::XMapping2D >& xMapping,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
queryStrokeShapes( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::uno::Reference<
::com::sun::star::geometry::XMapping2D >& xMapping );
void drawPoint( const css::rendering::XCanvas* pCanvas,
const css::geometry::RealPoint2D& aPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
void drawLine( const css::rendering::XCanvas* pCanvas,
const css::geometry::RealPoint2D& aStartPoint,
const css::geometry::RealPoint2D& aEndPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
void drawBezier( const css::rendering::XCanvas* pCanvas,
const css::geometry::RealBezierSegment2D& aBezierSegment,
const css::geometry::RealPoint2D& aEndPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokePolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokeTexturedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokeTextureMappedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures,
const css::uno::Reference<
css::geometry::XMapping2D >& xMapping,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XPolyPolygon2D >
queryStrokeShapes( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillTexturedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillTextureMappedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures,
const css::uno::Reference<
css::geometry::XMapping2D >& xMapping );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL
createFont( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::rendering::FontRequest& fontRequest,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& extraFontProperties,
const ::com::sun::star::geometry::Matrix2D& fontMatrix );
css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL
createFont( const css::rendering::XCanvas* pCanvas,
const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence<
css::beans::PropertyValue >& extraFontProperties,
const css::geometry::Matrix2D& fontMatrix );
::com::sun::star::uno::Sequence< ::com::sun::star::rendering::FontInfo >
queryAvailableFonts( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::rendering::FontInfo& aFilter,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& aFontProperties );
css::uno::Sequence< css::rendering::FontInfo >
queryAvailableFonts( const css::rendering::XCanvas* pCanvas,
const css::rendering::FontInfo& aFilter,
const css::uno::Sequence<
css::beans::PropertyValue >& aFontProperties );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawText( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::rendering::StringContext& text,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvasFont >& xFont,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
css::uno::Reference< css::rendering::XCachedPrimitive >
drawText( const css::rendering::XCanvas* pCanvas,
const css::rendering::StringContext& text,
const css::uno::Reference<
css::rendering::XCanvasFont >& xFont,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
sal_Int8 textDirection );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawTextLayout( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XTextLayout >& laidOutText,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawTextLayout( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XTextLayout >& laidOutText,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawBitmap( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawBitmapModulated( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >
css::uno::Reference< css::rendering::XCachedPrimitive >
drawBitmap( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XBitmap >& xBitmap,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawBitmapModulated( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XBitmap >& xBitmap,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XGraphicDevice >
getDevice();
// Flush drawing queue to screen
@@ -229,7 +229,7 @@ namespace dxcanvas
Deliberately not a refcounted reference, because of
potential circular references for spritecanvas.
*/
com::sun::star::rendering::XGraphicDevice* mpDevice;
css::rendering::XGraphicDevice* mpDevice;
/// Provides the Gdiplus::Graphics to render into
GraphicsProviderSharedPtr mpGraphicsProvider;
@@ -238,8 +238,8 @@ namespace dxcanvas
// returns transparency of color
void setupGraphicsState( GraphicsSharedPtr& rGraphics,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
Gdiplus::CompositingMode calcCompositingMode( sal_Int8 nMode );
+1 -1
View File
@@ -129,7 +129,7 @@ namespace dxcanvas
}
}
void DXCanvasItem::Notify( const com::sun::star::uno::Sequence<OUString>& ) {}
void DXCanvasItem::Notify( const css::uno::Sequence<OUString>& ) {}
void DXCanvasItem::ImplCommit() {}
bool DXCanvasItem::isDeviceUsable( const DeviceInfo& rDeviceInfo ) const
+1 -1
View File
@@ -66,7 +66,7 @@ namespace dxcanvas
bool isBlacklistCurrentDevice() const;
void blacklistDevice( const DeviceInfo& rDeviceInfo );
void adaptMaxTextureSize( basegfx::B2IVector& io_maxTextureSize ) const;
virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE;
virtual void Notify( const css::uno::Sequence<OUString>& aPropertyNames) SAL_OVERRIDE;
private:
virtual void ImplCommit() SAL_OVERRIDE;
+1 -1
View File
@@ -178,7 +178,7 @@ namespace dxcanvas
uno::Any DeviceHelper::isAccelerated() const
{
return ::com::sun::star::uno::makeAny(false);
return css::uno::makeAny(false);
}
uno::Any DeviceHelper::getDeviceHandle() const
+29 -29
View File
@@ -52,38 +52,38 @@ namespace dxcanvas
Ref back to owning UNO device
*/
void init( HDC hdc, OutputDevice* pOutputDev,
com::sun::star::rendering::XGraphicDevice& rDevice );
css::rendering::XGraphicDevice& rDevice );
/// Dispose all internal references
void disposing();
// XWindowGraphicDevice
::com::sun::star::geometry::RealSize2D getPhysicalResolution();
::com::sun::star::geometry::RealSize2D getPhysicalSize();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& points );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& points );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
css::geometry::RealSize2D getPhysicalResolution();
css::geometry::RealSize2D getPhysicalSize();
css::uno::Reference< css::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > >& points );
css::uno::Reference< css::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > >& points );
css::uno::Reference< css::rendering::XBitmap > createCompatibleBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XBitmap > createCompatibleAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
::com::sun::star::uno::Any isAccelerated() const;
::com::sun::star::uno::Any getDeviceHandle() const;
::com::sun::star::uno::Any getSurfaceHandle() const;
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XColorSpace > getColorSpace() const;
css::uno::Any isAccelerated() const;
css::uno::Any getDeviceHandle() const;
css::uno::Any getSurfaceHandle() const;
css::uno::Reference<
css::rendering::XColorSpace > getColorSpace() const;
/** called when DumpScreenContent property is enabled on
XGraphicDevice, and writes out bitmaps of current screen.
@@ -92,7 +92,7 @@ namespace dxcanvas
protected:
HDC getHDC() const { return mnHDC; }
com::sun::star::rendering::XGraphicDevice* getDevice() const { return mpDevice; }
css::rendering::XGraphicDevice* getDevice() const { return mpDevice; }
private:
/** Phyical output device
@@ -101,12 +101,12 @@ namespace dxcanvas
potential circular references for canvas. Needed to
create bitmaps
*/
com::sun::star::rendering::XGraphicDevice* mpDevice;
css::rendering::XGraphicDevice* mpDevice;
HDC mnHDC;
VclPtr<OutputDevice> mpOutDev;
};
typedef ::rtl::Reference< com::sun::star::rendering::XGraphicDevice > DeviceRef;
typedef ::rtl::Reference< css::rendering::XGraphicDevice > DeviceRef;
}
#endif // INCLUDED_CANVAS_SOURCE_DIRECTX_DX_DEVICEHELPER_HXX
+12 -12
View File
@@ -37,23 +37,23 @@ namespace dxcanvas
virtual ::basegfx::B2IVector getSize() const = 0;
virtual bool hasAlpha() const = 0;
virtual ::com::sun::star::uno::Sequence< sal_Int8 > getData(
::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect ) = 0;
virtual css::uno::Sequence< sal_Int8 > getData(
css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect ) = 0;
virtual void setData(
const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect ) = 0;
const css::uno::Sequence< sal_Int8 >& data,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect ) = 0;
virtual void setPixel(
const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos ) = 0;
const css::uno::Sequence< sal_Int8 >& color,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos ) = 0;
virtual ::com::sun::star::uno::Sequence< sal_Int8 > getPixel(
::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos ) = 0;
virtual css::uno::Sequence< sal_Int8 > getPixel(
css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos ) = 0;
};
typedef boost::shared_ptr<IBitmap> IBitmapSharedPtr;
+2 -2
View File
@@ -170,7 +170,7 @@ namespace dxcanvas
{
// TODO(P2): Check whether this gets inlined. If not, make functor
// out of it
inline Gdiplus::PointF implGdiPlusPointFromRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& rPoint )
inline Gdiplus::PointF implGdiPlusPointFromRealPoint2D( const css::geometry::RealPoint2D& rPoint )
{
return Gdiplus::PointF( static_cast<Gdiplus::REAL>(rPoint.X),
static_cast<Gdiplus::REAL>(rPoint.Y) );
@@ -301,7 +301,7 @@ namespace dxcanvas
}
}
Gdiplus::PointF gdiPlusPointFromRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& rPoint )
Gdiplus::PointF gdiPlusPointFromRealPoint2D( const css::geometry::RealPoint2D& rPoint )
{
return implGdiPlusPointFromRealPoint2D( rPoint );
}
+16 -19
View File
@@ -61,8 +61,7 @@ namespace dxcanvas
struct RawRGBABitmap;
::basegfx::B2DPolyPolygon
polyPolygonFromXPolyPolygon2D( const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& );
polyPolygonFromXPolyPolygon2D( const css::uno::Reference< css::rendering::XPolyPolygon2D >& );
Gdiplus::Graphics* createGraphicsFromHDC(HDC);
Gdiplus::Graphics* createGraphicsFromBitmap(const BitmapSharedPtr&);
@@ -72,26 +71,26 @@ namespace dxcanvas
void gdiPlusMatrixFromB2DHomMatrix( Gdiplus::Matrix& rGdiplusMatrix,
const ::basegfx::B2DHomMatrix& rMatrix );
void gdiPlusMatrixFromAffineMatrix2D( Gdiplus::Matrix& rGdiplusMatrix,
const ::com::sun::star::geometry::AffineMatrix2D& rMatrix );
const css::geometry::AffineMatrix2D& rMatrix );
Gdiplus::PointF gdiPlusPointFFromRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& );
Gdiplus::RectF gdiPlusRectFFromRectangle2D( const ::com::sun::star::geometry::RealRectangle2D& );
Gdiplus::Rect gdiPlusRectFromIntegerRectangle2D( const ::com::sun::star::geometry::IntegerRectangle2D& );
Gdiplus::PointF gdiPlusPointFFromRealPoint2D( const css::geometry::RealPoint2D& );
Gdiplus::RectF gdiPlusRectFFromRectangle2D( const css::geometry::RealRectangle2D& );
Gdiplus::Rect gdiPlusRectFromIntegerRectangle2D( const css::geometry::IntegerRectangle2D& );
RECT gdiRectFromB2IRect( const ::basegfx::B2IRange& );
::com::sun::star::geometry::RealPoint2D realPoint2DFromGdiPlusPointF( const Gdiplus::PointF& );
::com::sun::star::geometry::RealRectangle2D realRectangle2DFromGdiPlusRectF( const Gdiplus::RectF& );
css::geometry::RealPoint2D realPoint2DFromGdiPlusPointF( const Gdiplus::PointF& );
css::geometry::RealRectangle2D realRectangle2DFromGdiPlusRectF( const Gdiplus::RectF& );
::basegfx::B2DPoint b2dPointFromGdiPlusPointF( const Gdiplus::PointF& );
::basegfx::B2DRange b2dRangeFromGdiPlusRectF( const Gdiplus::RectF& );
::com::sun::star::uno::Sequence< double > argbToDoubleSequence( const Gdiplus::ARGB& rColor );
::com::sun::star::uno::Sequence< sal_Int8 > argbToIntSequence( const Gdiplus::ARGB& rColor );
Gdiplus::ARGB sequenceToArgb( const ::com::sun::star::uno::Sequence< sal_Int8 >& rColor );
Gdiplus::ARGB sequenceToArgb( const ::com::sun::star::uno::Sequence< double >& rColor );
css::uno::Sequence< double > argbToDoubleSequence( const Gdiplus::ARGB& rColor );
css::uno::Sequence< sal_Int8 > argbToIntSequence( const Gdiplus::ARGB& rColor );
Gdiplus::ARGB sequenceToArgb( const css::uno::Sequence< sal_Int8 >& rColor );
Gdiplus::ARGB sequenceToArgb( const css::uno::Sequence< double >& rColor );
GraphicsPathSharedPtr graphicsPathFromRealPoint2DSequence( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& );
GraphicsPathSharedPtr graphicsPathFromRealPoint2DSequence( const css::uno::Sequence<
css::uno::Sequence< css::geometry::RealPoint2D > >& );
GraphicsPathSharedPtr graphicsPathFromB2DPolygon(
const ::basegfx::B2DPolygon& rPoly,
@@ -102,7 +101,7 @@ namespace dxcanvas
bool bNoLineJoin = false);
GraphicsPathSharedPtr graphicsPathFromXPolyPolygon2D(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >&,
const css::uno::Reference< css::rendering::XPolyPolygon2D >&,
bool bNoLineJoin = false );
bool drawGdiPlusBitmap( const GraphicsSharedPtr& rGraphics,
@@ -114,11 +113,9 @@ namespace dxcanvas
bool drawRGBABits( const ::boost::shared_ptr< Gdiplus::Graphics >& rGraphics,
const RawRGBABitmap& rRawRGBAData );
BitmapSharedPtr bitmapFromXBitmap( const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap );
BitmapSharedPtr bitmapFromXBitmap( const css::uno::Reference< css::rendering::XBitmap >& xBitmap );
CanvasFont::ImplRef canvasFontFromXFont( const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvasFont >& xFont );
CanvasFont::ImplRef canvasFontFromXFont( const css::uno::Reference< css::rendering::XCanvasFont >& xFont );
void setModulateImageAttributes( Gdiplus::ImageAttributes& o_rAttr,
double nRedModulation,
+19 -19
View File
@@ -48,15 +48,15 @@
namespace dxcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XSpriteCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::rendering::XGraphicDevice,
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::rendering::XBufferController,
::com::sun::star::awt::XWindowListener,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XSpriteCanvas,
css::rendering::XIntegerBitmap,
css::rendering::XGraphicDevice,
css::lang::XMultiServiceFactory,
css::rendering::XBufferController,
css::awt::XWindowListener,
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName > WindowGraphicDeviceBase_Base;
typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
::osl::MutexGuard,
@@ -100,10 +100,10 @@ namespace dxcanvas
class SpriteCanvas : public SpriteCanvasBaseT, public BitmapProvider
{
public:
SpriteCanvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
SpriteCanvas( const css::uno::Sequence<
css::uno::Any >& aArguments,
const css::uno::Reference<
css::uno::XComponentContext >& rxContext );
void initialize();
@@ -118,14 +118,14 @@ namespace dxcanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( SpriteCanvas, WindowGraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase )
// XBufferController (partial)
virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException);
virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException);
// XSpriteCanvas (partial)
virtual sal_Bool SAL_CALL updateScreen( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL updateScreen( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException);
// XServiceName
virtual OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException);
virtual OUString SAL_CALL getServiceName( ) throw (css::uno::RuntimeException);
/// Retrieve rendermodule object for this Canvas
const IDXRenderModuleSharedPtr& getRenderModule() const;
@@ -137,8 +137,8 @@ namespace dxcanvas
virtual IBitmapSharedPtr getBitmap() const;
private:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
css::uno::Sequence< css::uno::Any > maArguments;
css::uno::Reference< css::uno::XComponentContext > mxComponentContext;
};
typedef ::rtl::Reference< SpriteCanvas > SpriteCanvasRef;
+14 -14
View File
@@ -54,24 +54,24 @@ namespace dxcanvas
void disposing();
// XSpriteCanvas
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XAnimatedSprite > createSpriteFromAnimation(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimation >& animation );
css::uno::Reference<
css::rendering::XAnimatedSprite > createSpriteFromAnimation(
const css::uno::Reference< css::rendering::XAnimation >& animation );
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XAnimatedSprite > createSpriteFromBitmaps(
const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap > >& animationBitmaps,
css::uno::Reference<
css::rendering::XAnimatedSprite > createSpriteFromBitmaps(
const css::uno::Sequence<
css::uno::Reference<
css::rendering::XBitmap > >& animationBitmaps,
sal_Int8 interpolationMode );
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCustomSprite > createCustomSprite(
const ::com::sun::star::geometry::RealSize2D& spriteSize );
css::uno::Reference<
css::rendering::XCustomSprite > createCustomSprite(
const css::geometry::RealSize2D& spriteSize );
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XSprite > createClonedSprite(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite >& original );
css::uno::Reference<
css::rendering::XSprite > createClonedSprite(
const css::uno::Reference< css::rendering::XSprite >& original );
/** Actually perform the screen update
@@ -176,7 +176,7 @@ namespace dxcanvas
uno::Any SpriteDeviceHelper::isAccelerated() const
{
return ::com::sun::star::uno::makeAny(true);
return css::uno::makeAny(true);
}
void SpriteDeviceHelper::notifySizeUpdate( const awt::Rectangle& rBounds )
+16 -16
View File
@@ -42,27 +42,27 @@ namespace dxcanvas
public:
SpriteDeviceHelper();
void init( vcl::Window& rWindow,
void init( vcl::Window& rWindow,
SpriteCanvas& rSpriteCanvas,
const ::com::sun::star::awt::Rectangle& rRect,
const css::awt::Rectangle& rRect,
bool bFullscreen );
/// Dispose all internal references
void disposing();
// partial override XWindowGraphicDevice
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XBitmap > createCompatibleBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XBitmap > createCompatibleAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
void destroyBuffers( );
sal_Bool showBuffer( bool bIsVisible, sal_Bool bUpdateAll );
@@ -72,9 +72,9 @@ namespace dxcanvas
const DXSurfaceBitmapSharedPtr& getBackBuffer() const { return mpBackBuffer; }
const ::canvas::ISurfaceProxyManagerSharedPtr &getSurfaceProxy() const { return mpSurfaceProxyManager; }
::com::sun::star::uno::Any isAccelerated() const;
css::uno::Any isAccelerated() const;
void notifySizeUpdate( const ::com::sun::star::awt::Rectangle& rBounds );
void notifySizeUpdate( const css::awt::Rectangle& rBounds );
/** called when DumpScreenContent property is enabled on
XGraphicDevice, and writes out bitmaps of current screen.
+2 -2
View File
@@ -67,7 +67,7 @@ namespace dxcanvas
@param bShowSpriteBounds
When true, little debug bound rects for sprites are shown
*/
void init( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
void init( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rSpriteCanvas,
const IDXRenderModuleSharedPtr& rRenderModule,
const DXSurfaceBitmapSharedPtr& rBitmap,
@@ -87,7 +87,7 @@ namespace dxcanvas
private:
virtual ::basegfx::B2DPolyPolygon polyPolygonFromXPolyPolygon2D(
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPoly ) const;
css::uno::Reference< css::rendering::XPolyPolygon2D >& xPoly ) const;
/// Returns true, if the sprite _really_ needs redraw
bool needRedraw() const;
+12 -12
View File
@@ -64,23 +64,23 @@ namespace dxcanvas
const ::basegfx::B2DPolyPolygon& rClipPoly,
const ::basegfx::B2DHomMatrix& rTransform );
virtual ::com::sun::star::uno::Sequence< sal_Int8 > getData(
::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
virtual css::uno::Sequence< sal_Int8 > getData(
css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
virtual void setData(
const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
const css::uno::Sequence< sal_Int8 >& data,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
virtual void setPixel(
const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
const css::uno::Sequence< sal_Int8 >& color,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
virtual ::com::sun::star::uno::Sequence< sal_Int8 > getPixel(
::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
virtual css::uno::Sequence< sal_Int8 > getPixel(
css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
#ifdef DX_DEBUG_IMAGES
void imageDebugger();
+29 -29
View File
@@ -40,15 +40,15 @@
/* Definition of TextLayout class */
namespace dxcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XTextLayout,
::com::sun::star::lang::XServiceInfo > TextLayout_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout,
css::lang::XServiceInfo > TextLayout_Base;
class TextLayout : public ::comphelper::OBaseMutex,
public TextLayout_Base,
private ::boost::noncopyable
{
public:
TextLayout( const ::com::sun::star::rendering::StringContext& aText,
TextLayout( const css::rendering::StringContext& aText,
sal_Int8 nDirection,
sal_Int64 nRandomSeed,
const CanvasFont::ImplRef& rFont );
@@ -57,35 +57,35 @@ namespace dxcanvas
virtual void SAL_CALL disposing();
// XTextLayout
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL applyLogicalAdvancements( const ::com::sun::star::uno::Sequence< double >& aAdvancements ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::geometry::RealRectangle2D SAL_CALL queryTextBounds( ) throw (::com::sun::star::uno::RuntimeException);
virtual double SAL_CALL justify( double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual double SAL_CALL combinedJustify( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > >& aNextLayouts, double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::rendering::TextHit SAL_CALL getTextHit( const ::com::sun::star::geometry::RealPoint2D& aHitPoint ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual double SAL_CALL getBaselineOffset( ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Int8 SAL_CALL getMainTextDirection( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::rendering::StringContext SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException);
virtual css::uno::Sequence< css::uno::Reference< css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) throw (css::uno::RuntimeException);
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) throw (css::uno::RuntimeException);
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) throw (css::uno::RuntimeException);
virtual css::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) throw (css::uno::RuntimeException);
virtual void SAL_CALL applyLogicalAdvancements( const css::uno::Sequence< double >& aAdvancements ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
virtual css::geometry::RealRectangle2D SAL_CALL queryTextBounds( ) throw (css::uno::RuntimeException);
virtual double SAL_CALL justify( double nSize ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
virtual double SAL_CALL combinedJustify( const css::uno::Sequence< css::uno::Reference< css::rendering::XTextLayout > >& aNextLayouts, double nSize ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
virtual css::rendering::TextHit SAL_CALL getTextHit( const css::geometry::RealPoint2D& aHitPoint ) throw (css::uno::RuntimeException);
virtual css::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
virtual double SAL_CALL getBaselineOffset( ) throw (css::uno::RuntimeException);
virtual sal_Int8 SAL_CALL getMainTextDirection( ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException);
virtual css::rendering::StringContext SAL_CALL getText( ) throw (css::uno::RuntimeException);
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
bool draw( const GraphicsSharedPtr& rGraphics,
const ::com::sun::star::rendering::ViewState& rViewState,
const ::com::sun::star::rendering::RenderState& rRenderState,
const css::rendering::ViewState& rViewState,
const css::rendering::RenderState& rRenderState,
const ::basegfx::B2ISize& rOutputOffset,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice,
const css::uno::Reference<
css::rendering::XGraphicDevice >& xGraphicDevice,
bool bAlphaSurface ) const;
protected:
@@ -94,8 +94,8 @@ namespace dxcanvas
private:
// NOTE: no need for GDIPlusUserSharedPtr, mpFont implicitly has one already
::com::sun::star::rendering::StringContext maText;
::com::sun::star::uno::Sequence< double > maLogicalAdvancements;
css::rendering::StringContext maText;
css::uno::Sequence< double > maLogicalAdvancements;
CanvasFont::ImplRef mpFont;
sal_Int8 mnTextDirection;
};
@@ -44,7 +44,7 @@
#include "dx_bitmap.hxx"
#include "dx_canvasfont.hxx"
class ::com::sun::star::rendering::XCanvasFont;
class css::rendering::XCanvasFont;
using namespace ::com::sun::star;
@@ -64,16 +64,16 @@ namespace dxcanvas
}
void TextLayoutDrawHelper::drawText(
const GraphicsSharedPtr& rGraphics,
const ::com::sun::star::rendering::ViewState& rViewState,
const ::com::sun::star::rendering::RenderState& rRenderState,
const ::basegfx::B2ISize& rOutputOffset,
const ::com::sun::star::rendering::StringContext& rText,
const ::com::sun::star::uno::Sequence< double >& rLogicalAdvancements,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvasFont >& rCanvasFont,
const ::com::sun::star::geometry::Matrix2D& rFontMatrix,
bool bAlphaSurface )
const GraphicsSharedPtr& rGraphics,
const css::rendering::ViewState& rViewState,
const css::rendering::RenderState& rRenderState,
const ::basegfx::B2ISize& rOutputOffset,
const css::rendering::StringContext& rText,
const css::uno::Sequence< double >& rLogicalAdvancements,
const css::uno::Reference<
css::rendering::XCanvasFont >& rCanvasFont,
const css::geometry::Matrix2D& rFontMatrix,
bool bAlphaSurface )
{
HDC hdc = rGraphics->GetHDC();
@@ -110,15 +110,15 @@ namespace dxcanvas
aVirtualDevice.SetTextColor(aColor);
// create the font
const ::com::sun::star::rendering::FontRequest& rFontRequest = rCanvasFont->getFontRequest();
const css::rendering::FontRequest& rFontRequest = rCanvasFont->getFontRequest();
vcl::Font aFont(
rFontRequest.FontDescription.FamilyName,
rFontRequest.FontDescription.StyleName,
Size( 0, ::basegfx::fround(rFontRequest.CellSize)));
aFont.SetAlign( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==css::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
aFont.SetPitch(
@@ -245,15 +245,15 @@ namespace dxcanvas
VirtualDevice aVirtualDevice(&aSystemGraphicsData, Size(1, 1), 0);
// create the font
const ::com::sun::star::rendering::FontRequest& rFontRequest = rCanvasFont->getFontRequest();
const css::rendering::FontRequest& rFontRequest = rCanvasFont->getFontRequest();
vcl::Font aFont(
rFontRequest.FontDescription.FamilyName,
rFontRequest.FontDescription.StyleName,
Size( 0, ::basegfx::fround(rFontRequest.CellSize)));
aFont.SetAlign( ALIGN_BASELINE );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False );
aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==css::util::TriState_YES) ? sal_True : sal_False );
aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
aFont.SetPitch(
@@ -31,7 +31,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/vector/b2isize.hxx>
class ::com::sun::star::rendering::XCanvasFont;
class css::rendering::XCanvasFont;
namespace Gdiplus { class Graphics; }
@@ -42,35 +42,34 @@ namespace dxcanvas
{
public:
TextLayoutDrawHelper(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice);
const css::uno::Reference< css::rendering::XGraphicDevice >& xGraphicDevice);
~TextLayoutDrawHelper();
// draw text
void drawText( const boost::shared_ptr<Gdiplus::Graphics>& rGraphics,
const ::com::sun::star::rendering::ViewState& rViewState,
const ::com::sun::star::rendering::RenderState& rRenderState,
const ::basegfx::B2ISize& rOutputOffset,
const ::com::sun::star::rendering::StringContext& rText,
const ::com::sun::star::uno::Sequence< double >& rLogicalAdvancements,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvasFont >& rCanvasFont,
const ::com::sun::star::geometry::Matrix2D& rFontMatrix,
const css::rendering::ViewState& rViewState,
const css::rendering::RenderState& rRenderState,
const ::basegfx::B2ISize& rOutputOffset,
const css::rendering::StringContext& rText,
const css::uno::Sequence< double >& rLogicalAdvancements,
const css::uno::Reference<
css::rendering::XCanvasFont >& rCanvasFont,
const css::geometry::Matrix2D& rFontMatrix,
bool bAlphaSurface );
::com::sun::star::geometry::RealRectangle2D queryTextBounds(
const ::com::sun::star::rendering::StringContext& rText,
const ::com::sun::star::uno::Sequence< double >& rLogicalAdvancements,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvasFont >& rCanvasFont,
const ::com::sun::star::geometry::Matrix2D& rFontMatrix );
css::geometry::RealRectangle2D queryTextBounds(
const css::rendering::StringContext& rText,
const css::uno::Sequence< double >& rLogicalAdvancements,
const css::uno::Reference<
css::rendering::XCanvasFont >& rCanvasFont,
const css::geometry::Matrix2D& rFontMatrix );
#ifdef DBG_UTIL
void test();
#endif
protected:
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XGraphicDevice > mxGraphicDevice;
css::uno::Reference< css::rendering::XGraphicDevice > mxGraphicDevice;
};
}
+2 -2
View File
@@ -43,8 +43,8 @@ namespace dxcanvas
};
bool drawVCLBitmapFromXBitmap( const ::boost::shared_ptr< Gdiplus::Graphics >& rGraphics,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap );
const css::uno::Reference<
css::rendering::XBitmap >& xBitmap );
}
}
+3 -3
View File
@@ -490,9 +490,9 @@ Reference<XInterface> CanvasFactory::createInstanceWithArguments(
} // anon namespace
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
com_sun_star_comp_rendering_CanvasFactory_get_implementation(::com::sun::star::uno::XComponentContext* context,
::com::sun::star::uno::Sequence<css::uno::Any> const &)
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
com_sun_star_comp_rendering_CanvasFactory_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const &)
{
return cppu::acquire(new CanvasFactory(context));
}
+14 -14
View File
@@ -48,33 +48,33 @@ namespace oglcanvas
Reference device this canvas is associated with
*/
void init( ::com::sun::star::rendering::XGraphicDevice& rDevice,
void init( css::rendering::XGraphicDevice& rDevice,
SpriteDeviceHelper& rDeviceHelper,
const ::com::sun::star::geometry::IntegerSize2D& rSize );
const css::geometry::IntegerSize2D& rSize );
// BitmapCanvasHelper functionality
// ================================
::com::sun::star::geometry::IntegerSize2D getSize() { return maSize; }
css::geometry::IntegerSize2D getSize() { return maSize; }
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > queryBitmapCanvas();
css::uno::Reference< css::rendering::XBitmapCanvas > queryBitmapCanvas();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
css::uno::Reference< css::rendering::XBitmap >
getScaledBitmap( const css::geometry::RealSize2D& newSize,
bool beFast );
::com::sun::star::uno::Sequence< sal_Int8 >
getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
css::uno::Sequence< sal_Int8 >
getData( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
::com::sun::star::uno::Sequence< sal_Int8 >
getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
css::uno::Sequence< sal_Int8 >
getPixel( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
::com::sun::star::rendering::IntegerBitmapLayout getMemoryLayout();
css::rendering::IntegerBitmapLayout getMemoryLayout();
private:
::com::sun::star::geometry::IntegerSize2D maSize;
css::geometry::IntegerSize2D maSize;
};
}
+3 -3
View File
@@ -29,8 +29,8 @@
namespace oglcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap > CanvasBitmapBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap > CanvasBitmapBase_Base;
typedef ::canvas::IntegerBitmapBase<
canvas::BitmapCanvasBase2<
::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
@@ -49,7 +49,7 @@ namespace oglcanvas
@param rDevice
Reference device, with which bitmap should be compatible
*/
CanvasBitmap( const ::com::sun::star::geometry::IntegerSize2D& rSize,
CanvasBitmap( const css::geometry::IntegerSize2D& rSize,
const SpriteCanvasRef& rDevice,
SpriteDeviceHelper& rDeviceHelper,
bool bHasAlpha );
@@ -31,7 +31,7 @@ using namespace ::com::sun::star;
namespace oglcanvas
{
CanvasCustomSprite::CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
CanvasCustomSprite::CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice,
SpriteDeviceHelper& rDeviceHelper ) :
mpSpriteCanvas( rRefDevice ),
+17 -18
View File
@@ -29,8 +29,8 @@
namespace oglcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCustomSprite,
::com::sun::star::rendering::XCanvas > CanvasCustomSpriteBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite,
css::rendering::XCanvas > CanvasCustomSpriteBase_Base;
typedef ::canvas::CanvasBase<
::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
CanvasHelper,
@@ -56,23 +56,23 @@ namespace oglcanvas
@param rDevice
Target DX device
*/
CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice,
SpriteDeviceHelper& rDeviceHelper );
virtual void disposeThis() SAL_OVERRIDE;
// XSprite
virtual void SAL_CALL setAlpha( double alpha ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL move( const ::com::sun::star::geometry::RealPoint2D& aNewPos, const ::com::sun::star::rendering::ViewState& viewState, const ::com::sun::star::rendering::RenderState& renderState ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL transform( const ::com::sun::star::geometry::AffineMatrix2D& aTransformation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL clip( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& aClip ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setPriority( double nPriority ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL show() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL hide() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setAlpha( double alpha ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL move( const css::geometry::RealPoint2D& aNewPos, const css::rendering::ViewState& viewState, const css::rendering::RenderState& renderState ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL transform( const css::geometry::AffineMatrix2D& aTransformation ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL clip( const css::uno::Reference< css::rendering::XPolyPolygon2D >& aClip ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setPriority( double nPriority ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL show() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL hide() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XCustomSprite
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas > SAL_CALL getContentCanvas() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XCanvas > SAL_CALL getContentCanvas() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
double getPriority() const { return mfPriority; }
@@ -84,14 +84,13 @@ namespace oglcanvas
raw pointer (without refcounting)
*/
SpriteCanvasRef mpSpriteCanvas;
const ::com::sun::star::geometry::RealSize2D maSize;
const css::geometry::RealSize2D maSize;
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D > mxClip;
::com::sun::star::geometry::AffineMatrix2D maTransformation;
::basegfx::B2DPoint maPosition;
double mfAlpha;
double mfPriority;
css::uno::Reference< css::rendering::XPolyPolygon2D > mxClip;
css::geometry::AffineMatrix2D maTransformation;
::basegfx::B2DPoint maPosition;
double mfAlpha;
double mfPriority;
};
}
+12 -12
View File
@@ -28,7 +28,7 @@ namespace oglcanvas
{
class SpriteCanvas;
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCanvasFont > CanvasFontBaseT;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont > CanvasFontBaseT;
class CanvasFont : public ::comphelper::OBaseMutex,
public CanvasFontBaseT,
@@ -37,25 +37,25 @@ namespace oglcanvas
public:
typedef rtl::Reference<CanvasFont> ImplRef;
CanvasFont( const ::com::sun::star::rendering::FontRequest& fontRequest,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& extraFontProperties,
const ::com::sun::star::geometry::Matrix2D& fontMatrix );
CanvasFont( const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties,
const css::geometry::Matrix2D& fontMatrix );
/// Dispose all internal references
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XCanvasFont
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > SAL_CALL createTextLayout( const ::com::sun::star::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::FontRequest SAL_CALL getFontRequest( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XTextLayout > SAL_CALL createTextLayout( const css::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::FontRequest SAL_CALL getFontRequest( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
const ::com::sun::star::geometry::Matrix2D& getFontMatrix() const { return maFontMatrix; }
const css::geometry::Matrix2D& getFontMatrix() const { return maFontMatrix; }
private:
::com::sun::star::rendering::FontRequest maFontRequest;
::com::sun::star::geometry::Matrix2D maFontMatrix;
css::rendering::FontRequest maFontRequest;
css::geometry::Matrix2D maFontMatrix;
};
}
+120 -120
View File
@@ -49,7 +49,7 @@ namespace oglcanvas
Reference device this canvas is associated with
*/
void init( ::com::sun::star::rendering::XGraphicDevice& rDevice,
void init( css::rendering::XGraphicDevice& rDevice,
SpriteDeviceHelper& rDeviceHelper );
// CanvasHelper functionality
@@ -58,127 +58,127 @@ namespace oglcanvas
// XCanvas (only providing, not implementing the
// interface. Also note subtle method parameter differences)
void clear();
void drawPoint( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::geometry::RealPoint2D& aPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
void drawLine( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::geometry::RealPoint2D& aStartPoint,
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
void drawBezier( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::geometry::RealBezierSegment2D& aBezierSegment,
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokePolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokeTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokeTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::uno::Reference<
::com::sun::star::geometry::XMapping2D >& xMapping,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
queryStrokeShapes( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::uno::Reference<
::com::sun::star::geometry::XMapping2D >& xMapping );
void drawPoint( const css::rendering::XCanvas* pCanvas,
const css::geometry::RealPoint2D& aPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
void drawLine( const css::rendering::XCanvas* pCanvas,
const css::geometry::RealPoint2D& aStartPoint,
const css::geometry::RealPoint2D& aEndPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
void drawBezier( const css::rendering::XCanvas* pCanvas,
const css::geometry::RealBezierSegment2D& aBezierSegment,
const css::geometry::RealPoint2D& aEndPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokePolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokeTexturedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokeTextureMappedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures,
const css::uno::Reference<
css::geometry::XMapping2D >& xMapping,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XPolyPolygon2D >
queryStrokeShapes( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillTexturedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillTextureMappedPolyPolygon( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures,
const css::uno::Reference<
css::geometry::XMapping2D >& xMapping );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL
createFont( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::rendering::FontRequest& fontRequest,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& extraFontProperties,
const ::com::sun::star::geometry::Matrix2D& fontMatrix );
css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL
createFont( const css::rendering::XCanvas* pCanvas,
const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence<
css::beans::PropertyValue >& extraFontProperties,
const css::geometry::Matrix2D& fontMatrix );
::com::sun::star::uno::Sequence< ::com::sun::star::rendering::FontInfo >
queryAvailableFonts( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::rendering::FontInfo& aFilter,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& aFontProperties );
css::uno::Sequence< css::rendering::FontInfo >
queryAvailableFonts( const css::rendering::XCanvas* pCanvas,
const css::rendering::FontInfo& aFilter,
const css::uno::Sequence<
css::beans::PropertyValue >& aFontProperties );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawText( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::rendering::StringContext& text,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvasFont >& xFont,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
css::uno::Reference< css::rendering::XCachedPrimitive >
drawText( const css::rendering::XCanvas* pCanvas,
const css::rendering::StringContext& text,
const css::uno::Reference<
css::rendering::XCanvasFont >& xFont,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
sal_Int8 textDirection );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawTextLayout( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XTextLayout >& layoutetText,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawTextLayout( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XTextLayout >& layoutetText,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawBitmap( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawBitmapModulated( const ::com::sun::star::rendering::XCanvas* pCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >
css::uno::Reference< css::rendering::XCachedPrimitive >
drawBitmap( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XBitmap >& xBitmap,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawBitmapModulated( const css::rendering::XCanvas* pCanvas,
const css::uno::Reference<
css::rendering::XBitmap >& xBitmap,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XGraphicDevice >
getDevice() { return css::uno::Reference< css::rendering::XGraphicDevice >(mpDevice); }
/** Write out recorded actions
@@ -190,7 +190,7 @@ namespace oglcanvas
size_t getRecordedActionCount() const;
SpriteDeviceHelper* getDeviceHelper() const { return mpDeviceHelper; }
::com::sun::star::rendering::XGraphicDevice* getDevice() const { return mpDevice; }
css::rendering::XGraphicDevice* getDevice() const { return mpDevice; }
struct Action;
typedef o3tl::cow_wrapper< std::vector<Action>,
@@ -200,15 +200,15 @@ namespace oglcanvas
CanvasHelper( const CanvasHelper& ) SAL_DELETED_FUNCTION;
void setupGraphicsState( Action& o_action,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
/** Phyical output device
Deliberately not a refcounted reference, because of
potential circular references for spritecanvas.
*/
::com::sun::star::rendering::XGraphicDevice* mpDevice;
css::rendering::XGraphicDevice* mpDevice;
/** Internal helper - used for a few global GL objects,
e.g. shader programs; and caches
+1 -1
View File
@@ -28,7 +28,7 @@ namespace oglcanvas
void setupState( const ::basegfx::B2DHomMatrix& rTransform,
unsigned int eSrcBlend,
unsigned int eDstBlend,
const ::com::sun::star::rendering::ARGBColor& rColor );
const com::sun::star::rendering::ARGBColor& rColor );
void renderOSD( const std::vector<double>& rNumbers, double scale );
}
+22 -22
View File
@@ -36,14 +36,14 @@ namespace oglcanvas
{
class CanvasCustomSprite;
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XSpriteCanvas,
::com::sun::star::rendering::XGraphicDevice,
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::rendering::XBufferController,
::com::sun::star::awt::XWindowListener,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XSpriteCanvas,
css::rendering::XGraphicDevice,
css::lang::XMultiServiceFactory,
css::rendering::XBufferController,
css::awt::XWindowListener,
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName > WindowGraphicDeviceBase_Base;
typedef ::canvas::BufferedGraphicDeviceBase<
::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
@@ -67,10 +67,10 @@ namespace oglcanvas
class SpriteCanvas : public SpriteCanvasBaseT
{
public:
SpriteCanvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
SpriteCanvas( const css::uno::Sequence<
css::uno::Any >& aArguments,
const css::uno::Reference<
css::uno::XComponentContext >& rxContext );
void initialize();
@@ -85,20 +85,20 @@ namespace oglcanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( SpriteCanvas, WindowGraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase )
// XBufferController (partial)
virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XSpriteCanvas
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimatedSprite > SAL_CALL createSpriteFromAnimation( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimation >& animation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimatedSprite > SAL_CALL createSpriteFromBitmaps( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > >& animationBitmaps, ::sal_Int8 interpolationMode ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCustomSprite > SAL_CALL createCustomSprite( const ::com::sun::star::geometry::RealSize2D& spriteSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite > SAL_CALL createClonedSprite( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite >& original ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XAnimatedSprite > SAL_CALL createSpriteFromAnimation( const css::uno::Reference< css::rendering::XAnimation >& animation ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XAnimatedSprite > SAL_CALL createSpriteFromBitmaps( const css::uno::Sequence< css::uno::Reference< css::rendering::XBitmap > >& animationBitmaps, ::sal_Int8 interpolationMode ) throw (css::lang::IllegalArgumentException, css::rendering::VolatileContentDestroyedException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XCustomSprite > SAL_CALL createCustomSprite( const css::geometry::RealSize2D& spriteSize ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XSprite > SAL_CALL createClonedSprite( const css::uno::Reference< css::rendering::XSprite >& original ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL updateScreen( sal_Bool bUpdateAll )
throw (::com::sun::star::uno::RuntimeException,
throw (css::uno::RuntimeException,
std::exception) SAL_OVERRIDE;
// XServiceName
virtual ::rtl::OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::rtl::OUString SAL_CALL getServiceName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
void show( const ::rtl::Reference< CanvasCustomSprite >& );
void hide( const ::rtl::Reference< CanvasCustomSprite >& );
@@ -108,8 +108,8 @@ namespace oglcanvas
bool renderRecordedActions() const;
private:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
css::uno::Sequence< css::uno::Any > maArguments;
css::uno::Reference< css::uno::XComponentContext > mxComponentContext;
};
typedef ::rtl::Reference< SpriteCanvas > SpriteCanvasRef;
@@ -348,7 +348,7 @@ namespace oglcanvas
uno::Any SpriteDeviceHelper::isAccelerated() const
{
return ::com::sun::star::uno::makeAny(false);
return css::uno::makeAny(false);
}
uno::Any SpriteDeviceHelper::getDeviceHandle() const
+36 -36
View File
@@ -43,45 +43,45 @@ namespace oglcanvas
SpriteDeviceHelper();
~SpriteDeviceHelper();
void init( vcl::Window& rWindow,
void init( vcl::Window& rWindow,
SpriteCanvas& rSpriteCanvas,
const ::com::sun::star::awt::Rectangle& rViewArea );
const css::awt::Rectangle& rViewArea );
/// Dispose all internal references
void disposing();
// XWindowGraphicDevice
::com::sun::star::geometry::RealSize2D getPhysicalResolution();
::com::sun::star::geometry::RealSize2D getPhysicalSize();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& points );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& points );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
css::geometry::RealSize2D getPhysicalResolution();
css::geometry::RealSize2D getPhysicalSize();
css::uno::Reference< css::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > >& points );
css::uno::Reference< css::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > >& points );
css::uno::Reference< css::rendering::XBitmap > createCompatibleBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XBitmap > createCompatibleAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
bool showBuffer( bool bIsVisible, bool bUpdateAll );
bool switchBuffer( bool bIsVisible, bool bUpdateAll );
::com::sun::star::uno::Any isAccelerated() const;
::com::sun::star::uno::Any getDeviceHandle() const;
::com::sun::star::uno::Any getSurfaceHandle() const;
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XColorSpace > getColorSpace() const;
css::uno::Any isAccelerated() const;
css::uno::Any getDeviceHandle() const;
css::uno::Any getSurfaceHandle() const;
css::uno::Reference<
css::rendering::XColorSpace > getColorSpace() const;
void notifySizeUpdate( const ::com::sun::star::awt::Rectangle& rBounds );
void notifySizeUpdate( const css::awt::Rectangle& rBounds );
/** called when DumpScreenContent property is enabled on
XGraphicDevice, and writes out bitmaps of current screen.
@@ -92,16 +92,16 @@ namespace oglcanvas
void hide( const ::rtl::Reference< CanvasCustomSprite >& );
/// enable linear gradient shader "texture" with given parameters
void useLinearGradientShader( const ::com::sun::star::rendering::ARGBColor* pColors,
const ::com::sun::star::uno::Sequence< double >& rStops,
void useLinearGradientShader( const css::rendering::ARGBColor* pColors,
const css::uno::Sequence< double >& rStops,
const ::basegfx::B2DHomMatrix& rTexTransform );
/// enable radial gradient shader "texture" with given parameters
void useRadialGradientShader( const ::com::sun::star::rendering::ARGBColor* pColors,
const ::com::sun::star::uno::Sequence< double >& rStops,
void useRadialGradientShader( const css::rendering::ARGBColor* pColors,
const css::uno::Sequence< double >& rStops,
const ::basegfx::B2DHomMatrix& rTexTransform );
/// enable rectangular gradient shader "texture" with given parameters
void useRectangularGradientShader( const ::com::sun::star::rendering::ARGBColor* pColors,
const ::com::sun::star::uno::Sequence< double >& rStops,
void useRectangularGradientShader( const css::rendering::ARGBColor* pColors,
const css::uno::Sequence< double >& rStops,
const ::basegfx::B2DHomMatrix& rTexTransform );
/// create a pbuffer context (for rendering into background surface)
@@ -121,7 +121,7 @@ namespace oglcanvas
potential circular references for canvas. Needed to
create bitmaps
*/
com::sun::star::rendering::XGraphicDevice* mpDevice;
css::rendering::XGraphicDevice* mpDevice;
/// Pointer to sprite canvas (owner of this helper), needed to create bitmaps
SpriteCanvas* mpSpriteCanvas;
@@ -140,7 +140,7 @@ namespace oglcanvas
unsigned int mnRectangularTwoColorGradientProgram;
unsigned int mnRectangularMultiColorGradientProgram;
OpenGLContext maContext;
OpenGLContext maContext;
};
}
+25 -25
View File
@@ -26,14 +26,14 @@
namespace oglcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XTextLayout > TextLayoutBaseT;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout > TextLayoutBaseT;
class TextLayout : public ::comphelper::OBaseMutex,
public TextLayoutBaseT,
private ::boost::noncopyable
{
public:
TextLayout( const ::com::sun::star::rendering::StringContext& aText,
TextLayout( const css::rendering::StringContext& aText,
sal_Int8 nDirection,
sal_Int64 nRandomSeed,
const CanvasFont::ImplRef& rFont );
@@ -42,32 +42,32 @@ namespace oglcanvas
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XTextLayout
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL applyLogicalAdvancements( const ::com::sun::star::uno::Sequence< double >& aAdvancements ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::geometry::RealRectangle2D SAL_CALL queryTextBounds( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL justify( double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL combinedJustify( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > >& aNextLayouts, double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::TextHit SAL_CALL getTextHit( const ::com::sun::star::geometry::RealPoint2D& aHitPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL getBaselineOffset( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int8 SAL_CALL getMainTextDirection( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::StringContext SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::uno::Reference< css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL applyLogicalAdvancements( const css::uno::Sequence< double >& aAdvancements ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::geometry::RealRectangle2D SAL_CALL queryTextBounds( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL justify( double nSize ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL combinedJustify( const css::uno::Sequence< css::uno::Reference< css::rendering::XTextLayout > >& aNextLayouts, double nSize ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::TextHit SAL_CALL getTextHit( const css::geometry::RealPoint2D& aHitPoint ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL getBaselineOffset( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int8 SAL_CALL getMainTextDirection( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::StringContext SAL_CALL getText( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
bool draw( const ::com::sun::star::rendering::ViewState& rViewState,
const ::com::sun::star::rendering::RenderState& rRenderState,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice ) const;
bool draw( const css::rendering::ViewState& rViewState,
const css::rendering::RenderState& rRenderState,
const css::uno::Reference<
css::rendering::XGraphicDevice >& xGraphicDevice ) const;
private:
::com::sun::star::rendering::StringContext maText;
::com::sun::star::uno::Sequence< double > maLogicalAdvancements;
css::rendering::StringContext maText;
css::uno::Sequence< double > maLogicalAdvancements;
CanvasFont::ImplRef mpFont;
sal_Int8 mnTextDirection;
};
+1 -1
View File
@@ -42,7 +42,7 @@ namespace oglcanvas
sal_uInt32 getCacheMissCount() const { return mnMissCount; }
sal_uInt32 getCacheHitCount() const { return mnHitCount; }
unsigned int getTexture( const ::com::sun::star::geometry::IntegerSize2D& rPixelSize,
unsigned int getTexture( const css::geometry::IntegerSize2D& rPixelSize,
const sal_Int8* pPixel,
sal_uInt32 nPixelCrc32) const;
private:
@@ -106,8 +106,8 @@ namespace
};
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XSimpleCanvas,
::com::sun::star::lang::XServiceName > SimpleCanvasBase;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XSimpleCanvas,
css::lang::XServiceName > SimpleCanvasBase;
class SimpleCanvasImpl : private cppu::BaseMutex,
public SimpleCanvasBase
+2 -2
View File
@@ -220,7 +220,7 @@ namespace canvas
namespace
{
class StandardColorSpace : public cppu::WeakImplHelper< com::sun::star::rendering::XIntegerBitmapColorSpace >
class StandardColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
{
private:
uno::Sequence< sal_Int8 > maComponentTags;
@@ -558,7 +558,7 @@ namespace canvas
}
};
class StandardNoAlphaColorSpace : public cppu::WeakImplHelper< com::sun::star::rendering::XIntegerBitmapColorSpace >
class StandardNoAlphaColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
{
private:
uno::Sequence< sal_Int8 > maComponentTags;
+2 -2
View File
@@ -655,7 +655,7 @@ namespace canvas
aRect.getMinY() < 0 ||
aRect.getMaxY() > size.Height )
{
throw ::com::sun::star::lang::IndexOutOfBoundsException();
throw css::lang::IndexOutOfBoundsException();
}
}
@@ -667,7 +667,7 @@ namespace canvas
pos.Y < 0 ||
pos.Y > size.Height )
{
throw ::com::sun::star::lang::IndexOutOfBoundsException();
throw css::lang::IndexOutOfBoundsException();
}
}
+12 -14
View File
@@ -43,27 +43,25 @@ namespace vclcanvas
const ::Point& rPoint,
const ::Size& rSize,
const GraphicAttr& rAttr,
const ::com::sun::star::rendering::ViewState& rUsedViewState,
const ::com::sun::star::rendering::RenderState& rUsedRenderState,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvas >& rTarget );
const css::rendering::ViewState& rUsedViewState,
const css::rendering::RenderState& rUsedRenderState,
const css::uno::Reference< css::rendering::XCanvas >& rTarget );
/// Dispose all internal references
virtual void SAL_CALL disposing() SAL_OVERRIDE;
private:
virtual ::sal_Int8 doRedraw( const ::com::sun::star::rendering::ViewState& rNewState,
const ::com::sun::star::rendering::ViewState& rOldState,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvas >& rTargetCanvas,
bool bSameViewTransform ) SAL_OVERRIDE;
virtual ::sal_Int8 doRedraw( const css::rendering::ViewState& rNewState,
const css::rendering::ViewState& rOldState,
const css::uno::Reference< css::rendering::XCanvas >& rTargetCanvas,
bool bSameViewTransform ) SAL_OVERRIDE;
GraphicObjectSharedPtr mpGraphicObject;
const ::com::sun::star::rendering::RenderState maRenderState;
const ::Point maPoint;
const ::Size maSize;
const GraphicAttr maAttributes;
GraphicObjectSharedPtr mpGraphicObject;
const css::rendering::RenderState maRenderState;
const ::Point maPoint;
const ::Size maSize;
const GraphicAttr maAttributes;
};
}
+1 -1
View File
@@ -130,7 +130,7 @@ namespace vclcanvas
CanvasBaseT::disposeThis();
}
OUString SAL_CALL Canvas::getServiceName( ) throw (::com::sun::star::uno::RuntimeException, std::exception)
OUString SAL_CALL Canvas::getServiceName( ) throw (css::uno::RuntimeException, std::exception)
{
return OUString( CANVAS_SERVICE_NAME );
}
+16 -16
View File
@@ -48,13 +48,13 @@
namespace vclcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::rendering::XGraphicDevice,
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::rendering::XGraphicDevice,
css::lang::XMultiServiceFactory,
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName > GraphicDeviceBase_Base;
typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
DeviceHelper,
tools::LocalGuard,
@@ -79,10 +79,10 @@ namespace vclcanvas
public RepaintTarget
{
public:
Canvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
Canvas( const css::uno::Sequence<
css::uno::Any >& aArguments,
const css::uno::Reference<
css::uno::XComponentContext >& rxContext );
void initialize();
@@ -100,19 +100,19 @@ namespace vclcanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas, GraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceName
virtual OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getServiceName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// RepaintTarget
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const com::sun::star::rendering::ViewState& viewState,
const com::sun::star::rendering::RenderState& renderState,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const SAL_OVERRIDE;
private:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
css::uno::Sequence< css::uno::Any > maArguments;
css::uno::Reference< css::uno::XComponentContext > mxComponentContext;
};
typedef ::rtl::Reference< Canvas > CanvasRef;
+14 -14
View File
@@ -45,10 +45,10 @@
namespace vclcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo,
css::beans::XFastPropertySet > CanvasBitmapBase_Base;
typedef ::canvas::IntegerBitmapBase<
canvas::BitmapCanvasBase2<
::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
@@ -73,23 +73,23 @@ namespace vclcanvas
*/
CanvasBitmap( const ::Size& rSize,
bool bAlphaBitmap,
::com::sun::star::rendering::XGraphicDevice& rDevice,
css::rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider );
/// Must be called with locked Solar mutex
CanvasBitmap( const BitmapEx& rBitmap,
::com::sun::star::rendering::XGraphicDevice& rDevice,
css::rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider );
// XServiceInfo
virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// RepaintTarget interface
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const SAL_OVERRIDE;
@@ -107,14 +107,14 @@ namespace vclcanvas
// 1st a bool value: true - free the pixmap after used by XFreePixmap, false do nothing, the pixmap is used internally in the canvas
// 2nd the pixmap handle
// 3rd the pixmap depth
virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const ::com::sun::star::uno::Any&) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {}
virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const css::uno::Any&) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE {}
private:
/** MUST hold here, too, since CanvasHelper only contains a
raw pointer (without refcounting)
*/
::com::sun::star::uno::Reference<com::sun::star::rendering::XGraphicDevice> mxDevice;
css::uno::Reference<css::rendering::XGraphicDevice> mxDevice;
};
}
+18 -18
View File
@@ -69,7 +69,7 @@ namespace vclcanvas
Reference output device. Used to create matching bitmap.
*/
void init( const BitmapEx& rBitmap,
::com::sun::star::rendering::XGraphicDevice& rDevice,
css::rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider );
@@ -80,31 +80,31 @@ namespace vclcanvas
void clear();
::com::sun::star::geometry::IntegerSize2D getSize();
css::geometry::IntegerSize2D getSize();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > queryBitmapCanvas();
css::uno::Reference< css::rendering::XBitmapCanvas > queryBitmapCanvas();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
css::uno::Reference< css::rendering::XBitmap >
getScaledBitmap( const css::geometry::RealSize2D& newSize,
bool beFast );
::com::sun::star::uno::Sequence< sal_Int8 >
getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
css::uno::Sequence< sal_Int8 >
getData( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
void setData( const css::uno::Sequence< sal_Int8 >& data,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
void setPixel( const css::uno::Sequence< sal_Int8 >& color,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
::com::sun::star::uno::Sequence< sal_Int8 >
getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
css::uno::Sequence< sal_Int8 >
getPixel( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
::com::sun::star::rendering::IntegerBitmapLayout getMemoryLayout();
css::rendering::IntegerBitmapLayout getMemoryLayout();
/// @internal
BitmapEx getBitmap() const;
+11 -11
View File
@@ -47,10 +47,10 @@
namespace vclcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCustomSprite,
::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite,
css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
/** Mixin Sprite
Have to mixin the Sprite interface before deriving from
@@ -85,8 +85,8 @@ namespace vclcanvas
public RepaintTarget
{
public:
CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
::com::sun::star::rendering::XGraphicDevice& rDevice,
CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
css::rendering::XGraphicDevice& rDevice,
const ::canvas::SpriteSurface::Reference& rOwningSpriteCanvas,
const OutDevProviderSharedPtr& rOutDevProvider,
bool bShowSpriteBounds );
@@ -99,9 +99,9 @@ namespace vclcanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasCustomSprite, CanvasCustomSpriteBase_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
// Sprite
virtual void redraw( OutputDevice& rOutDev,
@@ -112,8 +112,8 @@ namespace vclcanvas
// RepaintTarget
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const SAL_OVERRIDE;
+2 -2
View File
@@ -50,8 +50,8 @@ namespace vclcanvas
mpOutDevProvider( rOutDevProvider )
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
maFont->SetVertical( rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
maFont->SetVertical( rFontRequest.FontDescription.IsVertical==css::util::TriState_YES );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
+18 -18
View File
@@ -43,8 +43,8 @@
namespace vclcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCanvasFont,
::com::sun::star::lang::XServiceInfo > CanvasFont_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont,
css::lang::XServiceInfo > CanvasFont_Base;
class CanvasFont : public ::comphelper::OBaseMutex,
public CanvasFont_Base,
@@ -53,34 +53,34 @@ namespace vclcanvas
public:
typedef rtl::Reference<CanvasFont> Reference;
CanvasFont( const ::com::sun::star::rendering::FontRequest& fontRequest,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& extraFontProperties,
const ::com::sun::star::geometry::Matrix2D& rFontMatrix,
::com::sun::star::rendering::XGraphicDevice& rDevice,
CanvasFont( const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties,
const css::geometry::Matrix2D& rFontMatrix,
css::rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider );
/// Dispose all internal references
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XCanvasFont
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > SAL_CALL createTextLayout( const ::com::sun::star::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::FontRequest SAL_CALL getFontRequest( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XTextLayout > SAL_CALL createTextLayout( const css::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::FontRequest SAL_CALL getFontRequest( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
vcl::Font getVCLFont() const;
private:
::canvas::vcltools::VCLObject<vcl::Font> maFont;
::com::sun::star::rendering::FontRequest maFontRequest;
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice> mpRefDevice;
OutDevProviderSharedPtr mpOutDevProvider;
::canvas::vcltools::VCLObject<vcl::Font> maFont;
css::rendering::FontRequest maFontRequest;
css::uno::Reference< css::rendering::XGraphicDevice> mpRefDevice;
OutDevProviderSharedPtr mpOutDevProvider;
};
}
+149 -149
View File
@@ -76,7 +76,7 @@ namespace vclcanvas
@param bHaveAlpha
When true, hasAlpha() will always return true, otherwise, false.
*/
void init( ::com::sun::star::rendering::XGraphicDevice& rDevice,
void init( css::rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDev,
bool bProtect,
bool bHaveAlpha );
@@ -102,165 +102,165 @@ namespace vclcanvas
// XCanvas (only providing, not implementing the
// interface. Also note subtle method parameter differences)
void clear();
void drawPoint( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::geometry::RealPoint2D& aPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
void drawLine( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::geometry::RealPoint2D& aStartPoint,
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
void drawBezier( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::geometry::RealBezierSegment2D& aBezierSegment,
const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokePolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokeTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
strokeTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::uno::Reference<
::com::sun::star::geometry::XMapping2D >& xMapping,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
queryStrokeShapes( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
fillTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Sequence<
::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::uno::Reference<
::com::sun::star::geometry::XMapping2D >& xMapping );
void drawPoint( const css::rendering::XCanvas* rCanvas,
const css::geometry::RealPoint2D& aPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
void drawLine( const css::rendering::XCanvas* rCanvas,
const css::geometry::RealPoint2D& aStartPoint,
const css::geometry::RealPoint2D& aEndPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
void drawBezier( const css::rendering::XCanvas* rCanvas,
const css::geometry::RealBezierSegment2D& aBezierSegment,
const css::geometry::RealPoint2D& aEndPoint,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawPolyPolygon( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokePolyPolygon( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokeTexturedPolyPolygon( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
strokeTextureMappedPolyPolygon( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures,
const css::uno::Reference<
css::geometry::XMapping2D >& xMapping,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XPolyPolygon2D >
queryStrokeShapes( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::rendering::StrokeAttributes& strokeAttributes );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillPolyPolygon( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillTexturedPolyPolygon( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures );
css::uno::Reference< css::rendering::XCachedPrimitive >
fillTextureMappedPolyPolygon( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XPolyPolygon2D >& xPolyPolygon,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Sequence<
css::rendering::Texture >& textures,
const css::uno::Reference<
css::geometry::XMapping2D >& xMapping );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont >
createFont( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::rendering::FontRequest& fontRequest,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& extraFontProperties,
const ::com::sun::star::geometry::Matrix2D& fontMatrix );
css::uno::Reference< css::rendering::XCanvasFont >
createFont( const css::rendering::XCanvas* rCanvas,
const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence<
css::beans::PropertyValue >& extraFontProperties,
const css::geometry::Matrix2D& fontMatrix );
::com::sun::star::uno::Sequence< ::com::sun::star::rendering::FontInfo >
queryAvailableFonts( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::rendering::FontInfo& aFilter,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& aFontProperties );
css::uno::Sequence< css::rendering::FontInfo >
queryAvailableFonts( const css::rendering::XCanvas* rCanvas,
const css::rendering::FontInfo& aFilter,
const css::uno::Sequence<
css::beans::PropertyValue >& aFontProperties );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawText( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::rendering::StringContext& text,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvasFont >& xFont,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
css::uno::Reference< css::rendering::XCachedPrimitive >
drawText( const css::rendering::XCanvas* rCanvas,
const css::rendering::StringContext& text,
const css::uno::Reference<
css::rendering::XCanvasFont >& xFont,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
sal_Int8 textDirection );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawTextLayout( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XTextLayout >& laidOutText,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawTextLayout( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XTextLayout >& laidOutText,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawBitmap( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
drawBitmapModulated( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawBitmap( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XBitmap >& xBitmap,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
css::uno::Reference< css::rendering::XCachedPrimitive >
drawBitmapModulated( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XBitmap >& xBitmap,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState );
// cast away const, need to change refcount (as this is
// ~invisible to client code, still logically const)
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >
css::uno::Reference< css::rendering::XGraphicDevice >
getDevice() { return css::uno::Reference< css::rendering::XGraphicDevice >(mpDevice); }
// BitmapCanvasHelper functionality
// ================================
::com::sun::star::geometry::IntegerSize2D getSize();
css::geometry::IntegerSize2D getSize();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > queryBitmapCanvas();
css::uno::Reference< css::rendering::XBitmapCanvas > queryBitmapCanvas();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
bool beFast );
css::uno::Reference< css::rendering::XBitmap >
getScaledBitmap( const css::geometry::RealSize2D& newSize,
bool beFast );
::com::sun::star::uno::Sequence< sal_Int8 >
getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
css::uno::Sequence< sal_Int8 >
getData( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerRectangle2D& rect );
void setData( const css::uno::Sequence< sal_Int8 >& data,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerRectangle2D& rect );
void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
void setPixel( const css::uno::Sequence< sal_Int8 >& color,
const css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
::com::sun::star::uno::Sequence< sal_Int8 >
getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
css::uno::Sequence< sal_Int8 >
getPixel( css::rendering::IntegerBitmapLayout& bitmapLayout,
const css::geometry::IntegerPoint2D& pos );
::com::sun::star::rendering::IntegerBitmapLayout getMemoryLayout();
css::rendering::IntegerBitmapLayout getMemoryLayout();
/// Repaint a cached bitmap
bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const;
@@ -279,9 +279,9 @@ namespace vclcanvas
};
// returns transparency of color
int setupOutDevState( const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
ColorType eColorType ) const;
int setupOutDevState( const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
ColorType eColorType ) const;
bool hasAlpha() const { return mbHaveAlpha; }
@@ -291,7 +291,7 @@ namespace vclcanvas
Deliberately not a refcounted reference, because of
potential circular references for spritecanvas.
*/
::com::sun::star::rendering::XGraphicDevice* mpDevice;
css::rendering::XGraphicDevice* mpDevice;
/// Rendering to this outdev preserves its state
OutDevProviderSharedPtr mpProtectedOutDev;
@@ -306,18 +306,18 @@ namespace vclcanvas
bool mbHaveAlpha;
private:
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
implDrawBitmap( const ::com::sun::star::rendering::XCanvas* rCanvas,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& xBitmap,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
css::uno::Reference< css::rendering::XCachedPrimitive >
implDrawBitmap( const css::rendering::XCanvas* rCanvas,
const css::uno::Reference<
css::rendering::XBitmap >& xBitmap,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
bool bModulateColors );
bool setupTextOutput( ::Point& o_rOutPos,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont >& xFont ) const;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const css::uno::Reference< css::rendering::XCanvasFont >& xFont ) const;
};
}
+1 -1
View File
@@ -157,7 +157,7 @@ namespace vclcanvas
uno::Any DeviceHelper::isAccelerated() const
{
return ::com::sun::star::uno::makeAny(false);
return css::uno::makeAny(false);
}
uno::Any DeviceHelper::getDeviceHandle() const
+25 -25
View File
@@ -48,32 +48,32 @@ namespace vclcanvas
void disposing();
// XWindowGraphicDevice
::com::sun::star::geometry::RealSize2D getPhysicalResolution();
::com::sun::star::geometry::RealSize2D getPhysicalSize();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& points );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& points );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::geometry::IntegerSize2D& size );
css::geometry::RealSize2D getPhysicalResolution();
css::geometry::RealSize2D getPhysicalSize();
css::uno::Reference< css::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealPoint2D > >& points );
css::uno::Reference< css::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::uno::Sequence< css::uno::Sequence< css::geometry::RealBezierSegment2D > >& points );
css::uno::Reference< css::rendering::XBitmap > createCompatibleBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XBitmap > createCompatibleAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
css::uno::Reference< css::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
const css::uno::Reference< css::rendering::XGraphicDevice >& rDevice,
const css::geometry::IntegerSize2D& size );
::com::sun::star::uno::Any isAccelerated() const;
::com::sun::star::uno::Any getDeviceHandle() const;
::com::sun::star::uno::Any getSurfaceHandle() const;
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XColorSpace > getColorSpace() const;
css::uno::Any isAccelerated() const;
css::uno::Any getDeviceHandle() const;
css::uno::Any getSurfaceHandle() const;
css::uno::Reference<
css::rendering::XColorSpace > getColorSpace() const;
OutDevProviderSharedPtr getOutDev() const { return mpOutDev; }
+13 -13
View File
@@ -78,18 +78,18 @@ namespace vclcanvas
namespace tools
{
::BitmapEx
bitmapExFromXBitmap( const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& );
bitmapExFromXBitmap( const css::uno::Reference<
css::rendering::XBitmap >& );
/** Setup VCL font and output position
@returns false, if no text output should happen
*/
bool setupFontTransform( ::Point& o_rPoint,
vcl::Font& io_rVCLFont,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
::OutputDevice& rOutDev );
bool setupFontTransform( ::Point& o_rPoint,
vcl::Font& io_rVCLFont,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
::OutputDevice& rOutDev );
/** Predicate, to determine whether polygon is actually an axis-aligned rectangle
@@ -163,13 +163,13 @@ namespace vclcanvas
const AntialiasingFlags mnAntiAliasing;
};
::Point mapRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& rPoint,
const ::com::sun::star::rendering::ViewState& rViewState,
const ::com::sun::star::rendering::RenderState& rRenderState );
::Point mapRealPoint2D( const css::geometry::RealPoint2D& rPoint,
const css::rendering::ViewState& rViewState,
const css::rendering::RenderState& rRenderState );
::tools::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
const ::com::sun::star::rendering::ViewState& rViewState,
const ::com::sun::star::rendering::RenderState& rRenderState );
const css::rendering::ViewState& rViewState,
const css::rendering::RenderState& rRenderState );
enum ModulationMode
{
@@ -179,7 +179,7 @@ namespace vclcanvas
::BitmapEx transformBitmap( const BitmapEx& rBitmap,
const ::basegfx::B2DHomMatrix& rTransform,
const ::com::sun::star::uno::Sequence< double >& rDeviceColor,
const css::uno::Sequence< double >& rDeviceColor,
ModulationMode eModulationMode );
}
+2 -2
View File
@@ -44,8 +44,8 @@ namespace vclcanvas
// call this when a bitmap is repainted
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const = 0;
+1 -1
View File
@@ -151,7 +151,7 @@ namespace vclcanvas
mbSurfaceDirty);
}
OUString SAL_CALL SpriteCanvas::getServiceName( ) throw (::com::sun::star::uno::RuntimeException, std::exception)
OUString SAL_CALL SpriteCanvas::getServiceName( ) throw (css::uno::RuntimeException, std::exception)
{
return OUString( SPRITECANVAS_SERVICE_NAME );
}
+21 -21
View File
@@ -50,15 +50,15 @@
namespace vclcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XSpriteCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::rendering::XGraphicDevice,
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::rendering::XBufferController,
::com::sun::star::awt::XWindowListener,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XSpriteCanvas,
css::rendering::XIntegerBitmap,
css::rendering::XGraphicDevice,
css::lang::XMultiServiceFactory,
css::rendering::XBufferController,
css::awt::XWindowListener,
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName > WindowGraphicDeviceBase_Base;
typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
tools::LocalGuard,
@@ -104,10 +104,10 @@ namespace vclcanvas
public RepaintTarget
{
public:
SpriteCanvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
SpriteCanvas( const css::uno::Sequence<
css::uno::Any >& aArguments,
const css::uno::Reference<
css::uno::XComponentContext >& rxContext );
void initialize();
@@ -125,19 +125,19 @@ namespace vclcanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( SpriteCanvas, WindowGraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase )
// XBufferController (partial)
virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL showBuffer( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL switchBuffer( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException) SAL_OVERRIDE;
// XSpriteCanvas (partial)
virtual sal_Bool SAL_CALL updateScreen( sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL updateScreen( sal_Bool bUpdateAll ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceName
virtual OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getServiceName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// RepaintTarget
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState,
const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const SAL_OVERRIDE;
@@ -148,8 +148,8 @@ namespace vclcanvas
BackBufferSharedPtr getBackBuffer() const { return maDeviceHelper.getBackBuffer(); }
private:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
css::uno::Sequence< css::uno::Any > maArguments;
css::uno::Reference< css::uno::XComponentContext > mxComponentContext;
};
typedef ::rtl::Reference< SpriteCanvas > SpriteCanvasRef;
+20 -20
View File
@@ -53,24 +53,24 @@ namespace vclcanvas
void disposing();
// XSpriteCanvas
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XAnimatedSprite > createSpriteFromAnimation(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimation >& animation );
css::uno::Reference<
css::rendering::XAnimatedSprite > createSpriteFromAnimation(
const css::uno::Reference< css::rendering::XAnimation >& animation );
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XAnimatedSprite > createSpriteFromBitmaps(
const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap > >& animationBitmaps,
css::uno::Reference<
css::rendering::XAnimatedSprite > createSpriteFromBitmaps(
const css::uno::Sequence<
css::uno::Reference<
css::rendering::XBitmap > >& animationBitmaps,
sal_Int8 interpolationMode );
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCustomSprite > createCustomSprite(
const ::com::sun::star::geometry::RealSize2D& spriteSize );
css::uno::Reference<
css::rendering::XCustomSprite > createCustomSprite(
const css::geometry::RealSize2D& spriteSize );
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XSprite > createClonedSprite(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite >& original );
css::uno::Reference<
css::rendering::XSprite > createClonedSprite(
const css::uno::Reference< css::rendering::XSprite >& original );
/** Actually perform the screen update
@@ -118,20 +118,20 @@ namespace vclcanvas
void genericUpdate( const ::basegfx::B2DRange& rTotalArea,
const ::std::vector< ::canvas::Sprite::Reference >& rSortedUpdateSprites );
::com::sun::star::uno::Any isUnsafeScrolling() const
css::uno::Any isUnsafeScrolling() const
{
return ::com::sun::star::uno::makeAny(mbIsUnsafeScrolling);
return css::uno::makeAny(mbIsUnsafeScrolling);
}
void enableUnsafeScrolling( const ::com::sun::star::uno::Any& rAny )
void enableUnsafeScrolling( const css::uno::Any& rAny )
{
mbIsUnsafeScrolling = rAny.get<bool>();
}
::com::sun::star::uno::Any isSpriteBounds() const
css::uno::Any isSpriteBounds() const
{
return ::com::sun::star::uno::makeAny(mbShowSpriteBounds);
return css::uno::makeAny(mbShowSpriteBounds);
}
void enableSpriteBounds( const ::com::sun::star::uno::Any& rAny )
void enableSpriteBounds( const css::uno::Any& rAny )
{
mbShowSpriteBounds = rAny.get<bool>();
}
+4 -4
View File
@@ -51,14 +51,14 @@ namespace vclcanvas
bool showBuffer( bool bWindowVisible, bool bUpdateAll );
bool switchBuffer( bool bWindowVisible, bool bUpdateAll );
::com::sun::star::uno::Any isAccelerated() const;
::com::sun::star::uno::Any getDeviceHandle() const;
::com::sun::star::uno::Any getSurfaceHandle() const;
css::uno::Any isAccelerated() const;
css::uno::Any getDeviceHandle() const;
css::uno::Any getSurfaceHandle() const;
void dumpScreenContent() const;
BackBufferSharedPtr getBackBuffer() const { return mpBackBuffer; }
void notifySizeUpdate( const ::com::sun::star::awt::Rectangle& rBounds );
void notifySizeUpdate( const css::awt::Rectangle& rBounds );
private:
/// This buffer holds the background content for all associated canvases
+2 -2
View File
@@ -66,7 +66,7 @@ namespace vclcanvas
@param rBackBufferMask
Buffer of the sprite content (alpha part)
*/
void init( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
void init( const css::geometry::RealSize2D& rSpriteSize,
const ::canvas::SpriteSurface::Reference& rOwningSpriteCanvas,
const BackBufferSharedPtr& rBackBuffer,
const BackBufferSharedPtr& rBackBufferMask,
@@ -95,7 +95,7 @@ namespace vclcanvas
private:
virtual ::basegfx::B2DPolyPolygon polyPolygonFromXPolyPolygon2D(
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPoly ) const SAL_OVERRIDE;
css::uno::Reference< css::rendering::XPolyPolygon2D >& xPoly ) const SAL_OVERRIDE;
// for the redraw
BackBufferSharedPtr mpBackBuffer;
+33 -34
View File
@@ -39,65 +39,64 @@
namespace vclcanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XTextLayout,
::com::sun::star::lang::XServiceInfo > TextLayout_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout,
css::lang::XServiceInfo > TextLayout_Base;
class TextLayout : public ::comphelper::OBaseMutex,
public TextLayout_Base,
private ::boost::noncopyable
{
public:
TextLayout( const ::com::sun::star::rendering::StringContext& aText,
TextLayout( const css::rendering::StringContext& aText,
sal_Int8 nDirection,
sal_Int64 nRandomSeed,
const CanvasFont::Reference& rFont,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XGraphicDevice>& xDevice,
const css::uno::Reference<
css::rendering::XGraphicDevice>& xDevice,
const OutDevProviderSharedPtr& rOutDev );
/// Dispose all internal references
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XTextLayout
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL applyLogicalAdvancements( const ::com::sun::star::uno::Sequence< double >& aAdvancements ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::geometry::RealRectangle2D SAL_CALL queryTextBounds( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL justify( double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL combinedJustify( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > >& aNextLayouts, double nSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::TextHit SAL_CALL getTextHit( const ::com::sun::star::geometry::RealPoint2D& aHitPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL getBaselineOffset( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int8 SAL_CALL getMainTextDirection( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::StringContext SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::uno::Reference< css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryInkMeasures( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< css::geometry::RealRectangle2D > SAL_CALL queryMeasures( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< double > SAL_CALL queryLogicalAdvancements( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL applyLogicalAdvancements( const css::uno::Sequence< double >& aAdvancements ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::geometry::RealRectangle2D SAL_CALL queryTextBounds( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL justify( double nSize ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL combinedJustify( const css::uno::Sequence< css::uno::Reference< css::rendering::XTextLayout > >& aNextLayouts, double nSize ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::TextHit SAL_CALL getTextHit( const css::geometry::RealPoint2D& aHitPoint ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::Caret SAL_CALL getCaret( sal_Int32 nInsertionIndex, sal_Bool bExcludeLigatures ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int32 SAL_CALL getNextInsertionIndex( sal_Int32 nStartIndex, sal_Int32 nCaretAdvancement, sal_Bool bExcludeLigatures ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryVisualHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XPolyPolygon2D > SAL_CALL queryLogicalHighlighting( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual double SAL_CALL getBaselineOffset( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int8 SAL_CALL getMainTextDirection( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::StringContext SAL_CALL getText( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
bool draw( OutputDevice& rOutDev,
const Point& rOutpos,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) const;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) const;
private:
void setupTextOffsets( long* outputOffsets,
const ::com::sun::star::uno::Sequence< double >& inputOffsets,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) const;
const css::uno::Sequence< double >& inputOffsets,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) const;
::com::sun::star::rendering::StringContext maText;
::com::sun::star::uno::Sequence< double > maLogicalAdvancements;
css::rendering::StringContext maText;
css::uno::Sequence< double > maLogicalAdvancements;
CanvasFont::Reference mpFont;
::com::sun::star::uno::Reference<
::com::sun::star::rendering::XGraphicDevice> mxDevice;
css::uno::Reference< css::rendering::XGraphicDevice> mxDevice;
OutDevProviderSharedPtr mpOutDevProvider;
sal_Int8 mnTextDirection;
};
+1 -2
View File
@@ -34,8 +34,7 @@ namespace vclcanvas
private ::boost::noncopyable
{
public:
explicit WindowOutDevHolder( const ::com::sun::star::uno::Reference<
::com::sun::star::awt::XWindow>& xWin );
explicit WindowOutDevHolder( const css::uno::Reference< css::awt::XWindow>& xWin );
private:
virtual OutputDevice& getOutDev() SAL_OVERRIDE { return mrOutputWindow; }
+2 -2
View File
@@ -377,11 +377,11 @@ class DemoRenderer
// mxCanvas->drawBitmap(xBitmap2, maViewState, maRenderState); //yes, but where?
//cairo-canvas says:
//called CanvasHelper::getScaledBitmap, we return NULL, TODO
//Exception 'BitmapEx vclcanvas::tools::bitmapExFromXBitmap(const com::sun::star::uno::Reference<com::sun::star::rendering::XBitmap>&),
//Exception 'BitmapEx vclcanvas::tools::bitmapExFromXBitmap(const css::uno::Reference<css::rendering::XBitmap>&),
//bitmapExFromXBitmap(): could not extract BitmapEx' thrown
//vcl-canvas says:
//Exception 'BitmapEx vclcanvas::tools::bitmapExFromXBitmap(const com::sun::star::uno::Reference<com::sun::star::rendering::XBitmap>&),
//Exception 'BitmapEx vclcanvas::tools::bitmapExFromXBitmap(const css::uno::Reference<css::rendering::XBitmap>&),
//bitmapExFromXBitmap(): could not extract bitmap' thrown
// Thorsten says that this is a bug, and Thorsten never lies.