text extents

Theo Veenker theo.veenker at beexy.nl
Thu Dec 19 15:24:05 UTC 2024


On 17/12/2024 11:25, Steven J Abner wrote:
> Good day to all,
> Question: Created an xcb surface for 'drawable' and currently create a similar for a 
> cairo_t* to gather extents. I did this because of uncertainty of cairo internal workings. 
> Is it safe, no actual drawing to surface, to just use the xcb surface to create a cairo_t* 
> for gathering of extents? Or, put in other words, do I need the similar surface? Can this 
> be done knowing the surface may be in it's rending state while
> query of extents?
>   Steve

Hi Steve,

Since no experts are responding... Since cairo aims to be pixel perfect I assume it 
shouldn't matter what surface you use. I always use a zero sized memory buffer surface for 
the purpose of extents calculation: cairo_image_surface_create(CAIRO_FORMAT_RGB24, 0, 0).

Theo

-- 
Theo Veenker  |  Behavioral Experiment Systems
+31(0)524-541531  |  +31(0)6-42525777 mobile
theo.veenker at beexy.nl  |  www.beexy.nl


More information about the cairo mailing list