1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-04 00:40:24 +02:00

Formspec: draw order and clipping for all elements (#8740)

This commit is contained in:
DS
2019-11-07 20:11:01 +01:00
committed by SmallJoker
parent 15a030ec9f
commit 5506e97ed8
14 changed files with 825 additions and 455 deletions

View File

@ -171,7 +171,8 @@ void draw2DImageFilterScaled(video::IVideoDriver *driver, video::ITexture *txr,
}
void draw2DImage9Slice(video::IVideoDriver *driver, video::ITexture *texture,
const core::rect<s32> &rect, const core::rect<s32> &middle)
const core::rect<s32> &rect, const core::rect<s32> &middle,
const core::rect<s32> *cliprect)
{
const video::SColor color(255,255,255,255);
const video::SColor colors[] = {color,color,color,color};
@ -222,9 +223,7 @@ void draw2DImage9Slice(video::IVideoDriver *driver, video::ITexture *texture,
break;
}
draw2DImageFilterScaled(driver, texture, dest,
src,
NULL/*&AbsoluteClippingRect*/, colors, true);
draw2DImageFilterScaled(driver, texture, dest, src, cliprect, colors, true);
}
}
}

View File

@ -53,4 +53,5 @@ void draw2DImageFilterScaled(video::IVideoDriver *driver, video::ITexture *txr,
* 9-slice / segment drawing
*/
void draw2DImage9Slice(video::IVideoDriver *driver, video::ITexture *texture,
const core::rect<s32> &rect, const core::rect<s32> &middle);
const core::rect<s32> &rect, const core::rect<s32> &middle,
const core::rect<s32> *cliprect = nullptr);