@@ -2,19 +2,18 @@ extern crate iui;
22extern crate ui_sys;
33
44use iui:: controls:: {
5- Area , AreaDrawParams , AreaHandler , AreaMouseEvent , HorizontalBox , LayoutStrategy ,
5+ Area , AreaDrawParams , AreaHandler , HorizontalBox , LayoutStrategy ,
66} ;
7- use iui:: draw:: { Brush , Path , SolidBrush } ;
7+ use iui:: draw:: { Brush , Path , SolidBrush , FillMode } ;
88use iui:: prelude:: * ;
99use std:: f64:: consts:: PI ;
10- use ui_sys:: uiDrawFillModeWinding;
1110
1211struct HandleCanvas { }
1312impl AreaHandler for HandleCanvas {
1413 fn draw ( & mut self , _area : & Area , draw_params : & AreaDrawParams ) {
1514 let ctx = & draw_params. context ;
1615
17- let path = Path :: new ( ctx, uiDrawFillModeWinding ) ;
16+ let path = Path :: new ( ctx, FillMode :: Winding ) ;
1817 path. add_rectangle ( ctx, 0. , 0. , draw_params. area_width , draw_params. area_height ) ;
1918 path. end ( ctx) ;
2019
@@ -27,7 +26,7 @@ impl AreaHandler for HandleCanvas {
2726
2827 draw_params. context . fill ( & path, & brush) ;
2928
30- let path = Path :: new ( ctx, uiDrawFillModeWinding ) ;
29+ let path = Path :: new ( ctx, FillMode :: Winding ) ;
3130 for i in 0 ..100 {
3231 let x = i as f64 / 100. ;
3332 let y = ( ( x * PI * 2. ) . sin ( ) + 1. ) / 2. ;
0 commit comments