summaryrefslogtreecommitdiffstats
path: root/src/circle.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-03 00:31:10 +0000
committerDavid Robillard <d@drobilla.net>2014-01-03 00:31:10 +0000
commita6aba9a3e541b8f193e93c653bac7bbae111de17 (patch)
treed8f243e3432556706878441f563f8872088085ec /src/circle.c
parent023925ef7ecf8314e51f2bb14717f88b92240438 (diff)
downloadganv-a6aba9a3e541b8f193e93c653bac7bbae111de17.tar.gz
ganv-a6aba9a3e541b8f193e93c653bac7bbae111de17.tar.bz2
ganv-a6aba9a3e541b8f193e93c653bac7bbae111de17.zip
Don't abuse show_label property for vertical/horizontal mode.
Don't use g_object_get to get x and y coordinates of items. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5246 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/circle.c')
-rw-r--r--src/circle.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/circle.c b/src/circle.c
index 54f28cb..077ecc9 100644
--- a/src/circle.c
+++ b/src/circle.c
@@ -175,8 +175,8 @@ ganv_circle_is_within(const GanvNode* self,
double x2,
double y2)
{
- double x, y;
- g_object_get(G_OBJECT(self), "x", &x, "y", &y, NULL);
+ const double x = GANV_ITEM(self)->x;
+ const double y = GANV_ITEM(self)->y;
return x >= x1
&& x <= x2
@@ -194,11 +194,10 @@ ganv_circle_vector(const GanvNode* self,
{
GanvCircle* circle = GANV_CIRCLE(self);
- double cx, cy;
- g_object_get(G_OBJECT(circle), "x", &cx, "y", &cy, NULL);
-
- double other_x, other_y;
- g_object_get(G_OBJECT(other), "x", &other_x, "y", &other_y, NULL);
+ const double cx = GANV_ITEM(self)->x;
+ const double cy = GANV_ITEM(self)->y;
+ const double other_x = GANV_ITEM(other)->x;
+ const double other_y = GANV_ITEM(other)->y;
const double xdist = other_x - cx;
const double ydist = other_y - cy;