Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
pixbuf-ops.h File Reference

Go to the source code of this file.

Namespaces

namespace  Inkscape
 Helper class to stream background task notifications as a series of messages.
 

Functions

Inkscape::Pixbufsp_generate_internal_bitmap (SPDocument *document, Geom::Rect const &area, double dpi, std::vector< SPItem const * > items={}, bool set_opaque=false, uint32_t const *checkerboard_color=nullptr, double device_scale=1.0, std::optional< Antialiasing > antialias={})
 Generates a bitmap from given items.
 

Function Documentation

◆ sp_generate_internal_bitmap()

Inkscape::Pixbuf * sp_generate_internal_bitmap ( SPDocument document,
Geom::Rect const &  area,
double  dpi,
std::vector< SPItem const * >  items,
bool  opaque,
uint32_t const *  checkerboard_color,
double  device_scale,
std::optional< Antialiasing >  antialias 
)

Generates a bitmap from given items.

The bitmap is stored in RAM and not written to file.

Parameters
documentInkscape document.
areaExport area in document units.
dpiResolution.
itemsVector of pointers to SPItems to export. Export all items if empty.
opaqueSet items opacity to 1 (used by Cairo renderer for filtered objects rendered as bitmaps).
Returns
The created GdkPixbuf structure or nullptr if rendering failed.

Definition at line 36 of file pixbuf-ops.cpp.

References Inkscape::Util::Quantity::convert(), SPItem::display_key_new(), SPDocument::ensureUpToDate(), Geom::GenericRect< C >::from_xywh(), SPItem::get_arenaitem(), SPDocument::getRoot(), Geom::Rect::hasZeroArea(), Geom::GenericRect< C >::height(), height, ink_cairo_pattern_create_checkerboard(), SPItem::invoke_hide_except(), SPItem::invoke_show(), item, items, Geom::GenericRect< C >::min(), origin, Inkscape::DrawingContext::paint(), Inkscape::Drawing::render(), Inkscape::DrawingItem::RENDER_BYPASS_CACHE, Inkscape::DrawingContext::restore(), Inkscape::Drawing::root(), Inkscape::DrawingContext::save(), Inkscape::Drawing::setAntialiasingOverride(), Inkscape::Drawing::setExact(), Inkscape::DrawingItem::setOpacity(), Inkscape::DrawingContext::setOperator(), Inkscape::Drawing::setRoot(), Inkscape::DrawingContext::setSource(), Inkscape::DrawingItem::setTransform(), size, surface, Inkscape::DrawingContext::transform(), Inkscape::Drawing::update(), Geom::GenericRect< C >::width(), and width.

Referenced by Inkscape::Pixbuf::create_from_buffer(), Inkscape::Pixbuf::create_from_data_uri(), Inkscape::ObjectSet::createBitmapCopy(), Inkscape::svg_renderer::do_render(), Inkscape::Extension::Internal::PdfBuilder::DrawContext::paint_item_to_raster(), and Inkscape::Extension::Internal::sp_asbitmap_render().