mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
measure: Cosmetics
This commit is contained in:
parent
05547d98d6
commit
f3312f677b
@ -309,18 +309,15 @@ float
|
|||||||
gsk_path_point_get_distance (const GskPathPoint *point,
|
gsk_path_point_get_distance (const GskPathPoint *point,
|
||||||
GskPathMeasure *measure)
|
GskPathMeasure *measure)
|
||||||
{
|
{
|
||||||
const GskContour *contour;
|
|
||||||
float contour_offset = 0;
|
float contour_offset = 0;
|
||||||
|
|
||||||
g_return_val_if_fail (measure != NULL, 0);
|
g_return_val_if_fail (measure != NULL, 0);
|
||||||
g_return_val_if_fail (gsk_path_point_valid (point, measure->path), 0);
|
g_return_val_if_fail (gsk_path_point_valid (point, measure->path), 0);
|
||||||
|
|
||||||
contour = gsk_path_get_contour (measure->path, point->contour);
|
|
||||||
|
|
||||||
for (gsize i = 0; i < measure->n_contours; i++)
|
for (gsize i = 0; i < measure->n_contours; i++)
|
||||||
{
|
{
|
||||||
if (contour == gsk_path_get_contour (measure->path, i))
|
if (i == point->contour)
|
||||||
return contour_offset + gsk_contour_get_distance (contour,
|
return contour_offset + gsk_contour_get_distance (gsk_path_get_contour (measure->path, i),
|
||||||
point,
|
point,
|
||||||
measure->measures[i].contour_data);
|
measure->measures[i].contour_data);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user