mirror of https://github.com/aseprite/aseprite.git
Fix when Slices are set to a semi-transparent color they become opaque as we draw.
This commit is contained in:
parent
ed56011a0f
commit
e4b3981ca6
|
@ -1,5 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2018-2024 Igara Studio S.A.
|
// Copyright (C) 2018-2025 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2018 David Capello
|
// Copyright (C) 2001-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// 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,
|
gfx::Rect enclosingRect(m_padding.x + dx,
|
||||||
m_padding.y + dy,
|
m_padding.y + dy,
|
||||||
|
@ -783,6 +783,11 @@ void Editor::drawOneSpriteUnclippedRect(ui::Graphics* g,
|
||||||
|
|
||||||
IntersectClip clip(g, dest);
|
IntersectClip clip(g, dest);
|
||||||
if (clip) {
|
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
|
// Draw the pixel grid
|
||||||
if ((m_proj.zoom().scale() > 2.0) && m_docPref.show.pixelGrid()) {
|
if ((m_proj.zoom().scale() > 2.0) && m_docPref.show.pixelGrid()) {
|
||||||
int alpha = m_docPref.pixelGrid.opacity();
|
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);
|
enclosingRect = gfx::Rect(spriteRect.x, spriteRect.y, spriteRect.w * 3, spriteRect.h * 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw slices
|
|
||||||
if (m_docPref.show.slices())
|
|
||||||
drawSlices(g);
|
|
||||||
|
|
||||||
// Symmetry mode
|
// Symmetry mode
|
||||||
if (isActive() && (m_flags & Editor::kShowSymmetryLine) &&
|
if (isActive() && (m_flags & Editor::kShowSymmetryLine) &&
|
||||||
Preferences::instance().symmetryMode.enabled()) {
|
Preferences::instance().symmetryMode.enabled()) {
|
||||||
|
|
Loading…
Reference in New Issue