MCPcopy Index your code
hub / github.com/endbasic/endbasic / rect_origin_size

Function rect_origin_size

sdl/src/host.rs:128–135  ·  view source on GitHub ↗

Constructs an SDL `Rect` from a `PixelsXY` `origin` and a `PixelsSize` `size`.

(origin: PixelsXY, size: SizeInPixels)

Source from the content-addressed store, hash-verified

126
127/// Constructs an SDL `Rect` from a `PixelsXY` `origin` and a `PixelsSize` `size`.
128fn rect_origin_size(origin: PixelsXY, size: SizeInPixels) -> Rect {
129 Rect::new(
130 i32::from(origin.x),
131 i32::from(origin.y),
132 u32::from(size.width),
133 u32::from(size.height),
134 )
135}
136
137/// Returns the logical console size in pixels for explicit resolutions.
138fn requested_size_pixels(resolution: Resolution) -> Option<SizeInPixels> {

Callers 6

peek_pixelMethod · 0.85
read_pixelsMethod · 0.85
put_pixelsMethod · 0.85
move_pixelsMethod · 0.85
draw_rectMethod · 0.85
draw_rect_filledMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected