mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:10:38 +00:00
Split into Window server and graphic context handling
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13256 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
59f2a16897
commit
53bd496a00
26 changed files with 3096 additions and 6288 deletions
|
@ -55,8 +55,6 @@ static Class NSImageRep_class = NULL;
|
|||
them can load in data from an external source. */
|
||||
if (self == [NSImageRep class])
|
||||
{
|
||||
id obj;
|
||||
|
||||
NSImageRep_class = self;
|
||||
imageReps = [[NSMutableArray alloc] initWithCapacity: 2];
|
||||
[imageReps addObject: [NSBitmapImageRep class]];
|
||||
|
@ -434,6 +432,7 @@ static Class NSImageRep_class = NULL;
|
|||
{
|
||||
BOOL ok, reset;
|
||||
NSGraphicsContext *ctxt;
|
||||
NSAffineTransform *ctm;
|
||||
|
||||
if (_size.width == 0 && _size.height == 0)
|
||||
return NO;
|
||||
|
@ -445,13 +444,13 @@ static Class NSImageRep_class = NULL;
|
|||
{
|
||||
if ([[ctxt focusView] isFlipped])
|
||||
aPoint.y -= _size.height;
|
||||
DPSmatrix(ctxt); DPScurrentmatrix(ctxt);
|
||||
ctm = GSCurrentCTM(ctxt);
|
||||
DPStranslate(ctxt, aPoint.x, aPoint.y);
|
||||
reset = 1;
|
||||
}
|
||||
ok = [self draw];
|
||||
if (reset)
|
||||
DPSsetmatrix(ctxt);
|
||||
GSSetCTM(ctxt, ctm);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
@ -460,6 +459,7 @@ static Class NSImageRep_class = NULL;
|
|||
NSSize scale;
|
||||
BOOL ok;
|
||||
NSGraphicsContext *ctxt;
|
||||
NSAffineTransform *ctm;
|
||||
|
||||
NSDebugLLog(@"NSImage", @"Drawing in rect (%f %f %f %f)\n",
|
||||
NSMinX(aRect), NSMinY(aRect), NSWidth(aRect), NSHeight(aRect));
|
||||
|
@ -471,11 +471,11 @@ static Class NSImageRep_class = NULL;
|
|||
NSHeight(aRect) / _size.height);
|
||||
if ([[ctxt focusView] isFlipped])
|
||||
aRect.origin.y -= NSHeight(aRect);
|
||||
DPSmatrix(ctxt); DPScurrentmatrix(ctxt);
|
||||
ctm = GSCurrentCTM(ctxt);
|
||||
DPStranslate(ctxt, NSMinX(aRect), NSMinY(aRect));
|
||||
DPSscale(ctxt, scale.width, scale.height);
|
||||
ok = [self draw];
|
||||
DPSsetmatrix(ctxt);
|
||||
GSSetCTM(ctxt, ctm);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue