Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by hoffmann
Wed, 26 Aug 1992 09:16
Problem with NXImage
Author: hoffmann
Date: Wed, 26 Aug 1992 09:16
Date: Wed, 26 Aug 1992 09:16
38 lines
1883 bytes
1883 bytes
I have a problem with NXImage that is hurting me for days now and I cannot find a solution. I'm working on a drawing program which allows you to draw on top of a background representing a map. The map is a tiff image hold in a NXImage object. [self convertRect:&mapDrawRect toView:[window contentView]]; ....// now I'm calculating a offset for mapDrawRect [mapImage composite:NX_SOVER fromRect:&mapDrawRect toPoint:&aPoint]; is causing the following problem: Since NXImage specifies its rects in base coordinates and my drawing view can be scaled I have to convert mapDrawRect to the base coordinate system and then do the compositing. Everything works fine when the drawing view is scaled to 50%,100%,200%,400%,... When scaled to 25%,75%,150%,300%,... the result of the compositing differs from the one I wish by one pixel row (or sometimes column, I couldn't find a rule in this). Sometimes it's the size that's too small (or too large) sometimes the offset is offset with one pixel row(or column). aPoint is in drawing view coordinates (which is focused, BTW this is part of the drawSelf method). Everytime I scale the drawing view (and resize it accordingly) I resize the NXImage object such that it has the same size with the drawing view in base coordinates (the NXImage is set to scalable). I'll appreciate any help or example code using NXImage in similar situations. Uwe, hoffmann@fzi.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads