1
0
zrcadlo https://github.com/minetest/irrlicht.git synchronizováno 2025-09-18 22:30:51 +02:00

Fix bug in rect::clipAgainst that had caused rects completely outside the rect to be clipped against ending up with one corner outside.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6188 dfc29bdd-3216-0410-991c-e03cc46cb475
Tento commit je obsažen v:
cutealien
2021-02-11 13:57:53 +00:00
rodič 97ad8388b2
revize 83d011019f
2 změnil soubory, kde provedl 11 přidání a 6 odebrání

Zobrazit soubor

@@ -1,5 +1,6 @@
--------------------------
Changes in 1.9 (not yet released)
- Fix bug in rect::clipAgainst that had caused rects completely outside the rect to be clipped against ending up with one corner outside.
- Add getAlign functions to IGUIElement
- Add optional multitouch support to X11 (but disabled in IrrCompileConfig by default). Thanks @TheBrokenRail for a patch proposal based on example code from esjeon (patch #322).
- Slightly changed close window handling on X11 (optimized and avoids problems on some shells). Thanks @TheBrokenRail for a patch (was part of patch #322).

Zobrazit soubor

@@ -135,16 +135,20 @@ namespace core
if (other.LowerRightCorner.Y < LowerRightCorner.Y)
LowerRightCorner.Y = other.LowerRightCorner.Y;
if (other.UpperLeftCorner.X > LowerRightCorner.X)
LowerRightCorner.X = other.UpperLeftCorner.X;
if (other.UpperLeftCorner.Y > LowerRightCorner.Y)
LowerRightCorner.Y = other.UpperLeftCorner.Y;
if (other.LowerRightCorner.X < UpperLeftCorner.X)
UpperLeftCorner.X = other.LowerRightCorner.X;
if (other.LowerRightCorner.Y < UpperLeftCorner.Y)
UpperLeftCorner.Y = other.LowerRightCorner.Y;
if (other.UpperLeftCorner.X > UpperLeftCorner.X)
UpperLeftCorner.X = other.UpperLeftCorner.X;
if (other.UpperLeftCorner.Y > UpperLeftCorner.Y)
UpperLeftCorner.Y = other.UpperLeftCorner.Y;
// correct possible invalid rect resulting from clipping
if (UpperLeftCorner.Y > LowerRightCorner.Y)
UpperLeftCorner.Y = LowerRightCorner.Y;
if (UpperLeftCorner.X > LowerRightCorner.X)
UpperLeftCorner.X = LowerRightCorner.X;
}
//! Moves this rectangle to fit inside another one.