LibreOffice Module canvas (master)  1
Classes | Typedefs | Enumerations | Functions | Variables
cairocanvas Namespace Reference

Classes

class  CachedBitmap
 
class  Canvas
 Product of this component's factory. More...
 
class  CanvasBaseSurfaceProvider_Base
 Mixin SurfaceProvider. More...
 
class  CanvasBitmap
 
class  CanvasBitmapSpriteSurface_Base
 
class  CanvasCustomSprite
 
class  CanvasCustomSpriteSpriteBase_Base
 Mixin Sprite. More...
 
class  CanvasFont
 
class  CanvasHelper
 
class  DeviceHelper
 
class  RepaintTarget
 Target interface for XCachedPrimitive implementations. More...
 
class  Sprite
 Specialization of canvas::Sprite interface, to also provide redraw methods. More...
 
class  SpriteCanvas
 Product of this component's factory. More...
 
class  SpriteCanvasBaseSpriteSurface_Base
 Mixin SpriteSurface. More...
 
class  SpriteCanvasHelper
 
class  SpriteDeviceHelper
 
class  SpriteHelper
 Helper class for canvas sprites. More...
 
class  SurfaceProvider
 Target interface for XCachedPrimitive implementations. More...
 
class  TextLayout
 

Typedefs

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,::cppu::OWeakObjectCanvasBase_Base
 
typedef ::canvas::IntegerBitmapBase< canvas::BitmapCanvasBase2< CanvasBaseSurfaceProvider_Base, CanvasHelper,::osl::MutexGuard,::cppu::OWeakObject > > CanvasBaseT
 
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas, css::rendering::XIntegerBitmap, css::lang::XServiceInfo, css::beans::XFastPropertySet > CanvasBitmapBase_Base
 
typedef ::canvas::IntegerBitmapBase< canvas::BitmapCanvasBase2< CanvasBitmapSpriteSurface_Base, CanvasHelper,::osl::MutexGuard,::cppu::OWeakObject > > CanvasBitmap_Base
 
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite, css::rendering::XBitmapCanvas, css::rendering::XIntegerBitmap, css::lang::XServiceInfo > CanvasCustomSpriteBase_Base
 
typedef ::canvas::CanvasCustomSpriteBase< CanvasCustomSpriteSpriteBase_Base, SpriteHelper, CanvasHelper,::osl::MutexGuard,::cppu::OWeakObjectCanvasCustomSpriteBaseT
 
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont, css::lang::XServiceInfo > CanvasFont_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,::cppu::OWeakObjectSpriteCanvasBase_Base
 
typedef ::canvas::SpriteCanvasBase< SpriteCanvasBaseSpriteSurface_Base, SpriteCanvasHelper,::osl::MutexGuard,::cppu::OWeakObjectSpriteCanvasBaseT
 
typedef ::rtl::Reference< SpriteCanvasSpriteCanvasRef
 
typedef ::rtl::Reference< SurfaceProviderSurfaceProviderRef
 
typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout, css::lang::XServiceInfo > TextLayout_Base
 

Enumerations

enum  Operation {
  Stroke,
  Fill,
  Clip
}
 

Functions

static void setColor (cairo_t *pCairo, const uno::Sequence< double > &rColor)
 
static SurfaceSharedPtr surfaceFromXBitmap (const uno::Reference< rendering::XBitmap > &xBitmap)
 surfaceFromXBitmap Create a surface from XBitmap More...
 
::BitmapEx bitmapExFromXBitmap (const uno::Reference< rendering::XBitmap > &xBitmap)
 
static SurfaceSharedPtr surfaceFromXBitmap (const uno::Reference< rendering::XBitmap > &xBitmap, const SurfaceProviderRef &rSurfaceProvider, unsigned char *&data, bool &bHasAlpha)
 surfaceFromXBitmap Create a surface from XBitmap More...
 
static void addColorStops (cairo_pattern_t *pPattern, const uno::Sequence< uno::Sequence< double > > &rColors, const uno::Sequence< double > &rStops, bool bReverseStops)
 
static uno::Sequence< double > lerp (const uno::Sequence< double > &rLeft, const uno::Sequence< double > &rRight, double fAlpha)
 
static cairo_pattern_t * patternFromParametricPolyPolygon (::canvas::ParametricPolyPolygon const &rPolygon)
 
static void doOperation (Operation aOperation, cairo_t *pCairo, const uno::Sequence< rendering::Texture > *pTextures, const SurfaceProviderRef &pDevice, const basegfx::B2DRange &rBounds)
 
static void clipNULL (cairo_t *pCairo)
 
void doPolyPolygonImplementation (const ::basegfx::B2DPolyPolygon &aPolyPolygon, Operation aOperation, cairo_t *pCairo, const uno::Sequence< rendering::Texture > *pTextures, const SurfaceProviderRef &pDevice, rendering::FillRule eFillrule)
 
void doPolyPolygonImplementation (const ::basegfx::B2DPolyPolygon &aPolyPolygon, Operation aOperation, cairo_t *pCairo, const css::uno::Sequence< css::rendering::Texture > *pTextures, const SurfaceProviderRef &pDevice, css::rendering::FillRule eFillrule)
 also needed from SpriteHelper More...
 
static bool setupFontTransform (::OutputDevice const &rOutDev,::Point &o_rPoint, vcl::Font &io_rVCLFont, const rendering::ViewState &rViewState, const rendering::RenderState &rRenderState)
 
static int setupOutDevState (OutputDevice &rOutDev, const rendering::XCanvas *pOwner, const rendering::ViewState &viewState, const rendering::RenderState &renderState)
 
static bool setupTextOutput (OutputDevice &rOutDev, const rendering::XCanvas *pOwner,::Point &o_rOutPos, const rendering::ViewState &viewState, const rendering::RenderState &renderState, const uno::Reference< rendering::XCanvasFont > &xFont)
 
static uno::Reference< uno::XInterface > initCanvas (Canvas *pCanvas)
 
static uno::Reference< uno::XInterface > initSpriteCanvas (SpriteCanvas *pCanvas)
 

Variables

sdecl::class_< Canvas, sdecl::with_args< true > > const serviceImpl1 & initCanvas
 
const sdecl::ServiceDecl cairoCanvasDecl (serviceImpl1, CANVAS_IMPLEMENTATION_NAME, CANVAS_SERVICE_NAME)
 
sdecl::class_< SpriteCanvas, sdecl::with_args< true > > const serviceImpl2 & initSpriteCanvas
 
const sdecl::ServiceDecl cairoSpriteCanvasDecl (serviceImpl2, SPRITECANVAS_IMPLEMENTATION_NAME, SPRITECANVAS_SERVICE_NAME)
 

Typedef Documentation

Definition at line 59 of file cairo_canvas.hxx.

Definition at line 86 of file cairo_canvas.hxx.

Definition at line 58 of file cairo_canvasbitmap.hxx.

typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas, css::rendering::XIntegerBitmap, css::lang::XServiceInfo, css::beans::XFastPropertySet > cairocanvas::CanvasBitmapBase_Base

Definition at line 46 of file cairo_canvasbitmap.hxx.

typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite, css::rendering::XBitmapCanvas, css::rendering::XIntegerBitmap, css::lang::XServiceInfo > cairocanvas::CanvasCustomSpriteBase_Base

Definition at line 50 of file cairo_canvascustomsprite.hxx.

Definition at line 78 of file cairo_canvascustomsprite.hxx.

typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont, css::lang::XServiceInfo > cairocanvas::CanvasFont_Base

Definition at line 43 of file cairo_canvasfont.hxx.

typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas, css::rendering::XIntegerBitmap, css::rendering::XGraphicDevice, css::lang::XMultiServiceFactory, css::util::XUpdatable, css::beans::XPropertySet, css::lang::XServiceName > cairocanvas::GraphicDeviceBase_Base

Definition at line 55 of file cairo_canvas.hxx.

Definition at line 63 of file cairo_spritecanvas.hxx.

Definition at line 90 of file cairo_spritecanvas.hxx.

Definition at line 153 of file cairo_spritecanvas.hxx.

Definition at line 68 of file cairo_surfaceprovider.hxx.

typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout, css::lang::XServiceInfo > cairocanvas::TextLayout_Base

Definition at line 42 of file cairo_textlayout.hxx.

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 > cairocanvas::WindowGraphicDeviceBase_Base

Definition at line 59 of file cairo_spritecanvas.hxx.

Enumeration Type Documentation

Enumerator
Stroke 
Fill 
Clip 

Definition at line 44 of file cairo_canvashelper.hxx.

Function Documentation

static void cairocanvas::addColorStops ( cairo_pattern_t *  pPattern,
const uno::Sequence< uno::Sequence< double > > &  rColors,
const uno::Sequence< double > &  rStops,
bool  bReverseStops 
)
static

Definition at line 383 of file cairo_canvashelper.cxx.

References i, and stop().

Referenced by patternFromParametricPolyPolygon().

::BitmapEx cairocanvas::bitmapExFromXBitmap ( const uno::Reference< rendering::XBitmap > &  xBitmap)
static

Definition at line 313 of file cairo_canvashelper.cxx.

References vcl::unotools::bitmapExFromXBitmap(), and ENSURE_OR_THROW.

Referenced by surfaceFromXBitmap().

static void cairocanvas::clipNULL ( cairo_t pCairo)
static

Definition at line 644 of file cairo_canvashelper.cxx.

References SAL_INFO.

Referenced by doPolyPolygonImplementation().

static void cairocanvas::doOperation ( Operation  aOperation,
cairo_t pCairo,
const uno::Sequence< rendering::Texture > *  pTextures,
const SurfaceProviderRef pDevice,
const basegfx::B2DRange rBounds 
)
static
void cairocanvas::doPolyPolygonImplementation ( const ::basegfx::B2DPolyPolygon aPolyPolygon,
Operation  aOperation,
cairo_t pCairo,
const css::uno::Sequence< css::rendering::Texture > *  pTextures,
const SurfaceProviderRef pDevice,
css::rendering::FillRule  eFillrule 
)

