## various properties of cairo text_extent

when using cairo with python, the text_extent function call is powerful because it returns coordinate information of the text the user wants to print. However, the information depends on the Context which will be used when calling this function and this context may have different properties. Effected by order of Read more…

## python cairo selecting font

Here is how to select the font in cairo in python.

## change anti-aliasing(AA) option in cairocffi for text

By default, cairocffi will apply AA. If you want to disable or finetune the AA option when writing text, then check out the example code. Here is a no-AA image and a default AA settings image. for doc on AA options, check here.

## converting cv2 matrix to cairo surface(ARGB32 format)

In an earlier post, converting an existing cv2 matrix to cairo surface using cairo. RGB format was demonstrated. However, sometimes the user wants to load a specific image as the background in a semi-transparent manner in the cairo surface, like the image below. I am one of those people because Read more…

## converting cv2 img to cairo surface(cairo.RGB format)

When working with cairo, occasions arise when the user wants to directly load a surface from an image. Of course, one can use the create_from_png method but what if the user already has a variable that hold the image data in memory? I faced such situations often when working with opencv matrices Read more…