svgpdf

package
v0.0.0-...-1380579 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package svgpdf implements a PDF backend to render SVG images, by wrapping github.com/benoitkugler/pdf TODO: Some features are missing: MiterLimit and Gradient.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderSVGIconToPDF

func RenderSVGIconToPDF(icon io.Reader, pdfName string) error

RenderSVGIconToPDF reads the given icon and renders it into the given file.

Types

type BoundingBox

type BoundingBox struct {
	BBox fixed.Rectangle26_6
	// contains filtered or unexported fields
}

BoundingBox stores the current bounding box and exposes method to update it

func (*BoundingBox) CubeBezier

func (p *BoundingBox) CubeBezier(b fixed.Point26_6, c fixed.Point26_6, d fixed.Point26_6)

func (*BoundingBox) Line

func (p *BoundingBox) Line(b fixed.Point26_6)

func (*BoundingBox) QuadBezier

func (p *BoundingBox) QuadBezier(b fixed.Point26_6, c fixed.Point26_6)

func (*BoundingBox) Start

func (p *BoundingBox) Start(a fixed.Point26_6)

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

func NewRenderer

func NewRenderer(cs *contentstream.GraphicStream) Renderer

NewRenderer return a renderer which will write to the given `pdf`.

func (Renderer) SetupDrawers

func (r Renderer) SetupDrawers(willFill, willDraw bool) (f svgicon.Filler, s svgicon.Stroker)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL