MCPcopy Create free account
hub / github.com/alceal/plotlars / resolve_dimensions

Function resolve_dimensions

crates/plotlars-plotters/src/render/mod.rs:38–47  ·  view source on GitHub ↗
(layout: &plotlars_core::ir::layout::LayoutIR)

Source from the content-addressed store, hash-verified

36}
37
38pub(super) fn resolve_dimensions(layout: &plotlars_core::ir::layout::LayoutIR) -> (u32, u32) {
39 match &layout.dimensions {
40 Some(dims) => {
41 let w = dims.width.unwrap_or(DEFAULT_WIDTH as usize) as u32;
42 let h = dims.height.unwrap_or(DEFAULT_HEIGHT as usize) as u32;
43 (w, h)
44 }
45 None => (DEFAULT_WIDTH, DEFAULT_HEIGHT),
46 }
47}
48
49pub(super) fn polygon_vertices_at_origin(base_shape: BaseShape, r: i32) -> Vec<(i32, i32)> {
50 use crate::converters::components::*;

Callers 7

save_to_fileFunction · 0.85
render_to_svg_stringFunction · 0.85
render_boxplotFunction · 0.85
render_bar_verticalFunction · 0.85
render_bar_horizontalFunction · 0.85
render_numericFunction · 0.85
render_heatmapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected