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

Function rgb_to_color

sdl/src/host.rs:148–150  ·  view source on GitHub ↗

Converts our own `RGB` type to an SDL `Color`.

(rgb: RGB)

Source from the content-addressed store, hash-verified

146
147/// Converts our own `RGB` type to an SDL `Color`.
148fn rgb_to_color(rgb: RGB) -> Color {
149 Color::RGB(rgb.0, rgb.1, rgb.2)
150}
151
152/// Given an SDL `event`, converts it to a `Key` event if it is a key press; otherwise, returns
153/// `None` for unknown events.

Callers 3

newMethod · 0.85
set_draw_colorMethod · 0.85
move_pixelsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected