mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Add 'Fine' stroke width option for freehand tool
This commit is contained in:
parent
b5d60973b7
commit
1c0c6adbf3
4 changed files with 31 additions and 2 deletions
|
@ -1033,10 +1033,18 @@ export function getFreeDrawSvgPath(element: ExcalidrawFreeDrawElement) {
|
|||
? element.points.map(([x, y], i) => [x, y, element.pressures[i]])
|
||||
: [[0, 0, 0.5]];
|
||||
|
||||
let size;
|
||||
if (element.strokeWidth === 0.5) {
|
||||
size = 1.5;
|
||||
} else {
|
||||
// existin stroke widths
|
||||
size = element.strokeWidth * 4.25;
|
||||
}
|
||||
|
||||
// Consider changing the options for simulated pressure vs real pressure
|
||||
const options: StrokeOptions = {
|
||||
simulatePressure: element.simulatePressure,
|
||||
size: element.strokeWidth * 4.25,
|
||||
size: size,
|
||||
thinning: 0.6,
|
||||
smoothing: 0.5,
|
||||
streamline: 0.5,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue