summaryrefslogtreecommitdiff
path: root/src/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/display.c')
-rw-r--r--src/display.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/display.c b/src/display.c
index becea58..122d455 100644
--- a/src/display.c
+++ b/src/display.c
@@ -77,8 +77,8 @@ static void draw_fixture(cairo_t *cr, PangoContext *pc, PangoFontDescription *fo
/* Pan/tilt (underneath rectangle) */
if ( fix->cls->attributes & PANTILT ) {
- double x = w*(1.0 + fix->pan)/2.0;
- double y = h*(1.0 - fix->tilt)/2.0;
+ double x = w*(1.0 + fix->v.pan)/2.0;
+ double y = h*(1.0 - fix->v.tilt)/2.0;
cairo_move_to(cr, x, -1.0);
cairo_line_to(cr, x, h+1.0);
@@ -117,7 +117,7 @@ static void draw_fixture(cairo_t *cr, PangoContext *pc, PangoFontDescription *fo
g_object_unref(layout);
/* Intensity */
- snprintf(tmp, 32, "%.0f %%", fix->intensity*100.0);
+ snprintf(tmp, 32, "%.0f %%", fix->v.intensity*100.0);
layout = pango_layout_new(pc);
pango_layout_set_text(layout, tmp, -1);
pango_layout_set_width(layout, (w*PANGO_SCALE)-4.0);
@@ -292,8 +292,8 @@ static void set_start_pantilt(struct lightctx *nl)
int i;
for ( i=0; i<nl->n_sel; i++ ) {
struct fixture *fix = &nl->fixtures[nl->selection[i]];
- fix->pan_start = fix->pan;
- fix->tilt_start = fix->tilt;
+ fix->pan_start = fix->v.pan;
+ fix->tilt_start = fix->v.tilt;
}
}
@@ -353,12 +353,12 @@ static gboolean motion_sig(GtkWidget *da, GdkEventMotion *event, struct lightctx
struct fixture *fix = &nl->fixtures[nl->selection[i]];
if ( !(fix->cls->attributes & PANTILT) ) continue;
- fix->pan = fix->pan_start + x_inc*speed;
- fix->tilt = fix->tilt_start + y_inc*speed;
- if ( fix->pan > 1.0 ) fix->pan = 1.0;
- if ( fix->pan < -1.0 ) fix->pan = -1.0;
- if ( fix->tilt > 1.0 ) fix->tilt = 1.0;
- if ( fix->tilt < -1.0 ) fix->tilt = -1.0;
+ fix->v.pan = fix->pan_start + x_inc*speed;
+ fix->v.tilt = fix->tilt_start + y_inc*speed;
+ if ( fix->v.pan > 1.0 ) fix->v.pan = 1.0;
+ if ( fix->v.pan < -1.0 ) fix->v.pan = -1.0;
+ if ( fix->v.tilt > 1.0 ) fix->v.tilt = 1.0;
+ if ( fix->v.tilt < -1.0 ) fix->v.tilt = -1.0;
}