diff options
Diffstat (limited to 'src/renderer.rs')
| -rw-r--r-- | src/renderer.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/renderer.rs b/src/renderer.rs index 69c3f70..d91c3f0 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -38,7 +38,7 @@ use crate::utils::percent_to_pixel; /// Returns `RenderError` if the surface creation, rendering, or PNG encoding fails pub fn render_to_png( map: &Map, - stage_type: StageType, + stage_type: &StageType, configuration: &Configuration, ) -> Result<Vec<u8>, RenderError> { // Safe cast: map dimensions are typically in the range of hundreds to thousands of pixels @@ -80,7 +80,7 @@ pub fn render_to_png( /// Returns `RenderError` if the surface creation or rendering fails pub fn render_to_surface( map: &Map, - stage_type: StageType, + stage_type: &StageType, configuration: &Configuration, ) -> Result<ImageSurface, RenderError> { // Safe cast: map dimensions are typically in the range of hundreds to thousands of pixels @@ -120,7 +120,7 @@ pub fn render_to_surface( /// Returns `RenderError` if the surface creation, rendering, or file I/O fails pub fn render_to_svg( map: &Map, - stage_type: StageType, + stage_type: &StageType, configuration: &Configuration, ) -> Result<String, RenderError> { let total_width = configuration.theme.sizes.map_width + configuration.theme.sizes.padding * 2.0; @@ -150,7 +150,7 @@ pub fn render_to_svg( fn render( context: &Context, map: &Map, - stage_type: StageType, + stage_type: &StageType, configuration: &Configuration, ) -> Result<(), RenderError> { // Apply padding transform @@ -177,7 +177,7 @@ fn render( draw_background(context, configuration)?; if configuration.options.show_background { - draw_stage_patterns(context, stage_type, map, configuration)?; + draw_stage_patterns(context, map, configuration)?; } draw_axes(context, stage_type, map, configuration)?; @@ -205,7 +205,6 @@ fn draw_background(context: &Context, configuration: &Configuration) -> Result<( fn draw_stage_patterns( context: &Context, - _stage_type: StageType, map: &Map, configuration: &Configuration, ) -> Result<(), RenderError> { @@ -276,7 +275,7 @@ fn draw_stage_patterns( fn draw_axes( context: &Context, - stage_type: StageType, + stage_type: &StageType, map: &Map, configuration: &Configuration, ) -> Result<(), RenderError> { |