@@ -4,7 +4,8 @@ use crate::text::TextConfig;
44use  crate :: { ClayLayoutScope ,  Color  as  ClayColor } ; 
55
66use  skia_safe:: { 
7-     Canvas ,  ClipOp ,  Color ,  Font ,  Image ,  Paint ,  PaintCap ,  Point ,  RRect ,  Rect ,  SamplingOptions ,  Typeface 
7+     Canvas ,  ClipOp ,  Color ,  Font ,  Image ,  Paint ,  PaintCap ,  Point ,  RRect ,  Rect ,  SamplingOptions , 
8+     Typeface , 
89} ; 
910
1011pub  fn  clay_to_skia_color ( color :  ClayColor )  -> Color  { 
@@ -207,13 +208,12 @@ pub fn clay_skia_render<'a, CustomElementData: 'a>(
207208
208209                // Helper to draw an arc. 
209210                let  mut  draw_corner_arc = |canvas :  & Canvas , 
210-                                        center_x :  f32 , 
211-                                        center_y :  f32 , 
212-                                        radius :  f32 , 
213-                                        start_angle :  f32 , 
214-                                        sweep_angle :  f32 , 
215-                                        width :  u16 
216-                                        | { 
211+                                            center_x :  f32 , 
212+                                            center_y :  f32 , 
213+                                            radius :  f32 , 
214+                                            start_angle :  f32 , 
215+                                            sweep_angle :  f32 , 
216+                                            width :  u16 | { 
217217                    let  radius = radius - ( width as  f32  / 2. ) ; 
218218                    let  arc_rect = Rect :: from_xywh ( 
219219                        center_x - radius, 
@@ -238,17 +238,18 @@ pub fn clay_skia_render<'a, CustomElementData: 'a>(
238238                        center_y, 
239239                        border. corner_radii . top_left , 
240240                        180.0 , 
241-                         90.0 / 2. , 
242-                         border. width . left 
241+                         90.0  /  2. , 
242+                         border. width . left , 
243243                    ) ; 
244244
245245                    draw_corner_arc ( 
246246                        canvas, 
247247                        center_x, 
248248                        center_y, 
249249                        border. corner_radii . top_left , 
250-                         180.0  + 90.0 /2. , 
251-                         90.0 /2. , border. width . top 
250+                         180.0  + 90.0  / 2. , 
251+                         90.0  / 2. , 
252+                         border. width . top , 
252253                    ) ; 
253254                } 
254255
@@ -263,15 +264,17 @@ pub fn clay_skia_render<'a, CustomElementData: 'a>(
263264                        center_y, 
264265                        border. corner_radii . top_right , 
265266                        270.0 , 
266-                         90.0 /2.0 , border. width . top 
267+                         90.0  / 2.0 , 
268+                         border. width . top , 
267269                    ) ; 
268270                    draw_corner_arc ( 
269271                        canvas, 
270272                        center_x, 
271273                        center_y, 
272274                        border. corner_radii . top_right , 
273-                         270.0 +90. /2. , 
274-                         90.0 /2.0 , border. width . right 
275+                         270.0  + 90.  / 2. , 
276+                         90.0  / 2.0 , 
277+                         border. width . right , 
275278                    ) ; 
276279                } 
277280
@@ -286,16 +289,18 @@ pub fn clay_skia_render<'a, CustomElementData: 'a>(
286289                        center_y, 
287290                        border. corner_radii . bottom_left , 
288291                        90.0 , 
289-                         90.0 /2. , border. width . bottom 
292+                         90.0  / 2. , 
293+                         border. width . bottom , 
290294                    ) ; 
291295
292296                    draw_corner_arc ( 
293297                        canvas, 
294298                        center_x, 
295299                        center_y, 
296300                        border. corner_radii . bottom_left , 
297-                         90.0  + 90. /2. , 
298-                         90.0 /2. , border. width . left 
301+                         90.0  + 90.  / 2. , 
302+                         90.0  / 2. , 
303+                         border. width . left , 
299304                    ) ; 
300305                } 
301306
@@ -310,15 +315,17 @@ pub fn clay_skia_render<'a, CustomElementData: 'a>(
310315                        center_y, 
311316                        border. corner_radii . bottom_right , 
312317                        0. , 
313-                         90.0 /2. , border. width . right 
318+                         90.0  / 2. , 
319+                         border. width . right , 
314320                    ) ; 
315321                    draw_corner_arc ( 
316322                        canvas, 
317323                        center_x, 
318324                        center_y, 
319325                        border. corner_radii . bottom_right , 
320-                         90.0 /2. , 
321-                         90.0 /2. , border. width . bottom 
326+                         90.0  / 2. , 
327+                         90.0  / 2. , 
328+                         border. width . bottom , 
322329                    ) ; 
323330                } 
324331            } 
0 commit comments