Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Extension::Internal::PdfBuilder Namespace Reference

Classes

class  Document
 
class  DrawContext
 
class  GroupContext
 
class  ItemContext
 
class  PageContext
 
class  PatternContext
 
class  TextContext
 

Typedefs

typedef std::tuple< std::string, std::string, std::string > ItemCacheKey
 

Enumerations

enum  PaintLayer : std::uint_least8_t { PAINT_FILLSTROKE , PAINT_FILL , PAINT_STROKE , PAINT_MARKERS }
 

Functions

std::string get_id (SPObject const *obj)
 Attempt to get an object's id, even if it's a clone.
 
CapyPDF_Blend_Mode get_blendmode (SPBlendMode mode)
 Get the blend mode for capyPDF output.
 
CapyPDF_Line_Cap get_linecap (SPStrokeCapType mode)
 
CapyPDF_Line_Join get_linejoin (SPStrokeJoinType mode)
 
bool style_has_gradient_transparency (SPStyle const *style)
 Returns true if the gradient has transparency.
 
bool style_needs_group (SPStyle const *style)
 Return true if this shape's style requires a PDF transparency group.
 
bool gradient_has_transparency (SPPaintServer const *paint)
 Returns true if the gradient has transparency.
 
std::string paint_to_cache_key (SPIPaint const &paint, std::optional< double > opacity)
 Turn a paint into a string for use in caching keys.
 
void get_context_use_recursive (SPItem const *item, bool &fill, bool &stroke)
 Find out if any of the item, or its decendents use context-fill and context-stroke.
 
std::vector< PaintLayerget_paint_layers (SPStyle const *style, SPStyle const *context_style)
 Get a PDF specific layer painting pattern for fill, stroke and markers.
 
static CapyPDF_Image_Interpolation get_interpolation (SPImageRendering rendering)
 
static std::optional< bool > repeat_is_reflection (SPGradientSpread spread)
 Return true if the SVG gradient is repeated and reflected, false if it's repeated but not reflected.
 
static std::string unicodeToUtf8 (std::vector< gunichar > const &chars)
 

Typedef Documentation

◆ ItemCacheKey

typedef std::tuple<std::string, std::string, std::string> Inkscape::Extension::Internal::PdfBuilder::ItemCacheKey

Definition at line 59 of file build-document.h.

Enumeration Type Documentation

◆ PaintLayer

Enumerator
PAINT_FILLSTROKE 
PAINT_FILL 
PAINT_STROKE 
PAINT_MARKERS 

Definition at line 61 of file build-document.h.

Function Documentation

◆ get_blendmode()

◆ get_context_use_recursive()

void Inkscape::Extension::Internal::PdfBuilder::get_context_use_recursive ( SPItem const *  item,
bool &  fill,
bool &  stroke 
)

◆ get_id()

◆ get_interpolation()

static CapyPDF_Image_Interpolation Inkscape::Extension::Internal::PdfBuilder::get_interpolation ( SPImageRendering  rendering)
static

◆ get_linecap()

◆ get_linejoin()

◆ get_paint_layers()

◆ gradient_has_transparency()

bool Inkscape::Extension::Internal::PdfBuilder::gradient_has_transparency ( SPPaintServer const *  paint)

◆ paint_to_cache_key()

std::string Inkscape::Extension::Internal::PdfBuilder::paint_to_cache_key ( SPIPaint const &  paint,
std::optional< double >  opacity 
)

◆ repeat_is_reflection()

static std::optional< bool > Inkscape::Extension::Internal::PdfBuilder::repeat_is_reflection ( SPGradientSpread  spread)
static

Return true if the SVG gradient is repeated and reflected, false if it's repeated but not reflected.

Definition at line 36 of file build-patterns.cpp.

References SP_GRADIENT_SPREAD_REFLECT, and SP_GRADIENT_SPREAD_REPEAT.

Referenced by Inkscape::Extension::Internal::PdfBuilder::Document::get_linear_pattern(), and Inkscape::Extension::Internal::PdfBuilder::Document::get_radial_pattern().

◆ style_has_gradient_transparency()

bool Inkscape::Extension::Internal::PdfBuilder::style_has_gradient_transparency ( SPStyle const *  style)

Returns true if the gradient has transparency.

Definition at line 96 of file build-styles.cpp.

References SPStyle::fill, gradient_has_transparency(), and SPStyle::stroke.

◆ style_needs_group()

bool Inkscape::Extension::Internal::PdfBuilder::style_needs_group ( SPStyle const *  style)

Return true if this shape's style requires a PDF transparency group.

Definition at line 160 of file build-styles.cpp.

References SPStyle::fill, get_blendmode(), SPStyle::mix_blend_mode, SPStyle::opacity, and SPStyle::stroke.

Referenced by Inkscape::Extension::Internal::PdfBuilder::DrawContext::paint_item_group().

◆ unicodeToUtf8()

static std::string Inkscape::Extension::Internal::PdfBuilder::unicodeToUtf8 ( std::vector< gunichar > const &  chars)
static

Definition at line 25 of file build-text.cpp.

References c.

Referenced by Inkscape::Extension::Internal::PdfBuilder::TextContext::render_text().