Re: how to substitute CAIRO_CLIP_PATH_IS_BOX ?

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Fri, Dec 11, 2015 at 01:07:55PM +0100, Enrico Weigelt, metux IT consult wrote:
> Hi folks,
> 
> 
> the flags field in cairo_clip_path_t had been removed, but the DRM
> backend still uses it:
> 
> > static cairo_clip_path_t *
> > _clip_get_solitary_path (const cairo_clip_t *clip)
> > {
> >     cairo_clip_path_t *iter = clip->path;
> >     cairo_clip_path_t *path = NULL;
> >
> >     do {
> >         if ((iter->flags & CAIRO_CLIP_PATH_IS_BOX) == 0) {
> >             if (path != NULL)
> >                 return FALSE;
> >
> >             path = iter;
> >         }
> >         iter = iter->prev;
> >     } while (iter != NULL);
> >
> >     return path;
> > }
> 
> 
> How should I substitute it ?

This basically was replace by cairo_clip_t managing boxes explicitly.
However, in this case what you want to convert over to is
_cairo_clip_get_polygon(). The intention is that we can reduce complex
clips very often to a single polygon and that even do geometric
intersection of clip paths with shapes (to avoid the fill overhead of
rendering multiple passes).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.