implement Canvas.scale() for skia and GtkSnapshot

This commit is contained in:
Julian Winkler
2024-12-13 23:10:28 +01:00
parent 597c73f334
commit c8ed103516
6 changed files with 40 additions and 3 deletions

View File

@@ -154,3 +154,9 @@ JNIEXPORT void JNICALL Java_android_graphics_GskCanvas_native_1drawRoundRect(JNI
gtk_snapshot_append_border(snapshot, &round_rect, widths, gdk_color);
}
}
JNIEXPORT void JNICALL Java_android_graphics_GskCanvas_native_1scale(JNIEnv *env, jclass this_class, jlong snapshot_ptr, jfloat x, jfloat y)
{
GdkSnapshot *snapshot = GTK_SNAPSHOT(_PTR(snapshot_ptr));
gtk_snapshot_scale(snapshot, x, y);
}