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  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  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, css::lang::XServiceInfo > 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 ::comphelper::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, css::lang::XServiceInfo > 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 ::comphelper::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 void 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)
 
class SAL_LOPLUGIN_ANNOTATE ("crosscast") RepaintTarget
 Target interface for XCachedPrimitive implementations. More...
 

Variables

class SAL_LOPLUGIN_ANNOTATE("crosscast") SurfaceProvider typedef ::rtl::Reference< SurfaceProvider > SurfaceProviderRef
 Target interface for XCachedPrimitive implementations. More...
 
constexpr OUStringLiteral PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::ParametricPolyPolygon"
 

Typedef Documentation

◆ CanvasBase_Base

Definition at line 57 of file cairo_canvas.hxx.

◆ CanvasBaseT

Definition at line 84 of file cairo_canvas.hxx.

◆ CanvasBitmap_Base

Definition at line 57 of file cairo_canvasbitmap.hxx.

◆ CanvasBitmapBase_Base

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

Definition at line 45 of file cairo_canvasbitmap.hxx.

◆ CanvasCustomSpriteBase_Base

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

Definition at line 49 of file cairo_canvascustomsprite.hxx.

◆ CanvasCustomSpriteBaseT

Definition at line 77 of file cairo_canvascustomsprite.hxx.

◆ CanvasFont_Base

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

Definition at line 41 of file cairo_canvasfont.hxx.

◆ 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, css::lang::XServiceInfo > cairocanvas::GraphicDeviceBase_Base

Definition at line 53 of file cairo_canvas.hxx.

◆ SpriteCanvasBase_Base

Definition at line 61 of file cairo_spritecanvas.hxx.

◆ SpriteCanvasBaseT

Definition at line 88 of file cairo_spritecanvas.hxx.

◆ SpriteCanvasRef

Definition at line 156 of file cairo_spritecanvas.hxx.

◆ TextLayout_Base

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

Definition at line 39 of file cairo_textlayout.hxx.

◆ 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, css::lang::XServiceInfo > cairocanvas::WindowGraphicDeviceBase_Base

Definition at line 57 of file cairo_spritecanvas.hxx.

Enumeration Type Documentation

◆ Operation

Enumerator
Stroke 
Fill 
Clip 

Definition at line 43 of file cairo_canvashelper.hxx.

Function Documentation

◆ addColorStops()

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 377 of file cairo_canvashelper.cxx.

References alpha, i, and stop().

Referenced by patternFromParametricPolyPolygon().

◆ bitmapExFromXBitmap()

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

◆ clipNULL()

static void cairocanvas::clipNULL ( cairo_t pCairo)
static

Definition at line 640 of file cairo_canvashelper.cxx.

References SAL_INFO.

Referenced by doPolyPolygonImplementation().

◆ doOperation()

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

◆ doPolyPolygonImplementation() [1/2]

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

◆ doPolyPolygonImplementation() [2/2]

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

◆ lerp()

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

Definition at line 398 of file cairo_canvashelper.cxx.

References basegfx::utils::lerp().

Referenced by doOperation().

◆ patternFromParametricPolyPolygon()

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

Definition at line 423 of file cairo_canvashelper.cxx.

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

Referenced by doOperation().

◆ SAL_LOPLUGIN_ANNOTATE()

class cairocanvas::SAL_LOPLUGIN_ANNOTATE ( "crosscast"  )

Target interface for XCachedPrimitive implementations.

This interface must be implemented on all canvas implementations that hand out XCachedPrimitives

Definition at line 1 of file cairo_repainttarget.hxx.

References SAL_LOPLUGIN_ANNOTATE().

Referenced by SAL_LOPLUGIN_ANNOTATE().

◆ setColor()

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

Definition at line 102 of file cairo_canvashelper.cxx.

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

◆ setupFontTransform()

static bool cairocanvas::setupFontTransform ( ::OutputDevice const &  rOutDev,
::Point o_rPoint,
vcl::Font io_rVCLFont,
const rendering::ViewState rViewState,
const rendering::RenderState &  rRenderState 
)
static

◆ setupOutDevState()

static void cairocanvas::setupOutDevState ( OutputDevice rOutDev,
const rendering::XCanvas *  pOwner,
const rendering::ViewState viewState,
const rendering::RenderState &  renderState 
)
static

◆ setupTextOutput()

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

◆ surfaceFromXBitmap() [1/2]

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 295 of file cairo_canvashelper.cxx.

References cairocanvas::CanvasBitmap::getSurface().

Referenced by doOperation(), and surfaceFromXBitmap().

◆ surfaceFromXBitmap() [2/2]

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 335 of file cairo_canvashelper.cxx.

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

Variable Documentation

◆ PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME

constexpr OUStringLiteral cairocanvas::PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::ParametricPolyPolygon"
constexpr

Definition at line 284 of file cairo_canvashelper.cxx.

Referenced by doOperation().

◆ SurfaceProviderRef

class SAL_LOPLUGIN_ANNOTATE ("crosscast") SurfaceProvider typedef ::rtl::Reference< SurfaceProvider > cairocanvas::SurfaceProviderRef

Target interface for XCachedPrimitive implementations.

This interface must be implemented on all canvas implementations that hand out XCachedPrimitives

Definition at line 67 of file cairo_surfaceprovider.hxx.