Re: NSImage and flipping
Re: NSImage and flipping
- Subject: Re: NSImage and flipping
- From: "Louis C. Sacha" <email@hidden>
- Date: Mon, 16 Feb 2004 21:15:04 -0800
Hello...
First, thanks to Allan and the other people who took the time to try
the code and verify that the code worked correctly (the way Allan has
said) on their machines.
It turns out the problem was definitely with my test case, and
although the code was correct, I had run into an issue with
ProjectBuilder. For some reason it was no longer compiling that
particular file when the project was built ***. There were several
subtle hints that I should have caught (for example, I made a slight
change to the points where the images were being drawn in the view,
but it was never actually changed when the app ran). But,
unfortunately, since the results (or rather the lack thereof) from
the primary changes I made to the way the images were drawn for the
test case confirmed my (incorrect) theory/assumption of how NSImage
was working, I didn't notice the problem.
So, NSImage does obey the setFlipped: setting when you composite it
_and_ when you draw into the image, on both 10.2 and 10.3, and Allan
was right. And Bjorn, sorry about making things seem more complicated
than it actually was... both the alternatives I mentioned earlier in
the thread will still work, although obviously they aren't necessary
in your case.
Louis
*** Technically it's probably still my fault and not really
ProjectBuilder's fault, because of the way I make test cases.
I use a single "global" folder for the intermediate build files from
all of my projects instead of storing them within each project, and I
make my new test cases by duplicating a base "TestAppShell" project
or a previous test case (so every one of my test case projects is
descended from that base project, and has the same name, identifier,
etc...).
This results in each test case stomping over all of the existing
intermediate build files for the other test cases, and although I was
aware of it, I didn't consider it to be an issue. ProjectBuilder
didn't seem to mind, and always just rebuilt the files as necessary
every time, so I'd never had any sort of problem from it before.
I'm not sure exactly what happened to make this time different, but
suddenly ProjectBuilder would just ignore the fact that changes had
been made to that particular .m file and would rebuild the app
without updating the output file.
Cleaning the project fixed the problem, and now everything works
correctly again. I can switch back and forth between different test
case projects without any problem, and when the intermediate build
files get stomped on by other copies of the base test app project,
they are rebuilt correctly just like they used to be...
Hopefully once I get myself switched over to xcode, I won't have to
worry about it anymore, and in the meantime, I'll just have to be
careful to make sure I always clean my test cases before building
them, just in case... :)
Unless this is a feature added to 10.3 and not present in 10.2,
either there is something else going on in Bjorn's text drawing
code, or there is something wrong in the code I used as my test
case?
[...]
If the simple setFlipped: solution for drawing the image should
work, then the two resulting images would be different, one would
have the green rect on top and the other would have the green rect
on the bottom... However, both images end up being the same. [...]
Interestingly they turn up *different* here (10.3), I can't find
anything in the release notes about a fix -- perhaps someone else
with 10.2 can confirm that the images show up identically on his
system?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.