mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
Finally have the scaling working perfectly(?).
I had to hack around problems in GNUstep's bounds implementation (I don't know if they're bugs or design limitations), but the fix was just a matter of making sure the bounds matrix was correct: force the scale to 1 before adjusting bounds, and then make sure the translation is scaled afterwards.
This commit is contained in:
parent
e2f8490f9a
commit
a0201728d9
1 changed files with 9 additions and 8 deletions
|
@ -117,13 +117,6 @@ initWithFrame:
|
|||
return scale;
|
||||
}
|
||||
|
||||
- (NSRect) adjustScroll: (NSRect)newVisible
|
||||
{
|
||||
Sys_Printf ("newVisible: %g %g %g %g\n",
|
||||
newVisible.origin.x, newVisible.origin.y,
|
||||
newVisible.size.width, newVisible.size.height);
|
||||
return newVisible;
|
||||
}
|
||||
|
||||
-setOrigin:(NSPoint)pt scale:(float) sc
|
||||
{
|
||||
|
@ -154,12 +147,20 @@ initWithFrame:
|
|||
// size this view
|
||||
[self setFrame: sframe];
|
||||
if (_boundsMatrix) {
|
||||
//FIXME workaround for a bug in GNUstep
|
||||
//FIXME workaround for a bug (?) in GNUstep
|
||||
NSAffineTransformStruct t = [_boundsMatrix transformStruct];
|
||||
t.m11 = t.m22 = 1;
|
||||
t.m12 = t.m21 = 0;
|
||||
[_boundsMatrix setTransformStruct: t];
|
||||
}
|
||||
[self setBounds: bounds];
|
||||
if (_boundsMatrix) {
|
||||
//FIXME workaround for a bug (?) in GNUstep
|
||||
NSAffineTransformStruct t = [_boundsMatrix transformStruct];
|
||||
t.tX *= scale;
|
||||
t.tY *= scale;
|
||||
[_boundsMatrix setTransformStruct: t];
|
||||
}
|
||||
|
||||
//[self setPostsFrameChangedNotifications:YES];
|
||||
//[self setPostsBoundsChangedNotifications:YES];
|
||||
|
|
Loading…
Reference in a new issue