diff --git a/api/lua/pinnacle/render.lua b/api/lua/pinnacle/render.lua index d1bb445..bf8d61d 100644 --- a/api/lua/pinnacle/render.lua +++ b/api/lua/pinnacle/render.lua @@ -39,8 +39,8 @@ end local render = {} ---@alias ScalingFilter ----| "bilinear" ----| "nearest_neighbor" +---| "bilinear" Blend between the four closest pixels. May cause scaling to be blurry. +---| "nearest_neighbor" Choose the closest pixel. Causes scaling to look pixelated. ---@type table local filter_name_to_filter_value = { diff --git a/api/rust/src/render.rs b/api/rust/src/render.rs index f12d0b2..ecc7294 100644 --- a/api/rust/src/render.rs +++ b/api/rust/src/render.rs @@ -33,6 +33,14 @@ impl Render { } /// Set the upscaling filter that will be used for rendering. + /// + /// # Examples + /// + /// ``` + /// use pinnacle_api::render::ScalingFilter; + /// + /// render.set_upscale_filter(ScalingFilter::NearestNeighbor); + /// ``` pub fn set_upscale_filter(&self, filter: ScalingFilter) { let mut client = self.client.clone(); block_on_tokio(client.set_upscale_filter(SetUpscaleFilterRequest { @@ -42,6 +50,14 @@ impl Render { } /// Set the downscaling filter that will be used for rendering. + /// + /// # Examples + /// + /// ``` + /// use pinnacle_api::render::ScalingFilter; + /// + /// render.set_downscale_filter(ScalingFilter::NearestNeighbor); + /// ``` pub fn set_downscale_filter(&self, filter: ScalingFilter) { let mut client = self.client.clone(); block_on_tokio(client.set_downscale_filter(SetDownscaleFilterRequest {