From e9c2ce162358cfdf5b7b0d47f2592bdea1e72a92 Mon Sep 17 00:00:00 2001 From: Chad Brokaw Date: Wed, 3 May 2023 14:53:36 -0400 Subject: [PATCH] resolve merge conflicts --- crates/encoding/src/encoding.rs | 10 +++++++++- crates/encoding/src/resolve.rs | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/encoding/src/encoding.rs b/crates/encoding/src/encoding.rs index 5232615..b94ac69 100644 --- a/crates/encoding/src/encoding.rs +++ b/crates/encoding/src/encoding.rs @@ -105,11 +105,13 @@ impl Encoding { Patch::Ramp { draw_data_offset: offset, stops, + extend, } => { let stops = stops.start + stops_base..stops.end + stops_base; Patch::Ramp { draw_data_offset: offset + offsets.draw_data, stops, + extend: *extend, } } Patch::GlyphRun { index } => Patch::GlyphRun { @@ -347,7 +349,12 @@ impl Encoding { } #[cfg(feature = "full")] - fn add_ramp(&mut self, color_stops: impl Iterator, alpha: f32) { + fn add_ramp( + &mut self, + color_stops: impl Iterator, + alpha: f32, + extend: Extend, + ) { let offset = self.draw_data.len(); let stops_start = self.resources.color_stops.len(); if alpha != 1.0 { @@ -360,6 +367,7 @@ impl Encoding { self.resources.patches.push(Patch::Ramp { draw_data_offset: offset, stops: stops_start..self.resources.color_stops.len(), + extend, }); } } diff --git a/crates/encoding/src/resolve.rs b/crates/encoding/src/resolve.rs index 37357ef..a1d3eed 100644 --- a/crates/encoding/src/resolve.rs +++ b/crates/encoding/src/resolve.rs @@ -12,7 +12,7 @@ use { image_cache::{ImageCache, Images}, ramp_cache::{RampCache, Ramps}, }, - peniko::Image, + peniko::{Extend, Image}, std::ops::Range, };