MCPcopy Create free account
hub / github.com/DioxusLabs/anyrender / with_renderer

Method with_renderer

crates/softbuffer_window_renderer/src/lib.rs:37–44  ·  view source on GitHub ↗
(renderer: R)

Source from the content-addressed store, hash-verified

35}
36
37impl From<anyrender::RendererConfig> for SoftbufferRendererOptions {
38 fn from(config: anyrender::RendererConfig) -> Self {
39 let mut options = Self::default();
40 if let Some(color) = config.base_color {
41 options.base_color = color;
42 }
43 // `composite_alpha_mode` is intentionally ignored: softbuffer does not
44 // support transparency, so any requested alpha mode degrades to opaque.
45 options
46 }
47}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected