mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
refactor: 调整形状viewBox属性
This commit is contained in:
parent
c7c9292ba6
commit
47234085da
@ -1,43 +1,48 @@
|
||||
export interface ShapePoolItem {
|
||||
viewBox: number;
|
||||
viewBox: [number, number];
|
||||
path: string;
|
||||
special?: boolean;
|
||||
}
|
||||
|
||||
export const SHAPE_LIST = [
|
||||
interface ShapeListItem {
|
||||
type: string;
|
||||
children: ShapePoolItem[];
|
||||
}
|
||||
|
||||
export const SHAPE_LIST: ShapeListItem[] = [
|
||||
{
|
||||
type: '矩形',
|
||||
children: [
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 20 0 L 180 0 Q 200 0 200 20 L 200 180 Q 200 200 180 200 L 20 200 Q 0 200 0 180 L 0 20 Q 0 0 20 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 L 0 150 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 L 0 200'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 140 0 Q 200 0 200 60 L 200 200 L 60 200 Q 0 200 0 140 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 140 0 Q 200 0 200 60 L 200 200 L 0 200 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 50 Z'
|
||||
},
|
||||
]
|
||||
@ -47,143 +52,143 @@ export const SHAPE_LIST = [
|
||||
type: '常用形状',
|
||||
children: [
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z',
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 L 0 200 L 200 200 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 0 200 L 200 200 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z',
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',
|
||||
},
|
||||
],
|
||||
@ -193,100 +198,100 @@ export const SHAPE_LIST = [
|
||||
type: '箭头',
|
||||
children: [
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z'
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z',
|
||||
special: true,
|
||||
},
|
||||
@ -297,82 +302,82 @@ export const SHAPE_LIST = [
|
||||
type: '其他形状',
|
||||
children: [
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z',
|
||||
special: true,
|
||||
},
|
||||
{
|
||||
viewBox: 1024,
|
||||
viewBox: [1024, 1024],
|
||||
path: 'M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z',
|
||||
special: true,
|
||||
},
|
||||
|
@ -301,8 +301,8 @@ export default () => {
|
||||
}
|
||||
else {
|
||||
const scale = {
|
||||
x: el.width / el.viewBox,
|
||||
y: el.height / el.viewBox,
|
||||
x: el.width / el.viewBox[0],
|
||||
y: el.height / el.viewBox[1],
|
||||
}
|
||||
const points = formatPoints(toPoints(el.path), scale)
|
||||
|
||||
|
@ -13,7 +13,7 @@ export const layouts: Slide[] = [
|
||||
top: 200,
|
||||
width: 546,
|
||||
height: 362.5,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 0 200 L 200 200 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -27,7 +27,7 @@ export const layouts: Slide[] = [
|
||||
top: 0,
|
||||
width: 300,
|
||||
height: 320,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 0 200 L 200 200 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -125,7 +125,7 @@ export const layouts: Slide[] = [
|
||||
top: 432.73148148148147,
|
||||
width: 1056.2962962962963,
|
||||
height: 162.96296296296296,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -147,7 +147,7 @@ export const layouts: Slide[] = [
|
||||
top: 175.5092592592593,
|
||||
width: 605.1851851851851,
|
||||
height: 185.18518518518516,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -160,7 +160,7 @@ export const layouts: Slide[] = [
|
||||
top: 201.80555555555557,
|
||||
width: 605.1851851851851,
|
||||
height: 185.18518518518516,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -196,7 +196,7 @@ export const layouts: Slide[] = [
|
||||
top: 0,
|
||||
width: 352.59259259259255,
|
||||
height: 562.5,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 200 0 L 200 200 L 0 200 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -209,7 +209,7 @@ export const layouts: Slide[] = [
|
||||
top: 100.13888888888887,
|
||||
width: 362.22222222222223,
|
||||
height: 362.22222222222223,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: 'rgba(255,255,255,0)',
|
||||
fixedRatio: false,
|
||||
@ -227,7 +227,7 @@ export const layouts: Slide[] = [
|
||||
top: 145.32407407407408,
|
||||
width: 271.85185185185185,
|
||||
height: 271.85185185185185,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{backgroundColor}}',
|
||||
fixedRatio: false,
|
||||
@ -281,7 +281,7 @@ export const layouts: Slide[] = [
|
||||
top: 141.8496472663139,
|
||||
width: 278.80070546737215,
|
||||
height: 278.80070546737215,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: true,
|
||||
@ -299,7 +299,7 @@ export const layouts: Slide[] = [
|
||||
top: 98.287037037037,
|
||||
width: 87.12522045855381,
|
||||
height: 87.12522045855381,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: true,
|
||||
@ -323,7 +323,7 @@ export const layouts: Slide[] = [
|
||||
top: 237.68738977072314,
|
||||
width: 87.12522045855381,
|
||||
height: 87.12522045855381,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: true,
|
||||
@ -347,7 +347,7 @@ export const layouts: Slide[] = [
|
||||
top: 377.08774250440916,
|
||||
width: 87.12522045855381,
|
||||
height: 87.12522045855381,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: true,
|
||||
@ -371,7 +371,7 @@ export const layouts: Slide[] = [
|
||||
top: 237.6873897707231,
|
||||
width: 87.12522045855381,
|
||||
height: 87.12522045855381,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: true,
|
||||
@ -443,7 +443,7 @@ export const layouts: Slide[] = [
|
||||
top: 196.4351851851852,
|
||||
width: 169.62962962962962,
|
||||
height: 169.62962962962962,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{backgroundColor}}',
|
||||
fixedRatio: false,
|
||||
@ -465,7 +465,7 @@ export const layouts: Slide[] = [
|
||||
top: 149.02777777777771,
|
||||
width: 264.4444444444445,
|
||||
height: 264.4444444444445,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -484,7 +484,7 @@ export const layouts: Slide[] = [
|
||||
top: 217.17592592592587,
|
||||
width: 128.14814814814812,
|
||||
height: 128.14814814814812,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{backgroundColor}}',
|
||||
fixedRatio: false,
|
||||
@ -774,7 +774,7 @@ export const layouts: Slide[] = [
|
||||
top: 64.21296296296302,
|
||||
width: 49.629629629629626,
|
||||
height: 49.629629629629626,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -806,7 +806,7 @@ export const layouts: Slide[] = [
|
||||
top: 64.21296296296302,
|
||||
width: 49.629629629629626,
|
||||
height: 49.629629629629626,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -838,7 +838,7 @@ export const layouts: Slide[] = [
|
||||
top: 221.25000000000003,
|
||||
width: 49.629629629629626,
|
||||
height: 49.629629629629626,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -870,7 +870,7 @@ export const layouts: Slide[] = [
|
||||
top: 221.25000000000003,
|
||||
width: 49.629629629629626,
|
||||
height: 49.629629629629626,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -902,7 +902,7 @@ export const layouts: Slide[] = [
|
||||
top: 378.287037037037,
|
||||
width: 49.629629629629626,
|
||||
height: 49.629629629629626,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
@ -934,7 +934,7 @@ export const layouts: Slide[] = [
|
||||
top: 378.287037037037,
|
||||
width: 49.629629629629626,
|
||||
height: 49.629629629629626,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
|
||||
fill: '{{themeColor}}',
|
||||
fixedRatio: false,
|
||||
|
@ -11,7 +11,7 @@ export const slides: Slide[] = [
|
||||
top: 200,
|
||||
width: 546,
|
||||
height: 362.5,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 0 200 L 200 200 Z',
|
||||
fill: '#5b9bd5',
|
||||
fixedRatio: false,
|
||||
@ -25,7 +25,7 @@ export const slides: Slide[] = [
|
||||
top: 0,
|
||||
width: 300,
|
||||
height: 320,
|
||||
viewBox: 200,
|
||||
viewBox: [200, 200],
|
||||
path: 'M 0 0 L 0 200 L 200 200 Z',
|
||||
fill: '#5b9bd5',
|
||||
fixedRatio: false,
|
||||
|
@ -254,7 +254,7 @@ export interface ShapeText {
|
||||
*
|
||||
* type: 元素类型(shape)
|
||||
*
|
||||
* viewBox: SVG的viewBox属性,默认为正方形,例如 1000 表示 '0 0 1000 1000'
|
||||
* viewBox: SVG的viewBox属性,例如 [1000, 1000] 表示 '0 0 1000 1000'
|
||||
*
|
||||
* path: 形状路径,SVG path 的 d 属性
|
||||
*
|
||||
@ -280,7 +280,7 @@ export interface ShapeText {
|
||||
*/
|
||||
export interface PPTShapeElement extends PPTBaseElement {
|
||||
type: 'shape';
|
||||
viewBox: number;
|
||||
viewBox: [number, number];
|
||||
path: string;
|
||||
fixedRatio: boolean;
|
||||
fill: string;
|
||||
|
@ -11,7 +11,7 @@
|
||||
height="18"
|
||||
>
|
||||
<g
|
||||
:transform="`scale(${18 / shape.viewBox}, ${18 / shape.viewBox}) translate(0,0) matrix(1,0,0,1,0,0)`"
|
||||
:transform="`scale(${18 / shape.viewBox[0]}, ${18 / shape.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`"
|
||||
>
|
||||
<path
|
||||
class="shape-path"
|
||||
|
@ -37,7 +37,7 @@
|
||||
/>
|
||||
</defs>
|
||||
<g
|
||||
:transform="`scale(${elementInfo.width / elementInfo.viewBox}, ${elementInfo.height / elementInfo.viewBox}) translate(0,0) matrix(1,0,0,1,0,0)`"
|
||||
:transform="`scale(${elementInfo.width / elementInfo.viewBox[0]}, ${elementInfo.height / elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`"
|
||||
>
|
||||
<path
|
||||
vector-effect="non-scaling-stroke"
|
||||
|
@ -41,7 +41,7 @@
|
||||
/>
|
||||
</defs>
|
||||
<g
|
||||
:transform="`scale(${elementInfo.width / elementInfo.viewBox}, ${elementInfo.height / elementInfo.viewBox}) translate(0,0) matrix(1,0,0,1,0,0)`"
|
||||
:transform="`scale(${elementInfo.width / elementInfo.viewBox[0]}, ${elementInfo.height / elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`"
|
||||
>
|
||||
<path
|
||||
class="shape-path"
|
||||
|
Loading…
x
Reference in New Issue
Block a user