void draw(const Rect& clip) override { int16_t mx = std::max<int16_t>(clip.x, 0); int16_t my = std::max<int16_t>(clip.y, 0); this->drawable.draw( RDPMemBlt( 0, Rect(mx, my, clip.cx, clip.cy), 0xCC, mx - this->dx(), my - this->dy(), 0 ), this->rect, this->bmp ); }
void ProtectedGraphics::draw_impl(const RDPBitmapData & bitmap_data, const Bitmap & bmp) { Rect rectBmp( bitmap_data.dest_left, bitmap_data.dest_top , bitmap_data.dest_right - bitmap_data.dest_left + 1 , bitmap_data.dest_bottom - bitmap_data.dest_top + 1); if (rectBmp.has_intersection(this->protected_rect)) { this->drawable.begin_update(); for (const Rect & subrect : subrect4(rectBmp, this->protected_rect)) { if (!subrect.isempty()) { this->drawable.draw( RDPMemBlt(0, subrect, 0xCC, subrect.x - rectBmp.x, subrect.y - rectBmp.y, 0), subrect, bmp ); } } this->drawable.end_update(); } else { this->drawable.draw(bitmap_data, bmp); } }
void draw_bitmap_rect(Rect const & rect, Rect const & rectBmp, Bitmap const & bmp) { if (!rect.isempty()) { this->mod.draw(RDPMemBlt(0, rect, 0xCC, rect.x - rectBmp.x, rect.y - rectBmp.y, 0), rect, bmp); } }
void operator()(mod_api & mod, const Rect & rect, const Rect & clip) const { mod.draw(RDPMemBlt(0, rect, 0xCC, this->bmp_srcx, this->bmp_srcy, 0), clip, this->bmp); }