also needed from SpriteHelper

void cairocanvas::doPolyPolygonImplementation ( const ::basegfx::B2DPolyPolygon aPolyPolygon,
Operation  aOperation,
cairo_t pCairo,
const uno::Sequence< rendering::Texture > *  pTextures,
const SurfaceProviderRef pDevice,
rendering::FillRule  eFillrule 
)
static uno::Reference<uno::XInterface> cairocanvas::initCanvas ( Canvas pCanvas)
static

Definition at line 38 of file cairo_services.cxx.

References cairocanvas::Canvas::initialize().

static uno::Reference<uno::XInterface> cairocanvas::initSpriteCanvas ( SpriteCanvas pCanvas)
static

Definition at line 51 of file cairo_services.cxx.

References cairocanvas::SpriteCanvas::initialize().

static uno::Sequence<double> cairocanvas::lerp ( const uno::Sequence< double > &  rLeft,
const uno::Sequence< double > &  rRight,
double  fAlpha 
)
static

Definition at line 404 of file cairo_canvashelper.cxx.

References basegfx::utils::lerp().

Referenced by doOperation().

static cairo_pattern_t* cairocanvas::patternFromParametricPolyPolygon ( ::canvas::ParametricPolyPolygon const &  rPolygon)
static

Definition at line 427 of file cairo_canvashelper.cxx.

References addColorStops(), and canvas::ParametricPolyPolygon::getValues().

Referenced by doOperation().

static void cairocanvas::setColor ( cairo_t pCairo,
const uno::Sequence< double > &  rColor 
)
static

Definition at line 107 of file cairo_canvashelper.cxx.

Referenced by doOperation(), and cairocanvas::CanvasHelper::useStates().

static bool cairocanvas::setupFontTransform ( ::OutputDevice const &  rOutDev,
::Point o_rPoint,
vcl::Font io_rVCLFont,
const rendering::ViewState rViewState,
const rendering::RenderState &  rRenderState 
)
static
static int cairocanvas::setupOutDevState ( OutputDevice rOutDev,
const rendering::XCanvas *  pOwner,
const rendering::ViewState viewState,
const rendering::RenderState &  renderState 
)
static
static bool cairocanvas::setupTextOutput ( OutputDevice rOutDev,
const rendering::XCanvas *  pOwner,
::Point o_rOutPos,
const rendering::ViewState viewState,
const rendering::RenderState &  renderState,
const uno::Reference< rendering::XCanvasFont > &  xFont 
)
static
static SurfaceSharedPtr cairocanvas::surfaceFromXBitmap ( const uno::Reference< rendering::XBitmap > &  xBitmap)
static

surfaceFromXBitmap Create a surface from XBitmap

Parameters
xBitmapbitmap image that will be used for the surface
bHasAlphawill be set to true if resulting surface has alpha

This is a helper function for the other surfaceFromXBitmap(). This function tries to create surface from xBitmap by checking if xBitmap is CanvasBitmap or SpriteCanvas.

Returns
created surface or NULL

Definition at line 300 of file cairo_canvashelper.cxx.

References cairocanvas::SurfaceProvider::getSurface(), and cairocanvas::CanvasBitmap::getSurface().

Referenced by doOperation(), and surfaceFromXBitmap().

static SurfaceSharedPtr cairocanvas::surfaceFromXBitmap ( const uno::Reference< rendering::XBitmap > &  xBitmap,
const SurfaceProviderRef rSurfaceProvider,
unsigned char *&  data,
bool &  bHasAlpha 
)
static

surfaceFromXBitmap Create a surface from XBitmap

Parameters
xBitmapbitmap image that will be used for the surface
rDevicereference to the device into which we want to draw
datawill be filled with alpha data, if xBitmap is alpha/transparent image
bHasAlphawill be set to true if resulting surface has alpha

This function tries various methods for creating a surface from xBitmap. It also uses the helper function surfaceFromXBitmap( xBitmap, bHasAlpha )

Returns
created surface or NULL

Definition at line 340 of file cairo_canvashelper.cxx.

References bitmapExFromXBitmap(), vcl::bitmap::CanvasCairoExtractBitmapData(), BitmapEx::GetBitmap(), BitmapEx::IsAlpha(), BitmapEx::IsTransparent(), SAL_INFO, and surfaceFromXBitmap().

Variable Documentation

const sdecl::ServiceDecl cairocanvas::cairoCanvasDecl(serviceImpl1, CANVAS_IMPLEMENTATION_NAME, CANVAS_SERVICE_NAME)
const sdecl::ServiceDecl cairocanvas::cairoSpriteCanvasDecl(serviceImpl2, SPRITECANVAS_IMPLEMENTATION_NAME, SPRITECANVAS_SERVICE_NAME)
sdecl::class_< Canvas, sdecl::with_args<true> > const serviceImpl1& cairocanvas::initCanvas

Definition at line 45 of file cairo_services.cxx.

sdecl::class_< SpriteCanvas, sdecl::with_args<true> > const serviceImpl2& cairocanvas::initSpriteCanvas

Definition at line 59 of file cairo_services.cxx.