Comments (10)
I've also bumped into this. Given this SVG (uploaded as a zip since GitHub refuses to attach SVGs):
the following output is observed (ignore the clipped bottom of the frame):
The correct output should look like this (ignoring discrepancies in line joins, which pathfinder doesn't implement yet):
This SVG includes both closed and open paths. Observed issues:
- Closed paths are not actually getting the last edge added to close them
- Sometimes the right-most pair of edges in a path get badly triangulated. This doesn't seem to be affected by whether the path is created in a clockwise or anti-clockwise fashion.
- The top-left path isn't being rendered.
- All paths are exactly twice as thick as expected.
I have seen similar issues when using Pathfinder in an OpenGL ES renderer I'm working on, with much more complex graphics. The above SVG renders with identical problems in my renderer as well.
@pcwalton What are your thoughts?
from pathfinder.
Interesting, thanks for the report! I'll take a look.
from pathfinder.
I believe this is all fixed. Thanks for the bug report!
from pathfinder.
I've checked out the latest commit, and although most of the problems are fixed, the top left spiral shape is still not showing up. Also, the closed black pentagon does not appear to be joining the starting edge with the last edge. This is what I see:
from pathfinder.
On further inspection, it appears that the spiral shape only shows up when using XCAA. Under other modes it doesn't appear.
from pathfinder.
It appears that some new problems have appeared as a result of these fixes.
Before the fixes, this svg (a stroked and filled path generated from some text in Inkscape) looked like this (using XCAA):
Now it looks like this:
and with no anti-aliasing, it looks like this:
For reference, all browsers I tried it on rendered it natively like this:
from pathfinder.
@dylanede Did you rebuild the demo with npm run build
? It was a client-side fix, not a server-side one. The top left path shows up locally for me under all AA modes.
from pathfinder.
Ah, it's possible that I didn't. That could explain it. When I'm back at that machine I'll check.
However with the other problem (the strokes in the "Testing" image) I have seen similar behaviour in my own renderer after updating the dependency on pathfinder, so it's not affected by changes in the client.
from pathfinder.
Seems when using the new stroke logic, every EndPoint.subpath_index
is 0
no matter how many subpaths are there in the PathBuffer
. Is this a bug?
from pathfinder.
Oops, it seems that I need to consume the stream once again in a new PathBuffer to make the numbers correct. Ignore my last report please
from pathfinder.
Related Issues (20)
- Project state HOT 3
- Mismatched dependencies in text package HOT 1
- Can't build demo for mac without EGL HOT 1
- Can not locate shaders and other resources
- Export as pdf HOT 2
- pathfinder_simd failed to compile with nightly toolchain on Apple M1 MBP
- [Dx9] Incorrect clipping when the destination texture width is not a multiple of the tile size
- PartialEq not implemented for pathfinder_simd::arm::F32x2 HOT 1
- android render problem HOT 3
- Compile Error on nightly, unknown feature `stdsimd` HOT 14
- Panicking when font is not found or can't be loaded
- Linking Error when building pathfinder_canvas with pf-text HOT 2
- Compile Error on nightly, platform_intrinsics - feature has been removed HOT 1
- use `portable_simd` for simd implementation
- cannot get bounding box of a path HOT 2
- Please publish a new crates.io release HOT 4
- compile issue on Fedora 39, freetype2 not found
- Crate does not build due to stdarch_arm_crc32 feature
- Fails to build on MacOS HOT 2
- Build Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pathfinder.