Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O orbclient
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • redox-os
  • orbclient
  • Issues
  • #42

Closed
Open
Created Jul 01, 2018 by Michael Hölzl@MichaelHoelzlDeveloper

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])
Assignee
Assign to
Time tracking