void skin_region_translate( SkinRegion* r, int dx, int dy ) { Run* runs; if (region_isEmpty(r)) return; skin_rect_translate( &r->bounds, dx, dy ); if (region_isRect(r)) return; runs = region_edit(r); while (runs[0] != YSENTINEL) { int ytop = runs[0]; int ybot = runs[1]; RASSERT(ybot != YSENTINEL); runs[0] = (Run)(ytop + dy); runs[1] = (Run)(ybot + dy); runs += 2; while (runs[0] != XSENTINEL) { int xleft = runs[0]; int xright = runs[1]; RASSERT(xright != YSENTINEL); runs[0] = (Run)(xleft + dx); runs[1] = (Run)(xright + dx); runs += 2; } runs += 1; } }
static void region_edit_callback(GtkWidget *w, gpointer context) { if (current_region != -1) region_edit(current_region); }