mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #3198
3198: DrawRoundRectEx easier for understanding, out of bounds safer r=heinrich5991 a=Banana090 I don't know if it's ok to make 2 line changes PRs, but this one would make new method's values (added some days ago with Chat Visuals update) `CRenderTools::DrawRoundRectExt` easier to understand and safer for out of bounds exception. Co-authored-by: Дядя Женя <spy090@yandex.ru>
This commit is contained in:
commit
bf53cd835b
|
@ -174,9 +174,11 @@ void CRenderTools::QuadContainerAddSprite(int QuadContainerIndex, float X, float
|
|||
|
||||
void CRenderTools::DrawRoundRectExt(float x, float y, float w, float h, float r, int Corners)
|
||||
{
|
||||
IGraphics::CFreeformItem ArrayF[32];
|
||||
int NumItems = 0;
|
||||
int Num = 8;
|
||||
const int Num = 8;
|
||||
|
||||
IGraphics::CFreeformItem ArrayF[Num * 4];
|
||||
|
||||
for(int i = 0; i < Num; i += 2)
|
||||
{
|
||||
float a1 = i / (float)Num * pi / 2;
|
||||
|
|
Loading…
Reference in a new issue