MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / from_graphics_backend

Method from_graphics_backend

src/plot_renderer/mod.rs:25–38  ·  view source on GitHub ↗

From `iced::system::Information`'s `graphics_backend`.

(graphics_backend: &str)

Source from the content-addressed store, hash-verified

23impl PlotRenderStrategy {
24 /// From `iced::system::Information`'s `graphics_backend`.
25 pub fn from_graphics_backend(graphics_backend: &str) -> Self {
26 #[cfg(feature = "canvas")]
27 {
28 match graphics_backend.trim() {
29 "tiny-skia" => Self::Canvas,
30 _ => Self::Shader,
31 }
32 }
33 #[cfg(not(feature = "canvas"))]
34 {
35 _ = graphics_backend;
36 Self::Shader
37 }
38 }
39 pub(crate) fn force_cpu_picking(self) -> bool {
40 #[cfg(feature = "canvas")]
41 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected