Comments (4)
Well the tessellator in MonkVG expects all vgPaths to never have two paths that aren't overlapping. I'm pretty sure the OpenVG spec specifies that, but I would need to do a bit more reading. I'm surprised that SVG would allow that as most tessellators can't handle that case -- but again I would have to look at that more. MonkVG uses the opengl glu tessellator to generate the the triangle mesh from the 2d contours and so MonkVG is limited to what it can do. Perhaps an offline tool can be used to separate non-overlapping sub paths -- but again I'm very surprised that is valid SVG.
from monksvg.
This may be a problem with the parsing. I noticed that there is an issue where only the first group of items inside the svg tags are displayed. If it has subgroups all the subgroups will be displayed as well. But any group after that doesnt get displayed. I bet if you move the last square into the group with the others it will be displayed.
from monksvg.
Ok, I've seen this issue before and it is an issue with the tessellation library (gluTess) used in MonkVG. It cannot handle multiple unconnected contours that aren't overlapping (it can handle holes because a hole will overlap, but not the case you are showing). Nothing I can really do about that other then:
- Check if that condition exists in MonkSVG after every "Z -- Closed Path -- onPathClose". Problem is it potentially very time intensive and still potentially inaccurate because I can think of cases where a simple AABB overlap case wouldn't work. But, I guess it could be implemented and allow the user to turn it on or off.
- Write a whole new tesseleator. Probably not going to happen anytime soon.
It would be awesome if you could implement and donate to the project solution 1 (with the ability to turn if on/off programmatically). Basically:
- Keep track off all closed paths within a "onPathBegin/onPathEnd".
- At on "onPathEnd" Calculate all the AABBs of all the sub-paths and see if the overlap. Any non-overlapping AABBs make into there own paths. You will need a lot of tracking logic because you can have two different pair groups of AABBs that overlap within the pairs but not overlap each other. There is also the case that you can have a non-convex path and it would appear to overlap with the AABB test but not actually render properly. Ughh…
On Jun 3, 2013, at 11:07 AM, W1ngy [email protected] wrote:
This may be a problem with the parsing. I noticed that there is an issue where only the first group of items inside the svg tags are displayed. If it has subgroups all the subgroups will be displayed as well. But any group after that doesnt get displayed. I bet if you move the last square into the group with the others it will be displayed.
—
Reply to this email directly or view it on GitHub.
from monksvg.
If you can't fix it then why not to split path tag programmatically into a several paths without unlinked segments
from monksvg.
Related Issues (19)
- Circles drawn with the onPathSCubic are mishapen HOT 1
- Can't Archive and Distribute a test project HOT 2
- Only first child node is parsed for root element HOT 1
- stroke-linecap is not implemented HOT 1
- stroke-linejoin is almost unimplemented HOT 3
- fill="none" is not implemented?
- A simple Line bug? HOT 5
- Circle tag
- Application falls down
- A little bug with path parsing
- Another problem with g tag HOT 1
- text tag is not implemented
- call drawing twice? HOT 3
- Possible bug with shaders HOT 3
- Bug with colors in OpenGL ES 2.0 HOT 1
- test project doesn't work
- MAXFLOAT is undefined error
- Simple straight-line corner-node based polygons don't draw. HOT 2
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 monksvg.