How to crop gtk pixbufs

I have gtk-pixbuf from svg and you want to crop it to a specific size in specific coordinates.

Anyone have an easy solution possible for this?

+3
source share
2 answers

decided it differently:

just created subpixbuf with coodinates:

cropped_buffer=pixbuf.subpixbuf(x,y,width,height)

+2
source

svg has a viewbox attribute . You can use this one.

0
source

Source: https://habr.com/ru/post/1755040/


All Articles