tiny.windowing.PresentRegion
Defined in tiny.windowing.
API (7)
Actions
Public operations.
Fields and members
Public fields and members.
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;Audit
| Definitions | 4 |
|---|---|
| Public names | 4 |
| Members | 4 |
| Version | 26.7.0 |
| Revision | daab053ee433 |