summaryrefslogtreecommitdiff
path: root/cppcanvas/source/wrapper
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2011-12-21 06:46:40 -0500
committerAugust Sodora <augsod@gmail.com>2011-12-21 06:46:56 -0500
commit3b8bf60a040d51d2d228127693f0b9c3292b151d (patch)
treeae6d6a79c6d71fff923ef0ad4a5a4202bda55328 /cppcanvas/source/wrapper
parentd73d329bf1a114bb5e26742245aac9abb6dae269 (diff)
Revert "callcatcher: Remove unused code"
Diffstat (limited to 'cppcanvas/source/wrapper')
-rw-r--r--cppcanvas/source/wrapper/basegfxfactory.cxx50
1 files changed, 50 insertions, 0 deletions
diff --git a/cppcanvas/source/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx
index d8dedb37eab4..bac25aa1d9d4 100644
--- a/cppcanvas/source/wrapper/basegfxfactory.cxx
+++ b/cppcanvas/source/wrapper/basegfxfactory.cxx
@@ -43,6 +43,7 @@
#include "implbitmap.hxx"
#include "impltext.hxx"
+
using namespace ::com::sun::star;
namespace cppcanvas
@@ -71,6 +72,48 @@ namespace cppcanvas
{
}
+ PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr& rCanvas,
+ const ::basegfx::B2DPolygon& rPoly ) const
+ {
+ OSL_ENSURE( rCanvas.get() != NULL &&
+ rCanvas->getUNOCanvas().is(),
+ "BaseGfxFactory::createPolyPolygon(): Invalid canvas" );
+
+ if( rCanvas.get() == NULL )
+ return PolyPolygonSharedPtr();
+
+ uno::Reference< rendering::XCanvas > xCanvas( rCanvas->getUNOCanvas() );
+ if( !xCanvas.is() )
+ return PolyPolygonSharedPtr();
+
+ return PolyPolygonSharedPtr(
+ new internal::ImplPolyPolygon( rCanvas,
+ ::basegfx::unotools::xPolyPolygonFromB2DPolygon(
+ xCanvas->getDevice(),
+ rPoly) ) );
+ }
+
+ PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr& rCanvas,
+ const ::basegfx::B2DPolyPolygon& rPolyPoly ) const
+ {
+ OSL_ENSURE( rCanvas.get() != NULL &&
+ rCanvas->getUNOCanvas().is(),
+ "BaseGfxFactory::createPolyPolygon(): Invalid canvas" );
+
+ if( rCanvas.get() == NULL )
+ return PolyPolygonSharedPtr();
+
+ uno::Reference< rendering::XCanvas > xCanvas( rCanvas->getUNOCanvas() );
+ if( !xCanvas.is() )
+ return PolyPolygonSharedPtr();
+
+ return PolyPolygonSharedPtr(
+ new internal::ImplPolyPolygon( rCanvas,
+ ::basegfx::unotools::xPolyPolygonFromB2DPolyPolygon(
+ xCanvas->getDevice(),
+ rPolyPoly) ) );
+ }
+
BitmapSharedPtr BaseGfxFactory::createBitmap( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2ISize& rSize ) const
{
@@ -110,6 +153,13 @@ namespace cppcanvas
xCanvas->getDevice()->createCompatibleAlphaBitmap(
::basegfx::unotools::integerSize2DFromB2ISize(rSize) ) ) );
}
+
+ TextSharedPtr BaseGfxFactory::createText( const CanvasSharedPtr& rCanvas, const ::rtl::OUString& rText ) const
+ {
+ return TextSharedPtr( new internal::ImplText( rCanvas,
+ rText ) );
+ }
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */