mirror of https://github.com/aseprite/aseprite.git
Allow corner radiuses of length 1
This commit is contained in:
parent
e082cbb549
commit
abf43645da
|
@ -322,7 +322,7 @@ private:
|
|||
|
||||
bool hasAngle() const { return (ABS(m_angle) > 0.001); }
|
||||
|
||||
bool hasCornerRadius() const { return (ABS(m_cornerRadius) > 1); }
|
||||
bool hasCornerRadius() const { return (ABS(m_cornerRadius) > 0); }
|
||||
|
||||
void onMoveOrigin(const Point& delta) override
|
||||
{
|
||||
|
|
|
@ -196,7 +196,7 @@ public:
|
|||
const int cornerRadius = loop->getController()->getCornerRadius();
|
||||
if (ABS(angle) < 0.001) {
|
||||
int r = 0;
|
||||
if (cornerRadius > 1) {
|
||||
if (cornerRadius > 0) {
|
||||
int w = x2 - x1;
|
||||
int h = y2 - y1;
|
||||
int xm = x1 + w / 2;
|
||||
|
@ -214,7 +214,7 @@ public:
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (cornerRadius <= 1) {
|
||||
if (cornerRadius <= 0) {
|
||||
Stroke p = rotateRectangle(x1, y1, x2, y2, angle);
|
||||
int n = p.size();
|
||||
for (int i = 0; i + 1 < n; ++i) {
|
||||
|
@ -267,7 +267,7 @@ public:
|
|||
const int cornerRadius = loop->getController()->getCornerRadius();
|
||||
if (ABS(angle) < 0.001) {
|
||||
int r = 0;
|
||||
if (cornerRadius > 1) {
|
||||
if (cornerRadius > 0) {
|
||||
int w = x2 - x1;
|
||||
int h = y2 - y1;
|
||||
int xm = x1 + w / 2;
|
||||
|
@ -285,7 +285,7 @@ public:
|
|||
doPointshapeLineWithoutDynamics(x1, y, x2, y, loop);
|
||||
}
|
||||
else {
|
||||
if (cornerRadius <= 1) {
|
||||
if (cornerRadius <= 0) {
|
||||
Stroke p = rotateRectangle(x1, y1, x2, y2, angle);
|
||||
auto v = p.toXYInts();
|
||||
doc::algorithm::polygon(v.size() / 2, &v[0], loop, (AlgoHLine)doPointshapeHline);
|
||||
|
|
Loading…
Reference in New Issue