wplot/sys/drawing/
rect_change_region.rs1pub( crate ) mod private
3{
4 use crate::protected::*;
5
6 #[ allow( dead_code ) ]
8 #[ derive( Debug, Clone ) ]
9 pub struct RectChangeRegion
10 {
11 pub( crate ) id : Id,
13 pub( crate ) left_top : X2< f32 >,
15 pub( crate ) right_bottom : X2< f32 >,
17 }
18
19 impl RectChangeRegion
20 {
21
22 pub fn new( id : Id ) -> Self
24 {
25 let left_top = X2::make( -1.0, -1.0 );
26 let right_bottom = X2::make( 1.0, 1.0 );
27 Self{ left_top, right_bottom, id }
28 }
29
30 pub fn region( mut self, left_top : X2< f32 >, right_bottom : X2< f32 > ) -> Self
32 {
33 self.left_top = left_top;
34 self.right_bottom = right_bottom;
35 self
36 }
37
38 }
39
40 impl ChangeInterface for RectChangeRegion
41 {
42 }
43
44}
45
46crate::mod_interface!
47{
48 exposed use RectChangeRegion;
49}