resolve merge conflicts

This commit is contained in:
Chad Brokaw 2023-05-03 14:53:36 -04:00
parent 4f9ae4c937
commit e9c2ce1623
2 changed files with 10 additions and 2 deletions

View file

@ -105,11 +105,13 @@ impl Encoding {
Patch::Ramp { Patch::Ramp {
draw_data_offset: offset, draw_data_offset: offset,
stops, stops,
extend,
} => { } => {
let stops = stops.start + stops_base..stops.end + stops_base; let stops = stops.start + stops_base..stops.end + stops_base;
Patch::Ramp { Patch::Ramp {
draw_data_offset: offset + offsets.draw_data, draw_data_offset: offset + offsets.draw_data,
stops, stops,
extend: *extend,
} }
} }
Patch::GlyphRun { index } => Patch::GlyphRun { Patch::GlyphRun { index } => Patch::GlyphRun {
@ -347,7 +349,12 @@ impl Encoding {
} }
#[cfg(feature = "full")] #[cfg(feature = "full")]
fn add_ramp(&mut self, color_stops: impl Iterator<Item = ColorStop>, alpha: f32) { fn add_ramp(
&mut self,
color_stops: impl Iterator<Item = ColorStop>,
alpha: f32,
extend: Extend,
) {
let offset = self.draw_data.len(); let offset = self.draw_data.len();
let stops_start = self.resources.color_stops.len(); let stops_start = self.resources.color_stops.len();
if alpha != 1.0 { if alpha != 1.0 {
@ -360,6 +367,7 @@ impl Encoding {
self.resources.patches.push(Patch::Ramp { self.resources.patches.push(Patch::Ramp {
draw_data_offset: offset, draw_data_offset: offset,
stops: stops_start..self.resources.color_stops.len(), stops: stops_start..self.resources.color_stops.len(),
extend,
}); });
} }
} }

View file

@ -12,7 +12,7 @@ use {
image_cache::{ImageCache, Images}, image_cache::{ImageCache, Images},
ramp_cache::{RampCache, Ramps}, ramp_cache::{RampCache, Ramps},
}, },
peniko::Image, peniko::{Extend, Image},
std::ops::Range, std::ops::Range,
}; };