summaryrefslogtreecommitdiff
path: root/gui/glabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'gui/glabel.c')
-rw-r--r--gui/glabel.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gui/glabel.c b/gui/glabel.c
index d99137b..4dc37d2 100644
--- a/gui/glabel.c
+++ b/gui/glabel.c
@@ -36,6 +36,23 @@ struct glabel_aoi_ctx {
};
+/* ----- Tools ------------------------------------------------------------- */
+
+
+static void eeschema_coord(const struct gui_ctx *ctx,
+ int x, int y, int *rx, int *ry)
+{
+ GtkAllocation alloc;
+
+ gtk_widget_get_allocation(ctx->da, &alloc);
+ *rx = ((x - ctx->x) >> ctx->zoom) + alloc.width / 2;
+ *ry = ((y - ctx->y) >> ctx->zoom) + alloc.height / 2;
+}
+
+
+/* ----- AoIs -------------------------------------------------------------- */
+
+
static void glabel_dest_click(void *user)
{
struct gui_sheet *sheet = user;