24#include <com/sun/star/lang/NoSupportException.hpp>
37 const uno::Reference< uno::XComponentContext >& ) :
42 void Canvas::initialize()
45 if( !maArguments.hasElements() )
57 SAL_INFO(
"canvas.vcl",
"VCLCanvas::initialize called" );
60 maArguments[0].getValueTypeClass() == uno::TypeClass_HYPER,
61 "Canvas::initialize: wrong number of arguments, or wrong types" );
64 maArguments[0] >>= nPtr;
68 throw lang::NoSupportException(
"Passed OutDev invalid!",
nullptr);
73 maDeviceHelper.init( pOutdevProvider );
74 maCanvasHelper.init( *
this,
79 maArguments.realloc(0);
84 SAL_INFO(
"canvas.vcl",
"VCLCanvas destroyed" );
87 void Canvas::disposeThis()
92 CanvasBaseT::disposeThis();
95 OUString SAL_CALL Canvas::getServiceName( )
97 return "com.sun.star.rendering.Canvas.VCL";
100 OUString Canvas::getImplementationName() {
101 return "com.sun.star.comp.rendering.Canvas.VCL";
104 sal_Bool Canvas::supportsService(OUString
const & ServiceName) {
108 css::uno::Sequence<OUString> Canvas::getSupportedServiceNames() {
109 return {getServiceName()};
113 const rendering::ViewState& viewState,
114 const rendering::RenderState& renderState,
121 return maCanvasHelper.repaint( rGrf, viewState, renderState, rPt, rSz, rAttr );
125extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
127 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& args)
131 return cppu::acquire(
p.get());
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_rendering_Canvas_VCL_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &args)
Product of this component's factory.
Canvas(const css::uno::Sequence< css::uno::Any > &aArguments, const css::uno::Reference< css::uno::XComponentContext > &rxContext)
#define ENSURE_ARG_OR_THROW(c, m)
Sequence< PropertyValue > aArguments
#define SAL_INFO(area, stream)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
std::shared_ptr< OutDevProvider > OutDevProviderSharedPtr
std::shared_ptr< GraphicObject > GraphicObjectSharedPtr