Maybe reorganize? I think we have too many similar but different methods...
Hi,
at the moment i work on the Orbclient and Orbtk, i create new feature, new widgets, bugfixes etc.
One problem is, we have too much similar but different methods.
I think we need more structured methods, params and options. The problem is this will breaks the compatibility to the existing orbtk etc. Or in the old methods, i call the new one and declare the old methods with #[deprecated].
The problem: We have the method "rect" which draw a filled rect, but in "rounded_rect" it is optional to fill it. (In Orbtk we call always the "rounded_rect", also if the border-radius zero. But "rounded_rect" need much more time to render.)
Another example we have the "circle" and the "wu_circle" methods, one filled and the other with anti aliasing.
And we have six different image draw methods.
//Rect
rect(&mut self, x: i32, y: i32, w: u32, h: u32, color: Color)
rounded_rect(&mut self, x: i32, y: i32, w: u32, h: u32, radius: u32, filled: bool, color: Color)
//Line
line(&mut self, argx1: i32, argy1: i32, argx2: i32, argy2: i32, color: Color)
wu_line(&mut self, x0: i32, y0: i32, x1: i32, y1: i32, color: Color)
line4points(&mut self, x0: i32, y0: i32, x: i32, y: i32, color: Color)
//Circle
circle(&mut self, x0: i32, y0: i32, radius: i32, color: Color)
wu_circle(&mut self, x0: i32, y0: i32, radius: i32, color: Color)
//Image
image_parallel(&mut self, start_x: i32, start_y: i32, w: u32, h: u32, image_data: &[Color])
image_fast (&mut self, start_x: i32, start_y: i32, w: u32, h: u32, image_data: &[Color])
image(&mut self, start_x: i32, start_y: i32, w: u32, h: u32, data: &[Color])
image_legacy(&mut self, start_x: i32, start_y: i32, w: u32, h: u32, data: &[Color])
image_over (&mut self, start: i32, image_data: &[Color])
image_opaque (&mut self, start_x: i32, start_y: i32, w: u32, h: u32, image_data: &[Color])