Re: zero size textures?

Uli Schlachter <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 16.12.2017 16:18, `VL wrote:
> On 16.12.2017 12:48, Uli Schlachter wrote:
[...]
>>> So the question - is it ok to call cairo functions with zero sizes
>>> and expect some valid result? Could it be some bug in cairo (xcb backend) ?
>> Look at cairo_status() and/or cairo_surface_status(). Once an object
>> ends up in an error state, all operations in it will fail.
> ok, this explains why further rendering stops.
> But I can't find a function to reset state and somehow rollback operation.
> My app did all operations in a block of cairo_save/cairo_restore, but it
> doesn't seem to help with error state.
> 
> Or am I supposed to re-create whole context on any error?
[...]
I'm afraid that errors are sticky. I guess you are supposed not to cause
any, sorry.

Can't you check for a scale of zero before doing cairo_scale() and if
you see a zero there, you just skip the whole block of drawing operations?

Cheers,
Uli
-- 
- Captain, I think I should tell you I've never
  actually landed a starship before.
- That's all right, Lieutenant, neither have I.
-- 
cairo mailing list
[email protected]
https://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.