Update some dependencies (#2134)

* Update some dependencies

* Update to action v2

* Fix for v2
This commit is contained in:
James Lindsay
2024-12-12 18:28:49 +00:00
committed by GitHub
parent d97b02506e
commit fc0cf604df
17 changed files with 1831 additions and 1131 deletions

View File

@@ -525,7 +525,7 @@ impl GraphicElementRendered for VectorData {
match self.style.fill() {
Fill::Solid(color) => {
let fill = peniko::Brush::Solid(peniko::Color::rgba(color.r() as f64, color.g() as f64, color.b() as f64, color.a() as f64));
let fill = peniko::Brush::Solid(peniko::Color::new([color.r(), color.g(), color.b(), color.a()]));
scene.fill(peniko::Fill::NonZero, kurbo::Affine::new(element_transform.to_cols_array()), &fill, None, &path);
}
Fill::Gradient(gradient) => {
@@ -533,7 +533,7 @@ impl GraphicElementRendered for VectorData {
for &(offset, color) in &gradient.stops.0 {
stops.push(peniko::ColorStop {
offset: offset as f32,
color: peniko::Color::rgba(color.r() as f64, color.g() as f64, color.b() as f64, color.a() as f64),
color: peniko::color::DynamicColor::from_alpha_color(peniko::Color::new([color.r(), color.g(), color.b(), color.a()])),
});
}
// Compute bounding box of the shape to determine the gradient start and end points
@@ -576,7 +576,7 @@ impl GraphicElementRendered for VectorData {
if let Some(stroke) = self.style.stroke() {
let color = match stroke.color {
Some(color) => peniko::Color::rgba(color.r() as f64, color.g() as f64, color.b() as f64, color.a() as f64),
Some(color) => peniko::Color::new([color.r(), color.g(), color.b(), color.a()]),
None => peniko::Color::TRANSPARENT,
};
use crate::vector::style::{LineCap, LineJoin};
@@ -701,7 +701,7 @@ impl GraphicElementRendered for Artboard {
use vello::peniko;
// Render background
let color = peniko::Color::rgba(self.background.r() as f64, self.background.g() as f64, self.background.b() as f64, self.background.a() as f64);
let color = peniko::Color::new([self.background.r(), self.background.g(), self.background.b(), self.background.a()]);
let [a, b] = [self.location.as_dvec2(), self.location.as_dvec2() + self.dimensions.as_dvec2()];
let rect = kurbo::Rect::new(a.x.min(b.x), a.y.min(b.y), a.x.max(b.x), a.y.max(b.y));
let blend_mode = peniko::BlendMode::new(peniko::Mix::Clip, peniko::Compose::SrcOver);

File diff suppressed because it is too large Load Diff

View File

@@ -22,7 +22,7 @@ convert_case = { workspace = true }
indoc = "2.0.5"
proc-macro-crate = "3.1.0"
proc-macro-error = "1.0"
proc-macro-error2 = "2"
[dev-dependencies]
graphene-core = { workspace = true }

View File

@@ -2,7 +2,7 @@
use proc_macro::TokenStream;
use proc_macro2::Span;
use proc_macro_error::proc_macro_error;
use proc_macro_error2::proc_macro_error;
use quote::{format_ident, quote, ToTokens};
use syn::{
parse_macro_input, punctuated::Punctuated, token::Comma, AngleBracketedGenericArguments, AssocType, FnArg, GenericArgument, GenericParam, Ident, ItemFn, Lifetime, Pat, PatIdent, PathArguments,

View File

@@ -1,6 +1,6 @@
use crate::parsing::{Implementation, ParsedField, ParsedNodeFn};
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;
use quote::quote;
use syn::{spanned::Spanned, GenericParam, Type};

View File

@@ -156,7 +156,7 @@ impl WgpuExecutor {
let render_params = RenderParams {
// We are using an explicit opaque color here to eliminate the alpha premulitplication step
// which would be required to support a transparent webgpu canvas
base_color: vello::peniko::Color::rgb8(0x22, 0x22, 0x22),
base_color: vello::peniko::Color::from_rgba8(0x22, 0x22, 0x22, 0xff),
width,
height,
antialiasing_method: AaConfig::Msaa8,