mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-26 03:35:23 +00:00
Fix bug using paint bucket with symmetry when brush size > 1px (fix #1251)
This commit is contained in:
parent
19545c12e3
commit
722b5163b9
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2015 David Capello
|
// Copyright (C) 2015-2016 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
// the End-User License Agreement for Aseprite.
|
// the End-User License Agreement for Aseprite.
|
||||||
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "app/tools/symmetries.h"
|
#include "app/tools/symmetries.h"
|
||||||
|
|
||||||
|
#include "app/tools/point_shape.h"
|
||||||
#include "app/tools/stroke.h"
|
#include "app/tools/stroke.h"
|
||||||
#include "app/tools/tool_loop.h"
|
#include "app/tools/tool_loop.h"
|
||||||
#include "doc/brush.h"
|
#include "doc/brush.h"
|
||||||
@ -20,7 +21,11 @@ namespace tools {
|
|||||||
void HorizontalSymmetry::generateStrokes(const Stroke& mainStroke, Strokes& strokes,
|
void HorizontalSymmetry::generateStrokes(const Stroke& mainStroke, Strokes& strokes,
|
||||||
ToolLoop* loop)
|
ToolLoop* loop)
|
||||||
{
|
{
|
||||||
int adjust = (loop->getBrush()->bounds().w % 2);
|
int adjust;
|
||||||
|
if (loop->getPointShape()->isFloodFill())
|
||||||
|
adjust = 1;
|
||||||
|
else
|
||||||
|
adjust = (loop->getBrush()->bounds().w % 2);
|
||||||
|
|
||||||
strokes.push_back(mainStroke);
|
strokes.push_back(mainStroke);
|
||||||
|
|
||||||
@ -33,7 +38,11 @@ void HorizontalSymmetry::generateStrokes(const Stroke& mainStroke, Strokes& stro
|
|||||||
void VerticalSymmetry::generateStrokes(const Stroke& mainStroke, Strokes& strokes,
|
void VerticalSymmetry::generateStrokes(const Stroke& mainStroke, Strokes& strokes,
|
||||||
ToolLoop* loop)
|
ToolLoop* loop)
|
||||||
{
|
{
|
||||||
int adjust = (loop->getBrush()->bounds().h % 2);
|
int adjust;
|
||||||
|
if (loop->getPointShape()->isFloodFill())
|
||||||
|
adjust = 1;
|
||||||
|
else
|
||||||
|
adjust = (loop->getBrush()->bounds().h % 2);
|
||||||
|
|
||||||
strokes.push_back(mainStroke);
|
strokes.push_back(mainStroke);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user