[gtk/path-stroke: 16/18] Add gsk_path_measure_get_{path,tolerance}
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/path-stroke: 16/18] Add gsk_path_measure_get_{path,tolerance}
- Date: Sun, 13 Dec 2020 16:13:13 +0000 (UTC)
commit eb7e24cb352919e43b2b188c9d1ec6e588fdb433
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 6 13:31:28 2020 -0500
Add gsk_path_measure_get_{path,tolerance}
These are just nice apis to have and avoid having to carry
these around as extra arguments in many places.
This was showing up as inconvenience in writing tests
for the measure apis.
gsk/gskpathmeasure.c | 12 ++++++++++++
gsk/gskpathmeasure.h | 5 +++++
2 files changed, 17 insertions(+)
---
diff --git a/gsk/gskpathmeasure.c b/gsk/gskpathmeasure.c
index 50768e702a..266559ad86 100644
--- a/gsk/gskpathmeasure.c
+++ b/gsk/gskpathmeasure.c
@@ -167,6 +167,18 @@ gsk_path_measure_unref (GskPathMeasure *self)
g_free (self);
}
+GskPath *
+gsk_path_measure_get_path (GskPathMeasure *self)
+{
+ return self->path;
+}
+
+float
+gsk_path_measure_get_tolerance (GskPathMeasure *self)
+{
+ return self->tolerance;
+}
+
/**
* gsk_path_measure_get_length:
* @self: a #GskPathMeasure
diff --git a/gsk/gskpathmeasure.h b/gsk/gskpathmeasure.h
index 5d93167be5..d2ca5799c2 100644
--- a/gsk/gskpathmeasure.h
+++ b/gsk/gskpathmeasure.h
@@ -44,6 +44,11 @@ GskPathMeasure * gsk_path_measure_ref (GskPathMeasure
GDK_AVAILABLE_IN_ALL
void gsk_path_measure_unref (GskPathMeasure *self);
+GDK_AVAILABLE_IN_ALL
+GskPath * gsk_path_measure_get_path (GskPathMeasure *self);
+GDK_AVAILABLE_IN_ALL
+float gsk_path_measure_get_tolerance (GskPathMeasure *self);
+
GDK_AVAILABLE_IN_ALL
float gsk_path_measure_get_length (GskPathMeasure *self);
GDK_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]