mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-18 16:21:07 +00:00
Implement SkiaSurface::blitTo
This commit is contained in:
parent
e3565946b4
commit
e0c78e0f94
@ -172,6 +172,10 @@ public:
|
||||
}
|
||||
|
||||
void blitTo(LockedSurface* dest, int srcx, int srcy, int dstx, int dsty, int width, int height) const override {
|
||||
SkCanvas canvas(((SkiaSurface*)dest)->m_bitmap);
|
||||
SkRect srcRect = SkRect::Make(SkIRect::MakeXYWH(srcx, srcy, width, height));
|
||||
SkRect dstRect = SkRect::Make(SkIRect::MakeXYWH(dstx, dsty, width, height));
|
||||
canvas.drawBitmapRectToRect(m_bitmap, &srcRect, dstRect);
|
||||
}
|
||||
|
||||
void drawSurface(const LockedSurface* src, int dstx, int dsty) override {
|
||||
|
Loading…
x
Reference in New Issue
Block a user