GRect scroll_layer_get_new_content_rect (ScrollLayer* scroll_layer,GPoint offset) { GRect to={{0,0},scroll_layer_get_content_size(scroll_layer)}; to.size.h-=scroll_layer->layer.frame.size.h; offset.y*=-1; gpoint_move_into_rect(&offset,&to); offset.y*=-1; to.size.h+=scroll_layer->layer.frame.size.h; to.origin=offset; return to; }
GRect scroll_layer_get_new_content_rect (ScrollLayer* l,GPoint offset) { SCROLL_LAYER_GET; GRect to={{0,0},scroll_layer_get_content_size(l)}; to.size.h-=scroll_layer->frame.size.h; offset.y*=-1; gpoint_move_into_rect(&offset,&to); offset.y*=-1; to.size.h+=scroll_layer->frame.size.h; to.origin=offset; return to; }