mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 00:40:55 +00:00
Small experimental changes on GState-less branch, from August 2013.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gstateless-opal@37079 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
12ad85addf
commit
aef4391b4b
5 changed files with 49 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2013-09-14 Ivan Vucica <ivan@vucica.net>
|
||||
|
||||
* Source/opal/OpalContext+Drawing.m:
|
||||
* Source/opal/OpalContext.m:
|
||||
Small experimental changes on GState-less branch, from August 2013.
|
||||
|
||||
* configure:
|
||||
* configure.ac:
|
||||
Added Xrender for Opal. Was needed under Cygwin.
|
||||
|
||||
2013-08-04 Ivan Vucica <ivan@vucica.net>
|
||||
|
||||
* Source/opal/GNUmakefile:
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
if(![_opalSurface cgContext]) \
|
||||
{ \
|
||||
NSLog(@"%p: No CG context while in %s", self, __PRETTY_FUNCTION__); \
|
||||
/*raise(SIGSTOP);*/ \
|
||||
return what; \
|
||||
}
|
||||
|
||||
|
@ -438,7 +439,6 @@ static CGFloat theAlpha = 1.; // TODO: removeme
|
|||
|
||||
OFFSET = theOffset;
|
||||
#endif
|
||||
[super setOffset: theOffset];
|
||||
}
|
||||
/*
|
||||
- (void) setColor: (device_color_t *)color state: (color_state_t)cState
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#import "opal/OpalFontEnumerator.h"
|
||||
#import "opal/OpalSurface.h"
|
||||
#import "gsc/GSStreamContext.h"
|
||||
#import <AppKit/NSGraphics.h> // NSDeviceIsScreen
|
||||
|
||||
#define OGSTATE self //((OpalGState *)gstate)
|
||||
|
||||
|
@ -65,9 +66,11 @@
|
|||
if (!self)
|
||||
return nil;
|
||||
|
||||
_backGStateStackHeight = 1;
|
||||
// Special handling for window drawing
|
||||
id dest;
|
||||
dest = [info objectForKey: NSGraphicsContextDestinationAttributeName];
|
||||
NSLog(@"Dest: %@", dest);
|
||||
if ((dest != nil) && [dest isKindOfClass: [NSWindow class]])
|
||||
{
|
||||
/* A context is only associated with one server. Do not retain
|
||||
|
@ -84,6 +87,8 @@
|
|||
|
||||
// TODO: we may want to create a default OpalSurface, in case GSSetDevice is not called
|
||||
|
||||
|
||||
// -[GState initWithDrawContext] would call DPSinitgraphics
|
||||
[self DPSinitgraphics];
|
||||
[self DPSinitclip];
|
||||
|
||||
|
@ -142,6 +147,15 @@
|
|||
return [surface cgContext];
|
||||
}
|
||||
|
||||
- (BOOL) supportsDrawGState
|
||||
{
|
||||
// required to get NSImageRep to use -[NSImageRep nativeDrawInRect:...]
|
||||
|
||||
// TODO: determine other uses for this
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
#if BUILD_SERVER == SERVER_x11
|
||||
#ifdef XSHM
|
||||
+ (void) _gotShmCompletion: (Drawable)d
|
||||
|
@ -183,4 +197,26 @@
|
|||
NSLog(@"%s: trying to replace gstate not on top of the stack", __PRETTY_FUNCTION__);
|
||||
}
|
||||
|
||||
- (void) GSdraw: (NSInteger)gstateNum
|
||||
toPoint: (NSPoint)aPoint
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
/*
|
||||
GSGState *g = gstate;
|
||||
|
||||
if (gstateNum)
|
||||
{
|
||||
[self DPSexecuserobject: gstateNum];
|
||||
ctxt_pop(g, opstack, GSGState);
|
||||
}
|
||||
|
||||
[gstate drawGState: g
|
||||
fromRect: srcRect
|
||||
toPoint: aPoint
|
||||
op: op
|
||||
fraction: delta];
|
||||
*/
|
||||
}
|
||||
@end
|
||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -7158,7 +7158,7 @@ elif test x"$BUILD_GRAPHICS" = "xxlib"; then
|
|||
elif test x"$BUILD_GRAPHICS" = "xwinlib"; then
|
||||
: # Nothing to do
|
||||
elif test x"$BUILD_GRAPHICS" = "xopal"; then
|
||||
LIBS="-lopal -lgnustep-corebase $LIBS"
|
||||
LIBS="-lopal -lgnustep-corebase -lXrender $LIBS"
|
||||
else
|
||||
as_fn_error $? "Invalid graphics backend $BUILD_GRAPHICS" "$LINENO" 5
|
||||
fi
|
||||
|
|
|
@ -642,7 +642,7 @@ elif test x"$BUILD_GRAPHICS" = "xxlib"; then
|
|||
elif test x"$BUILD_GRAPHICS" = "xwinlib"; then
|
||||
: # Nothing to do
|
||||
elif test x"$BUILD_GRAPHICS" = "xopal"; then
|
||||
LIBS="-lopal -lgnustep-corebase $LIBS"
|
||||
LIBS="-lopal -lgnustep-corebase -lXrender $LIBS"
|
||||
else
|
||||
AC_MSG_ERROR([Invalid graphics backend $BUILD_GRAPHICS])
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue