mac-comp127 / kilt-graphics

Graphics and UI library for learning software development principles in Java
https://mac-comp127.github.io/kilt-graphics/
2 stars 17 forks source link

Add Image methods to allow stretching #15

Open pcantrell opened 4 years ago

pcantrell commented 4 years ago

Problem

It’s currently not possible to stretch an Image beyond the source image file’s dimensions — to fill the background of a window, for example.

Desired solution

One possible solution would be to add an explicit setSize() method that stretches the image regardless of its natural size.

Another would be to provide an option for the max width/height params to switch from their current “shrink to fit” effect to “stretch to fill.”