Help us shape the future of Go! Take the 2026 Go Developer Survey

gg

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package gg 提供基于 gogpu/gg 的页面栅格化后端,通过空白导入注册到 internal/render 的注册表:

import _ "github.com/zc310/ofd/internal/render/backends/gg"

之后即可用 drawing.BackendGG="gg" 作为栅格后端名,或经 converter.RasterBackend("gg") 使用。 渲染上下文状态机(Push/Pop、坐标换算、路径扫描、描边缩放)由 internal/render/backends/rastercore 共享,本包只实现 gogpu/gg 的画笔、 路径提交与图像合成;状态机与 Hooks 之间使用与绘制库无关的 geom 类型, 本包不依赖 tdewolff/canvas。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(width, height float64, resolution geom.Resolution) (drawing.Backend, error)

New 创建 gogpu/gg 光栅后端。输出分辨率由 resolution 决定,页面物理尺寸 为 width×height(mm);Raster 的图片尺寸与 canvas 的 Rasterize 取整规则 逐像素一致(int(w*dpmm+0.5))。

Types

This section is empty.

Jump to

Keyboard shortcuts

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