drawing - Cairo test if text overlaps -


Using Cairo, I'm keeping some text in random situations, and I have to know whether they are already ready Overlap the arbitrary shapes that occur. I could clip the path of the previous diagrams, and if there is a clipping, it means that there is overlap. However, there is no work to tell Cairo that clipping or not.

Do I have no way to fulfill it easily? I think I just basically want to see if two shapes should be detected or not.

To get the quality you want, you get to cairo_stroke_extents , Can work on cairo_fill_extents and cairo_text_extents and border boxes.

A better method to calculate only the text box of text and check the four corners against cairo_in_fill or cairo_in_stroke against the final code. The maximum error will be the distance from a single glyph to its bounding box, but perhaps it is enough for your purpose.

The last option is to level the text and check any point the previous step.


Comments

Popular posts from this blog

MySql variables and php -

php - Laravel - Overriding a resource route into a different route filter group -

url rewriting - How to implement the returnurl like SO in PHP? -