Skip to content

Commit

Permalink
Add useful API
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Oct 28, 2024
1 parent 31e7d22 commit 7d700f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/c/sk_canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ SK_C_API void sk_nway_canvas_remove_all(sk_nway_canvas_t* t);
SK_C_API sk_overdraw_canvas_t* sk_overdraw_canvas_new(sk_canvas_t* canvas);
SK_C_API void sk_overdraw_canvas_destroy(sk_overdraw_canvas_t* canvas);
SK_C_API gr_recording_context_t* sk_get_recording_context(sk_canvas_t* canvas);
SK_C_API sk_surface_t* sk_get_surface(sk_canvas_t* canvas);

SK_C_PLUS_PLUS_END_GUARD

Expand Down
4 changes: 4 additions & 0 deletions src/c/sk_canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,7 @@ void sk_overdraw_canvas_destroy(sk_overdraw_canvas_t* canvas) {
gr_recording_context_t* sk_get_recording_context(sk_canvas_t* canvas) {
return ToGrRecordingContext(AsCanvas(canvas)->recordingContext());
}

sk_surface_t* sk_get_surface(sk_canvas_t* canvas) {
return ToSurface(AsCanvas(canvas)->getSurface());
}

0 comments on commit 7d700f4

Please sign in to comment.