File size: 1,386 Bytes
f56a29b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
48
49
50
51
52
53
54
55
56
57
58
59
import type { LinePoint, LineStyleType } from '@/lib/types/slides';

export interface LinePoolItem {
  path: string;
  style: LineStyleType;
  points: [LinePoint, LinePoint];
  isBroken?: boolean;
  isBroken2?: boolean;
  isCurve?: boolean;
  isCubic?: boolean;
}

interface PresetLine {
  type: string;
  children: LinePoolItem[];
}

export const LINE_LIST: PresetLine[] = [
  {
    type: '直线',
    children: [
      { path: 'M 0 0 L 20 20', style: 'solid', points: ['', ''] },
      { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', ''] },
      { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'arrow'] },
      { path: 'M 0 0 L 20 20', style: 'dashed', points: ['', 'arrow'] },
      { path: 'M 0 0 L 20 20', style: 'solid', points: ['', 'dot'] },
    ],
  },
  {
    type: '折线、曲线',
    children: [
      {
        path: 'M 0 0 L 0 20 L 20 20',
        style: 'solid',
        points: ['', 'arrow'],
        isBroken: true,
      },
      {
        path: 'M 0 0 L 10 0 L 10 20 L 20 20',
        style: 'solid',
        points: ['', 'arrow'],
        isBroken2: true,
      },
      {
        path: 'M 0 0 Q 0 20 20 20',
        style: 'solid',
        points: ['', 'arrow'],
        isCurve: true,
      },
      {
        path: 'M 0 0 C 20 0 0 20 20 20',
        style: 'solid',
        points: ['', 'arrow'],
        isCubic: true,
      },
    ],
  },
];