style(代码风格): 整理声明顺序与字体模块
build.yaml / build (push) Successful in 51s

This commit is contained in:
xiaoqidun committed 2026-09-28 15:17:45 +08:00
1 parent 5e0da3da28
commit ee6c9f6a16
82 files changed
+4316 -4310

No files matched your search

+30 -30
View File
@@ -21,6 +21,36 @@ import (
"github.com/xiaoqidun/pdfgo"
)
// pdfMeshVertex 保存局部毫米坐标及原曲面参数
type pdfMeshVertex struct {
point pdfgo.Point
u, v float64
}
// pdfMeshTriangle 保存按输出精度细分的曲面网格
type pdfMeshTriangle struct {
vertices [3]pdfMeshVertex
patch int
}
// pdfMeshKey 区分网格及其输出混合空间
type pdfMeshKey struct {
mesh *pdfgo.MeshGradient
space *pdfgo.ColorSpace
}
// pdfMeshPixel 保存抗锯齿覆盖率与源空间合成分量
type pdfMeshPixel struct {
values [4]float64
shape float64
}
// pdfMeshSample 保存采样点参数,patch为一基编号,零表示未覆盖
type pdfMeshSample struct {
u, v float64
patch int
}
// meshColor 将线性三角网格映射为OFD高洛德渐变,保留顶点和覆盖顺序
// 入参: paint PDF网格画刷, box 对象边界
// 返回: *FillColor OFD渐变, error 不可线性表达的颜色或坐标错误
@@ -59,36 +89,6 @@ func (p *pdfImporter) meshColor(paint pdfgo.Paint, box Box) (*FillColor, error)
return color, nil
}
// pdfMeshVertex 保存局部毫米坐标及原曲面参数
type pdfMeshVertex struct {
point pdfgo.Point
u, v float64
}
// pdfMeshTriangle 保存按输出精度细分的曲面网格
type pdfMeshTriangle struct {
vertices [3]pdfMeshVertex
patch int
}
// pdfMeshKey 区分网格及其输出混合空间
type pdfMeshKey struct {
mesh *pdfgo.MeshGradient
space *pdfgo.ColorSpace
}
// pdfMeshPixel 保存抗锯齿覆盖率与源空间合成分量
type pdfMeshPixel struct {
values [4]float64
shape float64
}
// pdfMeshSample 保存采样点参数,patch为一基编号,零表示未覆盖
type pdfMeshSample struct {
u, v float64
patch int
}
// meshTriangles 按曲面二阶导数界细分,将几何误差控制在输出像素的十六分之一内
// 入参: mesh 原始曲面
// 返回: []pdfMeshTriangle 细分结果, error 取消或坐标错误