render

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Unlicense Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CTColor

type CTColor struct {
	Value    *color.RGBA
	Gradient canvas.Gradient
}

type Document

type Document struct {
	*parser.Document
	// contains filtered or unexported fields
}

func NewDocument

func NewDocument(background color.Color, doc *parser.Document) *Document

func (*Document) Annot

func (p *Document) Annot(ctx *canvas.Context, annot *models.Annot, pb models.StBox)

func (*Document) Composite added in v0.0.5

func (p *Document) Composite(ctx *canvas.Context, object models.CompositeObject, dp *models.DrawParam, pb models.StBox)

Composite 绘制复合图元(CompositeObject)。

CompositeGraphicUnit 的内容位于自身的 [0,Width]x[0,Height] 坐标系中, 先渲染完整单元,再使用 CompositeObject 的 Boundary 和 CTM 映射到页面, 保留单元内部坐标,不根据透明像素重新裁剪内容。

func (*Document) Draw

func (p *Document) Draw(ctx *canvas.Context, page *parser.Page) error

func (*Document) Image

func (p *Document) Image(ctx *canvas.Context, object models.ImageObject, dp *models.DrawParam, pb models.StBox)

func (*Document) Layer

func (p *Document) Layer(ctx *canvas.Context, layer *models.Layer, pb models.StBox)

func (*Document) Page

func (p *Document) Page(page *parser.Page) (*canvas.Canvas, error)

func (*Document) PageContent

func (p *Document) PageContent(ctx *canvas.Context, page *parser.Page, seal bool)

func (*Document) Path

func (p *Document) Path(ctx *canvas.Context, object models.PathObject, dp *models.DrawParam, pb models.StBox)

func (*Document) Seal

func (p *Document) Seal(ctx *canvas.Context, info *parser.SealInfo, pb models.StBox) error

func (*Document) Template

func (p *Document) Template(ctx *canvas.Context, template models.Template, pb models.StBox)

func (*Document) Text

func (p *Document) Text(ctx *canvas.Context, object models.TextObject, dp *models.DrawParam, pb models.StBox)

type Fonts

type Fonts struct {
	*parser.Document
	Fonts map[models.StRefID]*canvas.FontFamily
}

func NewFonts

func NewFonts(doc *parser.Document) *Fonts

func (*Fonts) LoadFont

func (p *Fonts) LoadFont(id models.StRefID) (*canvas.FontFamily, error)

Jump to

Keyboard shortcuts

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