MCPcopy Create free account
hub / github.com/ZDoom/Raze / SetComponentGeometry

Method SetComponentGeometry

libraries/ZWidget/src/core/span_layout.cpp:838–856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836}
837
838void SpanLayout::SetComponentGeometry()
839{
840 double x = position.x;
841 double y = position.y;
842 for (size_t i = 0; i < lines.size(); i++)
843 {
844 for (size_t j = 0; j < lines[i].segments.size(); j++)
845 {
846 if (lines[i].segments[j].type == object_component)
847 {
848 Point pos(x + lines[i].segments[j].x_position, y + lines[i].ascender - lines[i].segments[j].ascender);
849 Size size = lines[i].segments[j].component->GetSize();
850 Rect rect(pos, size);
851 lines[i].segments[j].component->SetFrameGeometry(rect);
852 }
853 }
854 y += lines[i].height;
855 }
856}
857
858double SpanLayout::GetFirstBaselineOffset()
859{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
GetSizeMethod · 0.45
SetFrameGeometryMethod · 0.45

Tested by

no test coverage detected