bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix, NSView (Text Rotation)


From: Georg Fleischmann
Subject: Re: Fix, NSView (Text Rotation)
Date: Sun, 14 Mar 2004 19:17:47 GMT

Alexander Malmberg wrote:
> Unfortunately, the patch looks messed up here, and patch complains that
> it's malformed. Could you try sending it again as plain (not enriched)
> text? (FWIW, the NSAffineTransform patch arrived ok.)

Sure, here is a second try.
Two lines are 85 characters wide. Maybe this is the problem.

Georg



2004-03-14  Georg Fleischmann
        * gui/Source/NSView.m [NSView convertRect:fromView:]:
          better conversion of flipped + rotated views
        * gui/Source/NSView.m [NSView lockFocus:inRect:]:
          removed a problematic bounding rect call for rotated views



*** gui/Source/NSView.m.old     2004-03-14 01:10:15.000000000 +0100
--- gui/Source/NSView.m 2004-03-14 01:12:09.000000000 +0100
***************
*** 1250,1262 ****
      {
        matrix = [self _matrixFromWindow];
      }
-   r.origin = [matrix pointInMatrixSpace: r.origin];
-   r.size = [matrix sizeInMatrixSpace: r.size];

!   if (aView->_rFlags.flipped_view  != _rFlags.flipped_view)
      {
!       r.origin.y -= r.size.height;
      }
    return r;
  }

--- 1250,1285 ----
      {
        matrix = [self _matrixFromWindow];
      }

!   if (aView->_rFlags.flipped_view != _rFlags.flipped_view)
!     { NSPoint p[4];
!
!       if (aView->_rFlags.flipped_view)        // aView is flipped
!         {
!           r.origin.y -= r.size.height;
!         }
!
!       p[0] = r.origin;
!       p[1] = NSMakePoint(r.origin.x + r.size.width, r.origin.y);
!       p[2] = NSMakePoint(r.origin.x + r.size.width, r.origin.y + 
r.size.height);
!       p[3] = NSMakePoint(r.origin.x, r.origin.y + r.size.height);
!
!       p[0] = [matrix pointInMatrixSpace: p[0]];
!       p[1] = [matrix pointInMatrixSpace: p[1]];
!       p[2] = [matrix pointInMatrixSpace: p[2]];
!       p[3] = [matrix pointInMatrixSpace: p[3]];
!
!       r.origin.x = MIN( MIN( MIN(p[0].x, p[1].x), p[2].x), p[3].x);
!       r.origin.y = MIN( MIN( MIN(p[0].y, p[1].y), p[2].y), p[3].y);
!       r.size.width  = MAX( MAX( MAX(p[0].x, p[1].x), p[2].x), p[3].x) - 
r.origin.x;
!       r.size.height = MAX( MAX( MAX(p[0].y, p[1].y), p[2].y), p[3].y) - 
r.origin.y;
!     }
!   else
      {
!       r.origin = [matrix pointInMatrixSpace: r.origin];
!       r.size = [matrix sizeInMatrixSpace: r.size];
      }
+
    return r;
  }

***************
*** 1597,1606 ****
      {
        NSAffineTransform *matrix;
        matrix = [self _matrixToWindow];
-       if ([matrix isRotated])
-       {
-         [matrix boundingRectFor: rect result: &rect];
-       }

        if (_gstate)
        {
--- 1620,1625 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]