Merge pull request #6940 from Robyt3/Graphics-Rect-Remove-Inverted-Corners

Remove inverted round rectangle corner drawing
This commit is contained in:
heinrich5991 2023-07-28 10:24:43 +00:00 committed by GitHub
commit 564a5958e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 54 deletions

View file

@ -1377,50 +1377,6 @@ void CGraphics_Threaded::DrawRectExt4(float x, float y, float w, float h, ColorR
x + w - r + Ca2 * r, y + h - r + Sa2 * r);
QuadsDrawFreeform(&ItemF, 1);
}
if(Corners & CORNER_ITL)
{
SetColor(ColorTopLeft);
IGraphics::CFreeformItem ItemF = IGraphics::CFreeformItem(
x, y,
x + (1 - Ca1) * r, y - r + Sa1 * r,
x + (1 - Ca3) * r, y - r + Sa3 * r,
x + (1 - Ca2) * r, y - r + Sa2 * r);
QuadsDrawFreeform(&ItemF, 1);
}
if(Corners & CORNER_ITR)
{
SetColor(ColorTopRight);
IGraphics::CFreeformItem ItemF = IGraphics::CFreeformItem(
x + w, y,
x + w - r + Ca1 * r, y - r + Sa1 * r,
x + w - r + Ca3 * r, y - r + Sa3 * r,
x + w - r + Ca2 * r, y - r + Sa2 * r);
QuadsDrawFreeform(&ItemF, 1);
}
if(Corners & CORNER_IBL)
{
SetColor(ColorBottomLeft);
IGraphics::CFreeformItem ItemF = IGraphics::CFreeformItem(
x, y + h,
x + (1 - Ca1) * r, y + h + (1 - Sa1) * r,
x + (1 - Ca3) * r, y + h + (1 - Sa3) * r,
x + (1 - Ca2) * r, y + h + (1 - Sa2) * r);
QuadsDrawFreeform(&ItemF, 1);
}
if(Corners & CORNER_IBR)
{
SetColor(ColorBottomRight);
IGraphics::CFreeformItem ItemF = IGraphics::CFreeformItem(
x + w, y + h,
x + w - r + Ca1 * r, y + h + (1 - Sa1) * r,
x + w - r + Ca3 * r, y + h + (1 - Sa3) * r,
x + w - r + Ca2 * r, y + h + (1 - Sa2) * r);
QuadsDrawFreeform(&ItemF, 1);
}
}
SetColor4(ColorTopLeft, ColorTopRight, ColorBottomLeft, ColorBottomRight);

View file

@ -461,23 +461,13 @@ public:
CORNER_TR = 2,
CORNER_BL = 4,
CORNER_BR = 8,
CORNER_ITL = 16,
CORNER_ITR = 32,
CORNER_IBL = 64,
CORNER_IBR = 128,
CORNER_T = CORNER_TL | CORNER_TR,
CORNER_B = CORNER_BL | CORNER_BR,
CORNER_R = CORNER_TR | CORNER_BR,
CORNER_L = CORNER_TL | CORNER_BL,
CORNER_IT = CORNER_ITL | CORNER_ITR,
CORNER_IB = CORNER_IBL | CORNER_IBR,
CORNER_IR = CORNER_ITR | CORNER_IBR,
CORNER_IL = CORNER_ITL | CORNER_IBL,
CORNER_ALL = CORNER_T | CORNER_B,
CORNER_INV_ALL = CORNER_IT | CORNER_IB
};
virtual void DrawRectExt(float x, float y, float w, float h, float r, int Corners) = 0;
virtual void DrawRectExt4(float x, float y, float w, float h, ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, float r, int Corners) = 0;