refactor(simbolo): extraer la geometría del ≡ a lib/simbolo.ts
This commit is contained in:
1 parent
e76c492c3f
commit
fcd58fe00d
3 files changed
+43
-5
No files matched your search
@@ -0,0 +1,22 @@
|
||||
// Single source of truth for the ≡ glyph geometry. Both SimboloTresLineas
|
||||
// (which draws it with <rect>) and SecuenciaClaridad (which resolves into it
|
||||
// with <line>) read from here, so the symbol they produce is provably the
|
||||
// same one and not a lookalike.
|
||||
|
||||
export const VIEWBOX_SIMBOLO = '0 0 64 64';
|
||||
|
||||
export const BARRAS_SIMBOLO = [
|
||||
{ x: 13, y: 13, width: 38, height: 8 },
|
||||
{ x: 13, y: 28, width: 38, height: 8 },
|
||||
{ x: 13, y: 43, width: 38, height: 8 },
|
||||
] as const;
|
||||
|
||||
// Same three bars as strokes: a horizontal line through each bar's centre,
|
||||
// with the bar's height as stroke width.
|
||||
export const LINEAS_SIMBOLO = BARRAS_SIMBOLO.map((b) => ({
|
||||
x1: b.x,
|
||||
y1: b.y + b.height / 2,
|
||||
x2: b.x + b.width,
|
||||
y2: b.y + b.height / 2,
|
||||
grosor: b.height,
|
||||
}));
|
||||
Reference in new issue
Block a user