feat(渲染转换): 完善PDF转换及点线绘制
build.yaml / build (push) Successful in 43s

This commit is contained in:
xiaoqidun committed 2026-09-27 15:26:10 +08:00
1 parent e78ea6f919
commit 3b9f88cbba
16 files changed
+383 -43

No files matched your search

+25
View File
@@ -24,6 +24,31 @@ import (
// 坐标以左上角为原点,单位为毫米,子路径从Move开始,Close回到当前子路径起点
type GeometryPath []GeometrySegment
// stationaryEndpoint 判断贝塞尔曲线端点是否具有零一阶导数
// 返回: bool 是否存在驻点端点
func (p GeometryPath) stationaryEndpoint() bool {
var current, start Point
for _, segment := range p {
switch segment.Verb {
case GeometryMove:
start = segment.End
case GeometryCubic:
if segment.Control1 == current || segment.Control2 == segment.End {
return true
}
case GeometryQuad:
if segment.Control1 == current || segment.Control1 == segment.End {
return true
}
case GeometryClose:
current = start
continue
}
current = segment.End
}
return false
}
// GeometryVerb 表示几何路径指令
type GeometryVerb uint8