Skip to documentation
SLOP

tiny.windowing.PresentRegion

Reference tiny.windowing PresentRegion

Defined in tiny.windowing.

API (7)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callstiny.windowingPresentRegion
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/windowing/src/window.zig:34

zig
pub const PresentRegion = struct {    x: u32 = 0,    y: u32 = 0,    width: u32 = 0,    height: u32 = 0,    pub fn full(width: u32, height: u32) PresentRegion {        return .{ .width = width, .height = height };    }    pub fn pixelCount(self: PresentRegion) usize {        return @as(usize, self.width) * @as(usize, self.height);    }    pub fn clamped(self: PresentRegion, width: u32, height: u32) PresentRegion {        if (self.x >= width or self.y >= height) return .{ .x = self.x, .y = self.y };        return .{            .x = self.x,            .y = self.y,            .width = @min(self.width, width - self.x),            .height = @min(self.height, height - self.y),        };    }};

Source: lib/windowing/src/root.zig:73

zig
pub const PresentRegion = window.PresentRegion;
Called byCallsNo direct callsprivate sourcelib.windowing.src.x11.X11BackendpresentRgba8PresentRegionfull
Static calls · unresolved targets: 0 · external targets: 0.

Audit

Definitions4
Public names4
Members4
Version26.7.0
Revisiondaab053ee433