From: Toby D. <tj...@sf...> - 2005-05-19 07:07:37
|
Hi Henry, I guess the issue is that TheMatrix combines two things: an image, and frame for displaying it. Thus, it has methods for manipulating the image, and methods for manipulating the frame. There are no standard rules for how the frame and image should interact. For instance, if you make the frame smaller, should the image get smaller? And vice-versa, if the you make the image smaller, should the frame get smaller? TheMatrix scaling method is a good example of a method that would benefit from precised rules for how the image and frame interact. I don't know if there's one best set of behaviours; it would probably take some experimentation to see what's best. Thus, I think we should just remove the scaling methods for the next release, and then add image/frame behaviour as a feature to be implemented by someone who can think it through. This is also suggests a new underlying design: cleanly separate the image class and the frame that displays it. Then we could use different frames for an image, depending on what you want to use the image for. Toby On 5/18/05 7:49 PM, "he...@sf..." <he...@sf...> wrote: > > HI! Some of the test case are avaliable for people to see how matrix class > work at /csjava/csimage/tests/TheMatrixTest.java. > > > > /* > > Attention to owner of scalefactor class: > > I am in doubt with the scalefactor class, > > > > Due to the fact that we just scaled the pixel size and did not increase the > number of pixels. Thus, get image width and height returns the original > image width and image height value. > > > > The image itself does appear scaled in size. Do we consider this as a pass. > It is rarely to get the image width of a scaled image in our demo, and > getimagewidth and getimageheight did reflect the number of the pixels that > was used, but did not reflect the real world's change. > > > > In conclusion, I classified this as unknown, whoever wrote Scalefactor > class, please give me your advice. I will take that under consideration. > > */ > > > > Similarly, I think "save as jpeg" have similar nature of problem, whoever > wrote that I give it a pass, since it is the nature file format, so it is > not an error. > > > > > > Thank you for your time. > > > > best wishes, > > > > Henry Chan > > Computer Science Major > > Simon Fraser University -- Dr. Toby Donaldson School of Computing Science Simon Fraser University |