rough-stuff / rough

Create graphics with a hand-drawn, sketchy, appearance
http://roughjs.com
MIT License
19.83k stars 613 forks source link

Path is not filled correctly #165

Closed haan123 closed 2 years ago

haan123 commented 4 years ago

Hi @pshihn,

Could you please take a look to this issue, when a rectangle path containing 2 hole inside it, the filling looks like screenshot below :(, thanks!

https://jsfiddle.net/483y5tdo/

generator.path(pathData, {
  "stroke": "#000000",
  "fill": "#ced4da",
  "fillStyle": "solid",
  "strokeWidth": 1,
  "roughness": 0,
  "seed": 1067011870,
  "combineNestedSvgPaths": true
})

image

Thanks!

pshihn commented 2 years ago

I'm working on improving algorithm to support this. Sorry for the late response. Infant baby = neglect open source :(

pshihn commented 2 years ago

Fixed by https://github.com/rough-stuff/rough/pull/195 Releases as v4.5.0 on npm.