show object marker only when found

test16bit
Steffen Pohle 4 years ago
parent f1e1bd83f7
commit ddc814df7d

@ -141,6 +141,13 @@ void cb_videoda_draw(GtkWidget *area, cairo_t *cr, int w, int h, gpointer data)
cairo_stroke(cr); cairo_stroke(cr);
} }
else { else {
x = atoi (gtk_entry_get_text(GTK_ENTRY(e_x)));
y = atoi (gtk_entry_get_text(GTK_ENTRY(e_y)));
w1 = atoi (gtk_entry_get_text(GTK_ENTRY(e_w)));
h1 = atoi (gtk_entry_get_text(GTK_ENTRY(e_h)));
if (x >= (w1/2) && x < (pixbufw-w1/2)
&& y >= (h1/2) && y < (pixbufh-h1/2)) {
// //
// draw red cross // draw red cross
cairo_set_line_width(cr, 1.0); cairo_set_line_width(cr, 1.0);
@ -150,11 +157,6 @@ void cb_videoda_draw(GtkWidget *area, cairo_t *cr, int w, int h, gpointer data)
color.alpha = 1.0; color.alpha = 1.0;
gdk_cairo_set_source_rgba(cr, &color); gdk_cairo_set_source_rgba(cr, &color);
x = atoi (gtk_entry_get_text(GTK_ENTRY(e_x)));
y = atoi (gtk_entry_get_text(GTK_ENTRY(e_y)));
w1 = atoi (gtk_entry_get_text(GTK_ENTRY(e_w)));
h1 = atoi (gtk_entry_get_text(GTK_ENTRY(e_h)));
cairo_move_to(cr, S_X(x), S_Y(y)-10); cairo_move_to(cr, S_X(x), S_Y(y)-10);
cairo_line_to(cr, S_X(x), S_Y(y)+10); cairo_line_to(cr, S_X(x), S_Y(y)+10);
cairo_move_to(cr, S_X(x)-10, S_Y(y)); cairo_move_to(cr, S_X(x)-10, S_Y(y));
@ -181,6 +183,7 @@ void cb_videoda_draw(GtkWidget *area, cairo_t *cr, int w, int h, gpointer data)
cairo_stroke(cr); cairo_stroke(cr);
} }
}
}; };

Loading…
Cancel
Save