11use std:: rc:: Rc ;
22
3- use pdf_writer:: types:: { MaskType , ShadingType } ;
3+ use pdf_writer:: types:: { FunctionShadingType , MaskType } ;
44use pdf_writer:: { Content , Filter , Finish , PdfWriter , Ref } ;
55use usvg:: {
66 LinearGradient , NormalizedF64 , Paint , RadialGradient , Stop , StopOffset , Transform ,
@@ -32,7 +32,7 @@ pub fn create(
3232
3333struct GradientProperties {
3434 coords : Vec < f32 > ,
35- shading_type : ShadingType ,
35+ shading_type : FunctionShadingType ,
3636 stops : Vec < Stop > ,
3737 transform : Transform ,
3838 units : Units ,
@@ -51,7 +51,7 @@ fn create_linear_gradient(
5151 gradient. x2 as f32 ,
5252 gradient. y2 as f32 ,
5353 ] ,
54- shading_type : ShadingType :: Axial ,
54+ shading_type : FunctionShadingType :: Axial ,
5555 stops : gradient. stops . clone ( ) ,
5656 transform : gradient. transform ,
5757 units : gradient. units ,
@@ -74,7 +74,7 @@ fn create_radial_gradient(
7474 gradient. cy as f32 ,
7575 gradient. r. get( ) as f32 ,
7676 ] ,
77- shading_type : ShadingType :: Radial ,
77+ shading_type : FunctionShadingType :: Radial ,
7878 stops : gradient. stops . clone ( ) ,
7979 transform : gradient. transform ,
8080 units : gradient. units ,
@@ -107,7 +107,7 @@ fn create_shading_pattern(
107107 let shading_function_ref =
108108 get_shading_function ( false , & properties. stops , writer, ctx) ;
109109 let mut shading_pattern = writer. shading_pattern ( pattern_ref) ;
110- let mut shading = shading_pattern. shading ( ) ;
110+ let mut shading = shading_pattern. function_shading ( ) ;
111111 shading. shading_type ( properties. shading_type ) ;
112112 shading. color_space ( ) . srgb ( ) ;
113113
@@ -142,7 +142,7 @@ fn get_soft_mask(
142142 } ) ;
143143
144144 let shading_function_ref = get_shading_function ( true , & properties. stops , writer, ctx) ;
145- let mut shading = writer. shading ( shading_ref) ;
145+ let mut shading = writer. function_shading ( shading_ref) ;
146146 shading. shading_type ( properties. shading_type ) ;
147147 shading. color_space ( ) . d65_gray ( ) ;
148148
0 commit comments