static void act_addobj(void);
static void act_rmobj(void);
-static void fix_rect(rtk_rect *rect);
-static void draw_rband(void);
static void moveobj(struct object *obj, int px0, int py0, int px1, int py1);
static void inval_vport(void);
/* GUI */
rtk_draw_widget(toolbar);
-
- if(rband_valid) {
- draw_rband();
- }
}
static void draw_object(struct object *obj)
if(rband_valid) {
rband_valid = 0;
+ app_rband(0, 0, 0, 0);
if(cur_tool == TOOL_REND_AREA) {
if(prev_tool >= 0) {
}
rendering = 1;
rend_size(win_width, win_height);
- fix_rect(&rband);
+ rtk_fix_rect(&rband);
rendrect = rband;
rend_begin(rband.x, rband.y, rband.width, rband.height);
+ app_redisplay(rband.x, rband.y, rband.width, rband.height);
}
- app_redisplay(rband.x, rband.y, rband.width, rband.height);
} else if(bn == 0 && x == rband.x && y == rband.y) {
primray(&pickray, x, y);
rband.width = x - rband.x;
rband.height = y - rband.y;
rband_valid = 1;
+ app_rband(rband.x, rband.y, rband.width, rband.height);
}
break;
}
}
-static void fix_rect(rtk_rect *rect)
-{
- int x, y, w, h;
-
- x = rband.x;
- y = rband.y;
-
- if(rband.width < 0) {
- w = -rband.width;
- x += rband.width;
- } else {
- w = rband.width;
- }
- if(rband.height < 0) {
- h = -rband.height;
- y += rband.height;
- } else {
- h = rband.height;
- }
-
- rect->x = x;
- rect->y = y;
- rect->width = w;
- rect->height = h;
-}
-
void primray(cgm_ray *ray, int x, int y)
{