On 12/11/13 5:13 AM, Anton V. Tarasov wrote:
On 11.12.2013 13:14, Jim Graham wrote:
Could this be implemented by having the code that renders the backing store
state its expliciton-screen size so that we don't need to add any computations
to the use
of getWidth/Height(null) to SG2D?
The computations we do in SG2D, namely the getLogicalSize(Image) method,
is the way to get the "logical" size of a BufferedImage (the size it
would have not being scaled) which returns its physical size via its
getWidth/Height methods. So, the problem is that the image doesn't keep
its logical size, but its physical (prescaled) width/height values and
the scale factor.
Thanks for the review!
The point I was trying to make is that if the code that renders a Swing
back buffer only ever calls "drawImage(img, x, y, w, h, obs)" then the
"logical size" of the image is irrelevant and we don't really need to
sprinkle that code throughout SG2D (yet? or ever?). We also don't need
to teach BI's about their scale/scaled size...
...jim