LayoutBox.cpp 530 B

12345678910111213141516171819202122232425262728293031
  1. #include "LayoutBox.h"
  2. #include "LayoutPools.h"
  3. namespace Rml {
  4. const Box* LayoutBox::GetIfBox() const
  5. {
  6. return nullptr;
  7. }
  8. bool LayoutBox::GetBaselineOfLastLine(float& /*out_baseline*/) const
  9. {
  10. return false;
  11. }
  12. float LayoutBox::GetShrinkToFitWidth() const
  13. {
  14. return 0.f;
  15. }
  16. void* LayoutBox::operator new(size_t size)
  17. {
  18. void* memory = LayoutPools::AllocateLayoutChunk(size);
  19. return memory;
  20. }
  21. void LayoutBox::operator delete(void* chunk, size_t size)
  22. {
  23. LayoutPools::DeallocateLayoutChunk(chunk, size);
  24. }
  25. } // namespace Rml