GoogleCodeArchive / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

toImage array is too simple in its fill behaviour #106

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Marcus noted the following: 

There are various sensible ways to expand one rectangle to fit into
another.

1) it can be just strechted in both directions
2) "AspectFit" - it can be streched to fit into but preserve aspect ratio
2) "AspectFill" - it can be streched to completely fill but preserve aspect
ratio

Should be an input parameter.

I agree and so will add another toImage method that accepts a fill strategy.

The default will be #1 from the list since I think it's the most logical.

Original issue reported on code.google.com by allain.lalonde on 24 Jul 2009 at 12:18

GoogleCodeExporter commented 9 years ago
Actually #2 (the first one) is the one I'll go with as the default.

Original comment by allain.lalonde on 5 Aug 2009 at 12:52

GoogleCodeExporter commented 9 years ago
Yes, I also think 'AspectFit' is the best default, because it's most 
conservative -
keep aspect ratio and display all image content.

Original comment by mr0...@mro.name on 5 Aug 2009 at 1:06

GoogleCodeExporter commented 9 years ago
Fixed in r649.

Original comment by allain.lalonde on 5 Aug 2009 at 2:47

GoogleCodeExporter commented 9 years ago
Copying my comment from Issue 88:

I was not able to validate this fix.  I've added an example that demonstrates 
the
different fill strategies, and all the aspect cover images have no foreground.  
The
aspect fill and exact fill images look correct to me.

$ svn commit -m " Issue 88  ; adding example that demonstrates the different 
toImage
fill strategies, uncovered a possible bug with aspect cover fill strategy"
Adding         
examples/src/main/java/edu/umd/cs/piccolo/examples/ToImageExample.java
Transmitting file data ...
Committed revision 784.

Original comment by heue...@gmail.com on 21 Oct 2009 at 3:57

GoogleCodeExporter commented 9 years ago

Original comment by heue...@gmail.com on 21 Oct 2009 at 8:00

GoogleCodeExporter commented 9 years ago
Fixed in r792 and r793. Translation of node was being applied unnecessarily and 
with
the wrong magnification resulting in node being off the images canvas.

Original comment by allain.lalonde on 21 Oct 2009 at 9:10

GoogleCodeExporter commented 9 years ago

Original comment by allain.lalonde on 21 Oct 2009 at 9:10

GoogleCodeExporter commented 9 years ago

Original comment by allain.lalonde on 30 Oct 2009 at 3:50

GoogleCodeExporter commented 9 years ago
Added texture-based examples to ToImageExample and confirm that the problems 
seen
above with open-jdk 1.6 are due to its own font rendering problems.  Marking as 
Verified.

$ svn commit -m "Issues 88, 106 ; adding texture-based examples to 
ToImageExample"
...
Committed revision 871.

Original comment by heue...@gmail.com on 30 Oct 2009 at 3:51