Another approach would insist that your one overloaded method is far too accomplished and versatile. drawImage() should be capable of drawing an image. Resizing, no. Setting callbacks, probably not. Restricting to a region, probably not. All of these other tasks should be done by other methods. The point of overloading is to accomplish the same single purpose with multiple data types. If your overloading is used to add alternate functionality, then create separate methods. It's time to refactor!
Flat View: This topic has 15 replies
on 2 pages