mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-27 17:30:11 +01:00
cairo_copy cairo_get_path cairo_get_path_flat cairo_matrix_create cairo_matrix_destroy cairo_matrix_copy cairo_matrix_get_affine cairo_surface_set_repeat cairo_surface_set_matrix cairo_surface_get_matrix cairo_surface_set_filter cairo_surface_get_filter Also, eliminate all support for compiling against, or running with old, deprecated names for functions. Deal with all of the removals.
62 lines
2.2 KiB
Bash
Executable file
62 lines
2.2 KiB
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
|
|
if [ $# -lt 1 ]; then
|
|
argv0=`basename $0`
|
|
echo "$argv0: Update source code to the lastest Cairo API" >&2
|
|
echo "" >&2
|
|
echo "Usage: $argv0 file [...]" >&2
|
|
exit 1
|
|
fi
|
|
|
|
cairo_api_update() {
|
|
file=$1
|
|
backup=$file.bak
|
|
|
|
cp $file $backup
|
|
sed -e '
|
|
s/cairo_current_font_extents/cairo_font_extents/g
|
|
s/cairo_get_font_extents/cairo_font_extents/g
|
|
s/cairo_current_operator/cairo_get_operator/g
|
|
s/cairo_current_tolerance/cairo_get_tolerance/g
|
|
s/cairo_current_point/cairo_get_current_point/g
|
|
s/cairo_current_fill_rule/cairo_get_fill_rule/g
|
|
s/cairo_current_line_width/cairo_get_line_width/g
|
|
s/cairo_current_line_cap/cairo_get_line_cap/g
|
|
s/cairo_current_line_join/cairo_get_line_join/g
|
|
s/cairo_current_miter_limit/cairo_get_miter_limit/g
|
|
s/cairo_current_matrix/cairo_get_matrix/g
|
|
s/cairo_current_target_surface/cairo_get_target_surface/g
|
|
s/cairo_get_status/cairo_status/g
|
|
s/cairo_get_status_string/cairo_status_string/g
|
|
s/cairo_concat_matrix/cairo_transform/g
|
|
s/cairo_scale_font/cairo_set_font_size/g
|
|
s/cairo_select_font/cairo_select_font_face/g
|
|
s/cairo_transform_font/cairo_set_font_matrix/g
|
|
s/cairo_transform_point/cairo_user_to_device/g
|
|
s/cairo_transform_distance/cairo_user_to_device_distance/g
|
|
s/cairo_inverse_transform_point/cairo_device_to_user/g
|
|
s/cairo_inverse_transform_distance/cairo_device_to_user_distance/g
|
|
s/cairo_init_clip/cairo_reset_clip/g
|
|
s/cairo_surface_create_for_image/cairo_image_surface_create_for_data/g
|
|
s/cairo_default_matrix/cairo_identity_matrix/g
|
|
s/cairo_matrix_set_affine/cairo_matrix_init/g
|
|
s/cairo_matrix_set_identity/cairo_matrix_init_identity/g
|
|
s/cairo_pattern_add_color_stop/cairo_pattern_add_color_stop_rgba/g
|
|
s/cairo_set_rgb_color/cairo_set_source_rgb/g
|
|
s/cairo_set_pattern/cairo_set_source/g
|
|
s/CAIRO_OPERATOR_SRC/CAIRO_OPERATOR_SOURCE/g
|
|
s/CAIRO_OPERATOR_DST/CAIRO_OPERATOR_DEST/g
|
|
s/CAIRO_OPERATOR_OVER_REVERSE/CAIRO_OPERATOR_DEST_OVER/g
|
|
s/CAIRO_OPERATOR_IN_REVERSE/CAIRO_OPERATOR_DEST_IN/g
|
|
s/CAIRO_OPERATOR_OUT_REVERSE/CAIRO_OPERATOR_DEST_OUT/g
|
|
s/CAIRO_OPERATOR_ATOP_REVERSE/CAIRO_OPERATOR_DEST_ATOP/g
|
|
' $backup > $file
|
|
}
|
|
|
|
while [ $# -gt 0 ]; do
|
|
file=$1
|
|
shift
|
|
cairo_api_update $file
|
|
done
|
|
|