Re: Cairo and ISO C++
Bill Spitzak <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
Jeff Muizelaar wrote: > I've only quickly skimmed this proposal but one suggestion that > immediately comes to mind is to drop the EXTEND_NONE mode. I've only > ever seen this extend mode in cairo. It's not in CoreGraphics, Skia, or > Direct2D and is not very efficiently implemented on GPUs. > > It's also a bit of a user trap because the intuitive way to draw an > image is with cairo_paint_surface() which works as long as the > transformation matrix is the identity. As soon as it is not, you end up > with fuzzy image borders. CoreGraphics, Skia and Direct2D all solve this > problem by having api similar to HTML Canvas's drawImage() that > effectively does set_extend(EXTEND_PAD); clip(imageBoundsRect()); > paint(image); Yes please, this is another defect in Cairo which could be fixed by the C++ wrapper. Cairo produces the correct image if you use EXTEND_PAD and intersect the current clip with the transform of the source image's bounding box, I would intercept attempts to set EXTEND_NONE and do this instead. -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo