• YAMAMOTO Mitsuharu's avatar
    Implement native image rotation and cropping on cairo · 88c49ac3
    YAMAMOTO Mitsuharu authored
    * src/dispextern.h (struct image) [USE_CAIRO]:
    * src/image.c (free_image, image_clear_image_1)
    (image_set_crop, image_set_size, image_set_rotation)
    (image_create_x_image_and_pixmap) [USE_CAIRO]: #ifdef out HAVE_XRENDER part.
    * src/image.c (cr_create_surface_from_pix_containers) [USE_CAIRO]: Rename
    from cr_create_surface_from_pix_containers.  Change arguments to pair of
    Emacs_Pix_Container:s.  Move block_input and unblock_input to caller.
    (cr_put_image_to_cr_data) [USE_CAIRO]: New function.
    (prepare_image_for_display) [USE_CAIRO]: Use it.
    (image_set_transform) [USE_CAIRO]: Create dummy solid color pattern equipped
    with transformation matrix and set it to img->cr_data.
    * src/xterm.c (fringe_bmp) [USE_CAIRO]: Change type to cairo_pattern_t **.
    (x_cr_define_fringe_bitmap, x_cr_destroy_fringe_bitmap) [USE_CAIRO]: Create
    or destroy cairo pattern.
    (x_cr_draw_image) [USE_CAIRO]: Remove arguments image_width and image_height.
    Change type of image to cairo pattern.  All callers changed.
    * src/gtkutil.c (xg_get_image_for_pixmap) [USE_CAIRO]: Get cairo surface
    from img->cr_data, which is of cairo pattern now.
dispextern.h 124 KB