1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Layout and colour constants for the venn diagram renderer.
// ---------------------------------------------------------------------------
// Canvas geometry
// ---------------------------------------------------------------------------
/// Default SVG canvas width (px).
pub const SVG_WIDTH: f64 = 800.0;
/// Default SVG canvas height (px).
pub const SVG_HEIGHT: f64 = 450.0;
/// Height reserved at the top of the canvas for the diagram title (px).
pub const TITLE_HEIGHT: f64 = 48.0;
/// Scale factor for font sizes and stroke widths, derived from the ratio
/// of SVG_WIDTH to a 1600px reference width (mirrors vennRenderer.ts).
pub const SCALE: f64 = SVG_WIDTH / 1600.0;
// ---------------------------------------------------------------------------
// Circle layout
// ---------------------------------------------------------------------------
/// Overlap separation factor for 2-set layout (gap = r × this factor, ~20% overlap).
pub const TWO_SET_SEP_FACTOR: f64 = 1.1;
/// Radius scale factor for 3-set layout (radius = base_r × this).
pub const THREE_SET_R_FACTOR: f64 = 0.80;
/// Distance factor for 3-set layout (dist = r × this).
pub const THREE_SET_DIST_FACTOR: f64 = 1.05;
// ---------------------------------------------------------------------------
// Colour palette
// ---------------------------------------------------------------------------
/// Venn diagram set colour palette (venn1–venn8 from the default Mermaid theme).
pub const VENN_COLORS: & = &;
// ---------------------------------------------------------------------------
// SVG identifiers
// ---------------------------------------------------------------------------
/// Fixed id attribute for the venn diagram SVG root element.
pub const SVG_ID: &str = "mermaid-venn";