brain/viz.cc
/* Draw a rectangle on the surface at the given position */
Draw a rectangle on the surface at the given position
Draw a rectangle on the surface at the given position
static void
draw_brush(GtkWidget *widget,
           gdouble    x,
           gdouble    y)
{
    cairo_t *cr;
    cr = cairo_create(surface);
    cairo_rectangle(cr, x - 3, y - 3, 6, 6);
    cairo_fill(cr);
    cairo_destroy(cr);
    gtk_widget_queue_draw_area(widget, x - 3, y - 3, 6, 6);
}
static void draw_brush ( GtkWidget * widget , gdouble x , gdouble y ) { cairo_t * cr ; cr = cairo_create ( surface ) ; cairo_rectangle ( cr , x - 3 , y - 3 , 6 , 6 ) ; cairo_fill ( cr ) ; cairo_destroy ( cr ) ; gtk_widget_queue_draw_area ( widget , x - 3 , y - 3 , 6 , 6 ) ; }
Draw a rectangle on the surface at the given position
Draw a rectangle on the surface at the given position
//GdkRectangle rect; //gtk_widget_get_allocation(widget, &rect); //cout << "rect: " << rect.x << "," << rect.y << endl; /* Paint to the surface, where we store our state */ /* Now invalidate the affected region of the drawing area. */