Struct SoftwareRenderer::PhysicalRegion

Nested Relationships

This struct is a nested type of Class SoftwareRenderer.

Nested Types

Struct Documentation

struct PhysicalRegion

Represents a region on the screen, used for partial rendering.

The region may be composed of multiple sub-regions.

Public Functions

inline PhysicalSize bounding_box_size() const

Returns the size of the bounding box of this region.

inline PhysicalPosition bounding_box_origin() const

Returns the origin of the bounding box of this region.

inline auto rectangles() const

Returns a view on all the rectangles in this region. The returned type is a C++ view over PhysicalRegion::Rect structs.

It can be used like so:

for (auto [origin, size] : region.rectangles()) {
    // Do something with the rect
}

struct Rect

A Rectangle defined with an origin and a size. The PhysicalRegion::rectangles() function returns a view over them

Public Members

PhysicalPosition origin

The origin of the rectangle.

PhysicalSize size

The size of the rectangle.