Summary: | pathinformation of a polygon or line | ||
---|---|---|---|
Product: | cairo | Reporter: | Volker <volkerobhof> |
Component: | general | Assignee: | Carl Worth <cworth> |
Status: | RESOLVED MOVED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | enhancement | ||
Priority: | high | ||
Version: | 1.9.5 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | sample view |
Description
Volker
2009-12-31 08:43:59 UTC
Created attachment 32384 [details]
sample view
What you actually want is not very clear. Cairo might expose some functions to test if a point is in a (closed) path (depending on the fill rule), but that doesn't seem to be what you're looking for. Your examples shows two paths which are not closed and to me it seems that the text in the circle arbitrarily stops when it reaches the radiuses. Could you try explaining the feature you want more in detail? Well, I only want to write text in shapes which I have painted. So I need at a defined position where the text inside a shape could reach out that the text can begin at a new line because everything should be written inside. What's the name of the function which returns a point of a closed path? Maybe it could be the right thing for me. (In reply to comment #3) > Well, I only want to write text in shapes which I have painted. So I need at a > defined position where the text inside a shape could reach out that the text > can begin at a new line because everything should be written inside. > > What's the name of the function which returns a point of a closed path? Maybe > it could be the right thing for me. cairo_in_fill() and cairo_in_stroke() test if a point is inside the drawn part of a path, but I'm afraid that they are not immediately useful for your purpose. Vikloud solves a related problem (drawing a "cloud" of text strings without collisions), so you might want to have a look at its source: http://vikloud.git.sourceforge.net/ IIRC the approach used in Vikloud is checking if the text extents collide with the colored pixels of the image. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/224. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.