mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 00:23:35 +00:00
Proper clipping in CommonLockedSurface::drawColoredRgbaSurface() impl
This commit is contained in:
parent
cbed44e627
commit
55cafac735
@ -59,7 +59,11 @@ gfx::Color blend(const gfx::Color back, gfx::Color front)
|
|||||||
class CommonLockedSurface : public LockedSurface {
|
class CommonLockedSurface : public LockedSurface {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void drawColoredRgbaSurface(const LockedSurface* src, gfx::Color fg, gfx::Color bg, const gfx::Clip& clip) override {
|
void drawColoredRgbaSurface(const LockedSurface* src, gfx::Color fg, gfx::Color bg, const gfx::Clip& clipbase) override {
|
||||||
|
gfx::Clip clip(clipbase);
|
||||||
|
if (!clip.clip(lockedWidth(), lockedHeight(), src->lockedWidth(), src->lockedHeight()))
|
||||||
|
return;
|
||||||
|
|
||||||
SurfaceFormatData format;
|
SurfaceFormatData format;
|
||||||
src->getFormat(&format);
|
src->getFormat(&format);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user