Files
palladium/source/ultra/elems/element.cpp
T

26 lines
658 B
C++
Raw Normal View History

2026-03-28 13:52:36 +01:00
#include <pd/ultra/canvas.hpp>
#include <pd/ultra/elems/element.hpp>
namespace PD {
namespace Ultra {
PD_API bool ElementBase::RevisionUpdate(PD::u32 req) {
if (req != pCanvasRev) {
pCanvasRev = req;
return true;
} else {
return false;
}
}
PD_API void ElementBase::Update(Canvas& c) {
if (RevisionUpdate(c.GetRevision())) {
if (pParent) {
pRenderspace = c.VTranslateObject(
pParent->pRenderspace.TopLeft(),
pRenderspace.BotRight() - pRenderspace.TopLeft(), pAlignment, true);
} else {
pRenderspace = c.VTranslateObject(pPos, pSize, pAlignment);
}
}
}
} // namespace Ultra
} // namespace PD