static void * workspaceview_child_size_sub( Columnview *cview, Rect *area ) { int x, y, w, h; Rect col; columnview_get_position( cview, &x, &y, &w, &h ); col.left = x; col.top = y; col.width = w; col.height = h; im_rect_unionrect( area, &col, area ); return( NULL ); }
/* Do geometry calculations on a node, assuming geo is up to date for any * children. */ static void calc_geometry( JoinNode *node ) { Rect um; switch( node->type ) { case JOIN_LR: case JOIN_TB: case JOIN_LRROTSCALE: case JOIN_TBROTSCALE: /* Join two areas. */ im_rect_unionrect( &node->arg1->cumtrn.oarea, &node->arg2->cumtrn.oarea, &um ); node->cumtrn.iarea.left = 0; node->cumtrn.iarea.top = 0; node->cumtrn.iarea.width = um.width; node->cumtrn.iarea.height = um.height; im__transform_set_area( &node->cumtrn ); break; case JOIN_CP: /* Copy from child. */ node->cumtrn = node->arg1->cumtrn; break; case JOIN_LEAF: /* Just use leaf dimensions, if there are any. */ if( node->im ) { node->cumtrn.iarea.left = 0; node->cumtrn.iarea.top = 0; node->cumtrn.iarea.width = node->im->Xsize; node->cumtrn.iarea.height = node->im->Ysize; im__transform_set_area( &node->cumtrn ); } break; default: error_exit( "internal error #98356" ); /*NOTREACHED*/ } }