Skip to content

Commit 6c9df8c

Browse files
gsk: Adapt to PathPoint.get_curvature api changes
1 parent fbe0b6f commit 6c9df8c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

gsk4/src/path_point.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

3-
use crate::{Path, PathPoint};
3+
use crate::{Path, PathDirection, PathPoint};
44
use glib::translate::*;
55

66
impl PathPoint {
77
#[doc(alias = "gsk_path_point_get_curvature")]
88
#[doc(alias = "get_curvature")]
9-
pub fn curvature(&self, path: &Path) -> (f32, Option<graphene::Point>) {
9+
pub fn curvature(
10+
&self,
11+
path: &Path,
12+
direction: PathDirection,
13+
) -> (f32, Option<graphene::Point>) {
1014
unsafe {
1115
let mut center = graphene::Point::uninitialized();
1216
let ret = ffi::gsk_path_point_get_curvature(
1317
self.to_glib_none().0,
1418
path.to_glib_none().0,
19+
direction.into_glib(),
1520
center.to_glib_none_mut().0,
1621
);
1722

0 commit comments

Comments
 (0)