Comments (2)
nanovg has some flaws when calculating whether a polygon is convex. The reason for this issue is that nanovg considers the star to be a convex polygon, so it uses the drawing method of convex polygons instead of stencil-then-cover, resulting in incorrect drawing results.
The key to fixing the issue is to improve the algorithm of convex polygons. For example, add some new ways to determine whether it is convex, like skia:
https://github.com/google/skia/blob/chrome/m120/src/core/SkPath.cpp#L2152-L2191
from nanovg.
nanovg has some flaws when calculating whether a polygon is convex. The reason for this issue is that nanovg considers the star to be a convex polygon, so it uses the drawing method of convex polygons instead of stencil-then-cover, resulting in incorrect drawing results.
The key to fixing the issue is to improve the algorithm of convex polygons. For example, add some new ways to determine whether it is convex, like skia:
https://github.com/google/skia/blob/chrome/m120/src/core/SkPath.cpp#L2152-L2191
Thank you for your answer, I tried it and added it to nanovg, thank you very much!
from nanovg.
Related Issues (20)
- Layer based drawing HOT 3
- outlines don’t draw properly HOT 2
- Edges of the curve are drawn at an angle HOT 9
- Draw an Arc with a Hole HOT 2
- Multiple scissors HOT 3
- Fix for MinGW: Replace -lGLEW with -lglew32
- support android ARGB format HOT 1
- Memory leak with freetype fonts [fix] HOT 4
- nvgArc does some ugly overdraw HOT 2
- [nvgTextBounds] string ending with space does not return expected bounds HOT 2
- `nvgArc` and `nvgArcTo` parameters correspondence and conversion
- building into a shared library HOT 6
- Transformation from Screen Space to World Space? HOT 1
- Arab, Hebrew and Persian
- ANSI Color Escape Sequences HOT 2
- Richtext HOT 2
- Proposal: Support for different NVGcontext types
- Frequent JVM crashes HOT 2
- nvgCreateGL failed
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 nanovg.