<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - cairo_region cannot be used with CLIP, as NO public API is exposed to use it in cairo_context/surface"
href="https://bugs.freedesktop.org/show_bug.cgi?id=55836#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - cairo_region cannot be used with CLIP, as NO public API is exposed to use it in cairo_context/surface"
href="https://bugs.freedesktop.org/show_bug.cgi?id=55836">bug 55836</a>
from <span class="vcard"><a class="email" href="mailto:adhir.garg@gmail.com" title="Adhir <adhir.garg@gmail.com>"> <span class="fn">Adhir</span></a>
</span></b>
<pre>I was looking for direct function to
(1) Use cairo_region_t directly in cairo context OR
(2) Somehow, get the clipping region intersect with cairo_region_t, so
that my drawing occurs only in intersected region.
Assuming that cairoregion already exists, a workaround suggested in
the website states
(1) From Cairo Region, get ALL rectangles via cairo_region_num_rectangles
(2) For each rectangle, actually create rectangle via cairo_rectangle
(3) Use clip_path
(1) - (3) now means that the current path consists of the entire region
(4) Create a new path via cairo_line_to
(5) Clip it
I was looking for direct function which has just steps (4) and (5)
(1) Create a new path via cairo_line etc.
(2) call cairo_clip_intersect(m_cr, region)
On Wed, Oct 10, 2012 at 4:48 PM, <<a href="mailto:bugzilla-daemon@freedesktop.org">bugzilla-daemon@freedesktop.org</a>> wrote:
<span class="quote">> <a href="show_bug.cgi?id=55836#c3">Comment # 3</a> on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - cairo_region cannot be used with CLIP, as NO public API is exposed to use it in cairo_context/surface"
href="show_bug.cgi?id=55836">bug 55836</a> from Chris Wilson</span >
>
<span class="quote">> What you are looking for and what cairo will provide are two separate
> things...</span >
>
<span class="quote">> Separating the action of adding the path from the operation, provides much
> greater flexibilty. For example:
> cairo_append_region();
> cairo_clip_preserve();
> cairo_stroke();</span >
>
<span class="quote">> And cairo is still free to use the knowledge that we have a region to
> optimise
> it path.</span >
>
<span class="quote">> ________________________________
> You are receiving this mail because:</span >
>
<span class="quote">> You are on the CC list for the bug.
> You reported the bug.
> You are watching the QA Contact of the bug.</span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>