mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 13:21:34 +00:00
Fix when Slices are set to a semi-transparent color they become opaque as we draw.
This commit is contained in:
parent
f2b870a17f
commit
09cb51f828
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2024 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2025 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -774,7 +774,7 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g,
|
||||
}
|
||||
}
|
||||
|
||||
// Draw grids
|
||||
// Draw Slices and Grids
|
||||
{
|
||||
gfx::Rect enclosingRect(m_padding.x + dx,
|
||||
m_padding.y + dy,
|
||||
@ -783,6 +783,11 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g,
|
||||
|
||||
IntersectClip clip(g, dest);
|
||||
if (clip) {
|
||||
// Draw slices
|
||||
if (m_docPref.show.slices() && dx == m_proj.applyX(mainTilePosition().x) &&
|
||||
dy == m_proj.applyY(mainTilePosition().y))
|
||||
drawSlices(g);
|
||||
|
||||
// Draw the pixel grid
|
||||
if ((m_proj.zoom().scale() > 2.0) && m_docPref.show.pixelGrid()) {
|
||||
int alpha = m_docPref.pixelGrid.opacity();
|
||||
@ -895,10 +900,6 @@ void Editor::drawSpriteUnclippedRect(ui::Graphics* g, const gfx::Rect& _rc)
|
||||
enclosingRect = gfx::Rect(spriteRect.x, spriteRect.y, spriteRect.w * 3, spriteRect.h * 3);
|
||||
}
|
||||
|
||||
// Draw slices
|
||||
if (m_docPref.show.slices())
|
||||
drawSlices(g);
|
||||
|
||||
// Symmetry mode
|
||||
if (isActive() && (m_flags & Editor::kShowSymmetryLine) &&
|
||||
Preferences::instance().symmetryMode.enabled()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user