mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 13:21:34 +00:00
Fix eyedropper when picking colors from the top or left edge of a tile (in composition mode)
This commit is contained in:
parent
1e5c096236
commit
472861ddd9
@ -24,7 +24,7 @@
|
||||
#include "gfx/point.h"
|
||||
#include "render/get_sprite_pixel.h"
|
||||
|
||||
#define PICKER_TRACE(...)
|
||||
#define PICKER_TRACE(...) // TRACE
|
||||
|
||||
namespace app {
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#define TRACE_RENDER_CEL(...)
|
||||
#define TRACE_RENDER_CEL(...) // TRACE
|
||||
|
||||
namespace render {
|
||||
|
||||
@ -1242,9 +1242,21 @@ void Render::renderCel(
|
||||
if (!tileset)
|
||||
return;
|
||||
|
||||
if (area.size.w < 1 ||
|
||||
area.size.h < 1)
|
||||
return;
|
||||
|
||||
gfx::Rect tilesToDraw = grid.canvasToTile(
|
||||
m_proj.remove(gfx::Rect(area.src, area.size)));
|
||||
|
||||
// As area.size is not empty at this point, we have to draw at
|
||||
// least one tile (and the clipping will be performed for the
|
||||
// tile pixels later).
|
||||
if (tilesToDraw.w < 1) tilesToDraw.w = 1;
|
||||
if (tilesToDraw.h < 1) tilesToDraw.h = 1;
|
||||
|
||||
tilesToDraw &= cel_image->bounds();
|
||||
|
||||
TRACE_RENDER_CEL("Drawing tilemap (%d %d %d %d)\n",
|
||||
tilesToDraw.x, tilesToDraw.y, tilesToDraw.w, tilesToDraw.h);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user