(type: RoughOptionsType, seed: number)
| 6 | type RoughOptionsType = 'highlight' | 'single' | 'double'; |
| 7 | |
| 8 | function getOptions(type: RoughOptionsType, seed: number): ResolvedOptions { |
| 9 | return { |
| 10 | maxRandomnessOffset: 2, |
| 11 | roughness: type === 'highlight' ? 3 : 1.5, |
| 12 | bowing: 1, |
| 13 | stroke: '#000', |
| 14 | strokeWidth: 1.5, |
| 15 | curveTightness: 0, |
| 16 | curveFitting: 0.95, |
| 17 | curveStepCount: 9, |
| 18 | fillStyle: 'hachure', |
| 19 | fillWeight: -1, |
| 20 | hachureAngle: -41, |
| 21 | hachureGap: -1, |
| 22 | dashOffset: -1, |
| 23 | dashGap: -1, |
| 24 | zigzagOffset: -1, |
| 25 | combineNestedSvgPaths: false, |
| 26 | disableMultiStroke: type !== 'double', |
| 27 | disableMultiStrokeFill: false, |
| 28 | seed |
| 29 | }; |
| 30 | } |
| 31 | |
| 32 | function parsePadding(config: RoughAnnotationConfig): FullPadding { |
| 33 | const p = config.padding; |
no outgoing calls
no test coverage detected
searching dependent graphs…