ender2012 / xmlisp

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

Scaling does not work with NSImageView (possible problem with the bridge) #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Start up the ccl ide on windows with the newest version of cocotron.
2.Execute an example that includes an XLUI img.  There is an example in
test-case-examples.lisp that contains only an application-window and an img
which shows the scalable game design logo (if you just search for <img in
test-case-examples.lisp you should be able to find it).  

What is the expected output? What do you see instead?

When this test is done on the Mac side, we see the image scaled to fit
inside the window, but on the PC side the image is not scaled at all.  

Please use labels and text to provide additional information.

At first this issue seemed to be an issue that only had to do with
Cocotron, but after some experiments it seems that there might be a problem
with the objective C bridge.  I created an example in objective C (with
Xcode) that just contains a window with a 128x128 NSImageView that scales a
16x16 .png file up to 96x96.  This example scales the image properly when I
target for both Mac or Windows.  This example seems to suggest that this
bug does not reside merely in the domain of Cocotron.  

I also encountered another interesting anomaly while trying to track down
the beginning of this issue.  I had noticed that this bug did not occur on
my old install of the CCl Windows IDE (I had not updated the CCL ide on
well over a month and this version of CCL had a quite old version of
Cocotorn as well).  I began rolling back version of Cocotron (from this
repository
http://svn.clozure.com/publicsvn/openmcl/trunk/aux/cocotron/win32/cocotron
) until I found a version that did not exhibit this issue and I found that
13540 was the first one to have this problem.  Coincidentally, 13540 is
also the last revision that will work with the newest version of ccl I have
(the .tz2 file clozure sent to us).  In order to get version 13539 to work
I had use the old version of the IDE.  I am not sure if this has anything
to do with this issue but thought it might be relevant.  

Original issue reported on code.google.com by pokermik...@gmail.com on 31 Mar 2010 at 3:53

GoogleCodeExporter commented 8 years ago
Here is the xlui example from test-case-examples.lisp:

<application-window title="project logo">
  <img src="scalable-game-design.png"/>
</application-window>

Original comment by pokermik...@gmail.com on 31 Mar 2010 at 5:15

GoogleCodeExporter commented 8 years ago
Please attach the Xcode project to this issue.

Original comment by palter@clozure.com on 1 Apr 2010 at 4:47

GoogleCodeExporter commented 8 years ago
Here is the scaling example, don't mind the references to openGL views, I used 
the example from the cocotron 
website so I wouldn't have to do the cocotron setup.  

Original comment by pokermik...@gmail.com on 1 Apr 2010 at 7:35

GoogleCodeExporter commented 8 years ago
The files ThisView.m and ThisView.h are missing

Original comment by palter@clozure.com on 1 Apr 2010 at 7:59

GoogleCodeExporter commented 8 years ago
Sorry Gary, try this one.  

Original comment by pokermik...@gmail.com on 1 Apr 2010 at 8:23

Attachments:

GoogleCodeExporter commented 8 years ago
Please update your copy of the Cocotron DLLs to the version I checked in 
earlier today as it seems to fix this 
problem.  Try it and let me now what you see.

Original comment by palter@clozure.com on 2 Apr 2010 at 6:31

GoogleCodeExporter commented 8 years ago
That did the trick, the scaling now works properly!  Thanks Gary!

Original comment by pokermik...@gmail.com on 2 Apr 2010 at 6:52