Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Extension::Internal::CairoRenderer Class Reference

#include <cairo-renderer.h>

Public Member Functions

 CairoRenderer ()
 
 ~CairoRenderer ()
 
CairoRenderContext createContext ()
 
void applyClipPath (CairoRenderContext *ctx, SPClipPath const *cp)
 
void applyMask (CairoRenderContext *ctx, SPMask const *mask)
 
bool setupDocument (CairoRenderContext *ctx, SPDocument *doc, SPItem const *base=nullptr)
 Initializes the CairoRenderContext according to the specified SPDocument.
 
void renderItem (CairoRenderContext *ctx, SPItem const *item, SPItem const *origin=nullptr, SPPage const *page=nullptr)
 Traverses the object tree and invokes the render methods.
 
void renderHatchPath (CairoRenderContext *ctx, SPHatchPath const &hatchPath, unsigned key)
 
bool renderPages (CairoRenderContext *ctx, SPDocument *doc, bool stretch_to_fit)
 Handle multiple pages, pushing each out to cairo as needed using renderItem()
 
bool renderPage (CairoRenderContext *ctx, SPDocument *doc, SPPage const *page, bool stretch_to_fit)
 

Static Private Member Functions

static bool _shouldRasterize (CairoRenderContext *ctx, SPItem const *item)
 Decide whether the given item should be rendered as a bitmap.
 
static void _doRender (SPItem const *item, CairoRenderContext *ctx, SPItem const *origin=nullptr, SPPage const *page=nullptr)
 Render a single item in a fully set up context.
 

Detailed Description

Definition at line 38 of file cairo-renderer.h.

Constructor & Destructor Documentation

◆ CairoRenderer()

Inkscape::Extension::Internal::CairoRenderer::CairoRenderer ( )
default

◆ ~CairoRenderer()

Inkscape::Extension::Internal::CairoRenderer::~CairoRenderer ( )
default

Member Function Documentation

◆ _doRender()

void Inkscape::Extension::Internal::CairoRenderer::_doRender ( SPItem const *  item,
CairoRenderContext ctx,
SPItem const *  origin = nullptr,
SPPage const *  page = nullptr 
)
staticprivate

◆ _shouldRasterize()

bool Inkscape::Extension::Internal::CairoRenderer::_shouldRasterize ( CairoRenderContext ctx,
SPItem const *  item 
)
staticprivate

Decide whether the given item should be rendered as a bitmap.

Definition at line 574 of file cairo-renderer.cpp.

References Inkscape::Extension::Internal::CairoRenderContext::getFilterToBitmap(), SPItem::isFiltered(), SPItem::isInClipPath(), and item.

Referenced by _doRender().

◆ applyClipPath()

void Inkscape::Extension::Internal::CairoRenderer::applyClipPath ( CairoRenderContext ctx,
SPClipPath const *  cp 
)

Definition at line 759 of file cairo-renderer.cpp.

References Inkscape::Extension::Internal::CairoRenderContext::_cr, _doRender(), Inkscape::Extension::Internal::CairoRenderContext::_is_valid, child, SPObject::children, Inkscape::Extension::Internal::CairoRenderContext::CLIP_MODE_PATH, SPClipPath::clippath_units(), Geom::GenericRect< C >::dimensions(), SPClipPath::get_last_bbox(), Inkscape::Extension::Internal::CairoRenderContext::getClipMode(), Inkscape::Extension::Internal::CairoRenderContext::getCurrentState(), Inkscape::Extension::Internal::CairoRenderContext::getRenderMode(), Inkscape::Extension::Internal::CairoRenderContext::getTransform(), item, Inkscape::Extension::Internal::CairoRenderState::item_transform, Geom::GenericRect< C >::left(), Inkscape::Extension::Internal::CairoRenderContext::popState(), Inkscape::Extension::Internal::CairoRenderContext::pushState(), Inkscape::Extension::Internal::CairoRenderContext::RENDER_MODE_CLIP, Inkscape::Extension::Internal::CairoRenderContext::RENDER_MODE_NORMAL, Inkscape::Extension::Internal::CairoRenderContext::setRenderMode(), Inkscape::Extension::Internal::CairoRenderContext::setStateForItem(), Inkscape::Extension::Internal::CairoRenderContext::setTransform(), SP_CONTENT_UNITS_OBJECTBOUNDINGBOX, Geom::GenericRect< C >::top(), Inkscape::Extension::Internal::CairoRenderState::transform, Inkscape::Extension::Internal::CairoRenderContext::transform(), and SPItem::transform.

Referenced by Inkscape::Extension::Internal::CairoRenderContext::popLayer().

◆ applyMask()

◆ createContext()

◆ renderHatchPath()

◆ renderItem()

void Inkscape::Extension::Internal::CairoRenderer::renderItem ( CairoRenderContext ctx,
SPItem const *  item,
SPItem const *  origin = nullptr,
SPPage const *  page = nullptr 
)

◆ renderPage()

◆ renderPages()

◆ setupDocument()


The documentation for this class was generated from the following files: