Skip to content

Commit

Permalink
gsk: Adapt to PathPoint.get_curvature api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Aug 25, 2023
1 parent 66306f2 commit 24407bb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gsk4/src/path_point.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use crate::{Path, PathPoint};
use crate::{Path, PathDirection, PathPoint};
use glib::translate::*;

impl PathPoint {
#[doc(alias = "gsk_path_point_get_curvature")]
#[doc(alias = "get_curvature")]
pub fn curvature(&self, path: &Path) -> (f32, Option<graphene::Point>) {
pub fn curvature(
&self,
path: &Path,
direction: PathDirection,
) -> (f32, Option<graphene::Point>) {
unsafe {
let mut center = graphene::Point::uninitialized();
let ret = ffi::gsk_path_point_get_curvature(
self.to_glib_none().0,
path.to_glib_none().0,
direction.into_glib(),
center.to_glib_none_mut().0,
);

Expand Down

0 comments on commit 24407bb

Please sign in to comment.