v1.3.13: 模块化注册架构 + PDS流程设计套件更名 + 依赖/圆周交互修复
- 模块化:EdcModule 契约 + registry + 模块独立目录;发布包增加 modules/registry.json - 更名:PDS流程设计套件 / ProcessDesignSuite;同步构建、发布脚本与文档 - 时序图:依赖偏移以时间显示/编辑;紧贴依赖隐藏箭头并在接缝显示标签;动作条磁吸 - 圆周:依赖标签沿圆弧方向、环间空隙;动作旋转磁吸增强;短弧标签优先动作名 - 清理:release 移至源码同级(本地不入库);tool 合并到 tools;发布说明迁移 docs/release-notes
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
/// 导出画布的共享几何约束:固定 1920×1080、2 倍像素比、内容区与
|
||||
/// 缩放/平移结果 [ExportFit]。
|
||||
///
|
||||
/// 架构位置:`lib/export/` 为共享导出层,不依赖任何具体模块;时序图与
|
||||
/// 架构图模块各自的导出逻辑都复用这里的常量与 [ExportFit]。
|
||||
library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:sequence_diagram/theme/tokens.dart';
|
||||
|
||||
/// 导出画布尺寸(固定逻辑尺寸)。
|
||||
const Size kExportSize = Size(1920, 1080);
|
||||
|
||||
/// 导出渲染像素比:按 2 倍渲染成 3840×2160,保证高分辨率打印清晰。
|
||||
const double kExportPixelRatio = 2.0;
|
||||
|
||||
/// 导出内容区域(标题/图例之外的内容区)。
|
||||
const Rect kExportContentArea = Rect.fromLTRB(48, 128, 1872, 1016);
|
||||
|
||||
/// 导出内容变换:`scale` + `translate(tx, ty)`。
|
||||
class ExportFit {
|
||||
/// 构造内容变换。
|
||||
const ExportFit(this.scale, this.tx, this.ty);
|
||||
|
||||
/// 缩放系数。
|
||||
final double scale;
|
||||
|
||||
/// 水平平移。
|
||||
final double tx;
|
||||
|
||||
/// 垂直平移。
|
||||
final double ty;
|
||||
|
||||
/// SVG transform 属性值。
|
||||
String get svgTransform =>
|
||||
'translate(${tx.toStringAsFixed(1)} ${ty.toStringAsFixed(1)}) scale(${scale.toStringAsFixed(4)})';
|
||||
}
|
||||
|
||||
/// 导出专用令牌:始终使用浅色、纯白背景(印刷 / 工艺卡导向),
|
||||
/// 文字、语义色与屏幕浅色主题保持一致。
|
||||
Tokens exportTokens(Tokens base) {
|
||||
return Tokens(
|
||||
brightness: Brightness.light,
|
||||
bg: Colors.white,
|
||||
canvas1: Colors.white,
|
||||
canvas2: Colors.white,
|
||||
chrome: base.chrome,
|
||||
panel: Colors.white,
|
||||
panel2: Colors.white,
|
||||
dialog: Colors.white,
|
||||
line: base.line,
|
||||
line2: base.line2,
|
||||
text: base.text,
|
||||
text2: base.text2,
|
||||
sub: base.sub,
|
||||
dim: base.dim,
|
||||
accent: base.accent,
|
||||
accent2: base.accent2,
|
||||
ok: base.ok,
|
||||
warn: base.warn,
|
||||
danger: base.danger,
|
||||
fs: base.fs,
|
||||
ss: base.ss,
|
||||
crit: base.crit,
|
||||
chip: Colors.white,
|
||||
dial: Colors.white,
|
||||
arcText: base.arcText,
|
||||
onAccent: base.onAccent,
|
||||
ringA: base.ringA,
|
||||
ringB: base.ringB,
|
||||
ringEdge: base.ringEdge,
|
||||
ringLabel: base.ringLabel,
|
||||
info: Colors.white,
|
||||
track: base.track,
|
||||
sel: base.sel,
|
||||
grid: base.grid,
|
||||
shadow: base.shadow,
|
||||
shadowOp: 0.10,
|
||||
selOutline: base.selOutline,
|
||||
overlay: base.overlay,
|
||||
tailOp: base.tailOp,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user