Skip to content

Commit 97114c5

Browse files
committed
skia-org: don't use deprecated items if possible
1 parent e0ea533 commit 97114c5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

skia-org/src/skpaint_overview.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
use crate::{resources, DrawingDriver};
22
use skia_safe::{
3-
corner_path_effect, dash_path_effect, discrete_path_effect, gradient_shader,
3+
color_filters, corner_path_effect, dash_path_effect, discrete_path_effect, gradient_shader,
44
line_2d_path_effect, paint, path_1d_path_effect, path_2d_path_effect, perlin_noise_shader,
5-
scalar, table_color_filter, AutoCanvasRestore, BlendMode, BlurStyle, Canvas, Color,
6-
ColorFilters, Font, MaskFilter, Matrix, Paint, Path, PathEffect, Point, Rect, Shaders,
7-
TextBlob, TileMode, Typeface,
5+
scalar, shaders, table_color_filter, AutoCanvasRestore, BlendMode, BlurStyle, Canvas, Color,
6+
Font, MaskFilter, Matrix, Paint, Path, PathEffect, Point, Rect, TextBlob, TileMode, Typeface,
87
};
98
use std::path;
109

@@ -294,7 +293,7 @@ fn draw_turbulence_perlin_noise_shader(canvas: &mut Canvas) {
294293
fn draw_compose_shader(canvas: &mut Canvas) {
295294
let colors = [Color::BLUE, Color::YELLOW];
296295
let paint = &mut Paint::default();
297-
paint.set_shader(Shaders::blend(
296+
paint.set_shader(shaders::blend(
298297
BlendMode::Difference,
299298
gradient_shader::radial(
300299
(128.0, 128.0),
@@ -328,7 +327,7 @@ fn draw_mask_filter(canvas: &mut Canvas) {
328327
fn draw_color_filter(c: &mut Canvas) {
329328
fn f(c: &mut Canvas, (x, y): (scalar, scalar), color_matrix: &[scalar; 20]) {
330329
let paint = &mut Paint::default();
331-
paint.set_color_filter(ColorFilters::matrix_row_major(color_matrix));
330+
paint.set_color_filter(color_filters::matrix_row_major(color_matrix));
332331

333332
let image = &resources::mandrill();
334333

0 commit comments

Comments
 (0)