Crash program with cairo_recording_surface_create and with big rectangle size

Fontana Nicola ntd at entidi.it
Mon Mar 18 05:28:01 UTC 2024


Il giorno ven, 15/03/2024 alle 14.28 +0200, Kęstutis ha scritto:
> ...
> What is the maximum width and height of a rectangle that I can use with 
> the recording surface?
> ...

Cairo internally uses 24.8 fixed arithmetic, so its hard limit should be
8388608. But cairo is coming from (and IIRC it was initially part of)
X11, where the protocol has 16.16 fixed arithmetic, and it is very
likely some old code has been built on that assumption. So to be on the
safe side I would never exceed 32768.

For more details you can check this (admittely old) thread:

    https://cairo.cairographics.narkive.com/Mkjwvkep/32k-limit-with-image-surface

Ciao.
-- 
Nicola



More information about the cairo mailing list