void XYView::set_damage_area(Canvas* c) { Extension e; c->restrict_damage(0.,0., c->width(), c->height()); c->damage_area(e); const float off = c->to_coord(1); c->transformer().inverse_transform(e.left()-off, e.bottom()-off, xd1_, yd1_); c->transformer().inverse_transform(e.right()+off, e.top()+off, xd2_, yd2_); }
void Scrollable::draw(Canvas* c, const Allocation& a) const { c->damage(0, 0, width_, height_); Extension e; e.set(c, a); c->push_clipping(); c->push_transform(); c->transformer(Transformer()); c->clip_rect(e.left(), e.bottom(), e.right(), e.top()); Patch::draw(c, a); c->pop_transform(); c->pop_clipping(); }
void DebugGlyph::draw(Canvas* c, const Allocation& a) const { if ((flags_ & trace_draw) != 0) { heading("draw "); print_allotment(a.allotment(Dimension_X)); printf(", "); print_allotment(a.allotment(Dimension_Y)); if (c != nil) { Extension e; c->damage_area(e); printf( " [%.2f,%.2f %.2f,%.2f]", e.left(), e.bottom(), e.right(), e.top() ); } printf("\n"); } MonoGlyph::draw(c, a); }