mpSurface->getCairo() == mpCairo
so make that clearer, and we only need to pass a Cairo context not a surface here Change-Id: If385dbd4e8a546fa18c2f93650428fe0ed0c76fc
This commit is contained in:
@@ -299,8 +299,8 @@ namespace cairocanvas
|
||||
{
|
||||
#if defined CAIRO_HAS_WIN32_SURFACE
|
||||
// FIXME: Some kind of work-araound...
|
||||
cairo_rectangle (mpSurface->getCairo().get(), 0, 0, 0, 0);
|
||||
cairo_fill(mpSurface->getCairo().get());
|
||||
cairo_rectangle (mpCairo.get(), 0, 0, 0, 0);
|
||||
cairo_fill(mpCairo.get());
|
||||
#endif
|
||||
::Point aOutpos;
|
||||
if( !setupTextOutput( *mpVirtualDevice, pOwner, aOutpos, viewState, renderState, xFont ) )
|
||||
@@ -333,7 +333,7 @@ namespace cairocanvas
|
||||
RTL_TEXTENCODING_UTF8 ).getStr());
|
||||
|
||||
rtl::Reference< TextLayout > pTextLayout( new TextLayout(text, textDirection, 0, CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), mpSurfaceProvider) );
|
||||
pTextLayout->draw( mpSurface, *mpVirtualDevice, aOutpos, viewState, renderState );
|
||||
pTextLayout->draw(mpCairo, *mpVirtualDevice, aOutpos, viewState, renderState);
|
||||
}
|
||||
|
||||
return uno::Reference< rendering::XCachedPrimitive >(NULL);
|
||||
@@ -358,8 +358,8 @@ namespace cairocanvas
|
||||
{
|
||||
#if defined CAIRO_HAS_WIN32_SURFACE
|
||||
// FIXME: Some kind of work-araound...
|
||||
cairo_rectangle( mpSurface->getCairo().get(), 0, 0, 0, 0);
|
||||
cairo_fill(mpSurface->getCairo().get());
|
||||
cairo_rectangle(mpCairo.get(), 0, 0, 0, 0);
|
||||
cairo_fill(mpCairo.get());
|
||||
#endif
|
||||
// TODO(T3): Race condition. We're taking the font
|
||||
// from xLayoutedText, and then calling draw() at it,
|
||||
@@ -371,7 +371,7 @@ namespace cairocanvas
|
||||
return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary
|
||||
|
||||
// TODO(F2): What about the offset scalings?
|
||||
pTextLayout->draw( mpSurface, *mpVirtualDevice, aOutpos, viewState, renderState );
|
||||
pTextLayout->draw(mpCairo, *mpVirtualDevice, aOutpos, viewState, renderState);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -337,7 +337,7 @@ namespace cairocanvas
|
||||
*
|
||||
* @return true, if successful
|
||||
**/
|
||||
bool TextLayout::draw( SurfaceSharedPtr& pSurface,
|
||||
bool TextLayout::draw( CairoSharedPtr& pSCairo,
|
||||
OutputDevice& rOutDev,
|
||||
const Point& rOutpos,
|
||||
const rendering::ViewState& viewState,
|
||||
@@ -486,8 +486,6 @@ namespace cairocanvas
|
||||
# error Native API needed.
|
||||
#endif
|
||||
|
||||
CairoSharedPtr pSCairo = pSurface->getCairo();
|
||||
|
||||
cairo_set_font_face( pSCairo.get(), font_face);
|
||||
|
||||
// create default font options. cairo_get_font_options() does not retrieve the surface defaults,
|
||||
|
@@ -81,7 +81,7 @@ namespace cairocanvas
|
||||
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;
|
||||
|
||||
bool draw( ::cairo::SurfaceSharedPtr& pSurface,
|
||||
bool draw( ::cairo::CairoSharedPtr& pSCairo,
|
||||
OutputDevice& rOutDev,
|
||||
const Point& rOutpos,
|
||||
const ::com::sun::star::rendering::ViewState& viewState,
|
||||
|
Reference in New Issue
Block a user