mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 07:21:02 +00:00
Started cleanup of opal backend.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@37167 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2c9d2ee692
commit
926c068c95
4 changed files with 556 additions and 493 deletions
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,12 @@
|
|||
2013-09-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/opal/OpalGState.h: Clean up to reduce warnings.
|
||||
* Source/opal/OpalGState.m: Add missing path and matrix methods.
|
||||
Remove warnings. Remove unneeded code. Reorder code to allow for
|
||||
easier comparison with GSGState.
|
||||
* Source/opal/OpalContext.m: Add missing includes to get shm
|
||||
completion working. Adjust to changes in OpalGState.
|
||||
|
||||
2013-09-23 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/opal/OpalGState.m: move variable declaration outside
|
||||
|
@ -66,10 +75,10 @@
|
|||
|
||||
* Source/opal/OpalSurface.m:
|
||||
Added reminder of how we should handle recreation of CGContexts.
|
||||
|
||||
|
||||
Disabled non-doublebuffered windows. (We always need a backing
|
||||
CGBitmapContext so we can implement -compositeGState: and -drawGState:.
|
||||
|
||||
|
||||
Added accessors -x11CGContext and -backingCGContext.
|
||||
|
||||
Fixed bug where sometimes we'd get incorrect expose values and would
|
||||
|
@ -87,8 +96,8 @@
|
|||
2013-09-19 Ivan Vucica <ivan@vucica.net>
|
||||
|
||||
* Source/opal/OpalContext.m:
|
||||
Added GState switcher -DPSsetgstate:. See description of
|
||||
_opGState in OpalGState.h.
|
||||
Added GState switcher -DPSsetgstate:. See description of
|
||||
_opGState in OpalGState.h.
|
||||
|
||||
* Headers/opal/OpalGState.h:
|
||||
Added _opGState i-var and relevant accessors.
|
||||
|
@ -217,7 +226,7 @@
|
|||
|
||||
* Source/cairo/GNUmakefile:
|
||||
Added fontconfig font classes directly to GNUmakefile for Cairo
|
||||
backend.
|
||||
backend.
|
||||
|
||||
It would be better if these had something like their own distinct
|
||||
GNUmakefile that produces a static library which would then be
|
||||
|
@ -244,7 +253,7 @@
|
|||
* Source/opal/OpalFontInfo.m:
|
||||
Implemented -defaultLineHeightForFont, the key to getting
|
||||
GNUstep layouting system to use information provided in
|
||||
-advancementForGlyph:.
|
||||
-advancementForGlyph:.
|
||||
|
||||
Without that, the textcontainer->linefrags does not get
|
||||
created.
|
||||
|
|
|
@ -57,45 +57,17 @@
|
|||
have a different cairo_t with the same surface.
|
||||
**/
|
||||
OPGStateRef _opGState;
|
||||
|
||||
/**
|
||||
Sometimes, -DPSgsave may get called before context has
|
||||
been created.
|
||||
|
||||
We need a counter for how many times CGContextSaveGState()
|
||||
needs to be called in first -DPSinitgraphics that gets called.
|
||||
**/
|
||||
int _CGContextSaveGStatesOnContextCreation;
|
||||
}
|
||||
@end
|
||||
|
||||
- (void) DPSinitclip;
|
||||
@interface OpalGState (InitializationMethods)
|
||||
- (void) DPSinitgraphics;
|
||||
- (void) DPSclip;
|
||||
- (void) DPSfill;
|
||||
- (void) DPSimage: (NSAffineTransform *)matrix
|
||||
: (NSInteger)pixelsWide
|
||||
: (NSInteger)pixelsHigh
|
||||
: (NSInteger)bitsPerSample
|
||||
: (NSInteger)samplesPerPixel
|
||||
: (NSInteger)bitsPerPixel
|
||||
: (NSInteger)bytesPerRow
|
||||
: (BOOL)isPlanar
|
||||
: (BOOL)hasAlpha
|
||||
: (NSString *)colorSpaceName
|
||||
: (const unsigned char *const[5])data;
|
||||
- (void) compositeGState: (OpalGState *)source
|
||||
fromRect: (NSRect)srcRect
|
||||
toPoint: (NSPoint)destPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (CGFloat)delta;
|
||||
- (void) compositerect: (NSRect)aRect
|
||||
op: (NSCompositingOperation)op;
|
||||
- (void) GSSetSurface: (OpalSurface *)opalSurface
|
||||
: (int)x
|
||||
: (int)y;
|
||||
|
||||
- (void) DPSgsave;
|
||||
- (void) DPSgrestore;
|
||||
- (void) GSCurrentSurface: (OpalSurface **)surface
|
||||
: (int *)x
|
||||
: (int *)y;
|
||||
@end
|
||||
|
||||
@interface OpalGState (Accessors)
|
||||
|
@ -103,3 +75,8 @@
|
|||
- (OPGStateRef) OPGState;
|
||||
- (void) setOPGState: (OPGStateRef) opGState;
|
||||
@end
|
||||
|
||||
@interface OpalGState (NonrequiredMethods)
|
||||
- (void) DPSgsave;
|
||||
- (void) DPSgrestore;
|
||||
@end
|
||||
|
|
|
@ -30,9 +30,15 @@
|
|||
#import "opal/OpalFontEnumerator.h"
|
||||
#import "opal/OpalSurface.h"
|
||||
#import "opal/OpalGState.h"
|
||||
#include "config.h"
|
||||
|
||||
#define OGSTATE ((OpalGState *)gstate)
|
||||
|
||||
#if BUILD_SERVER == SERVER_x11
|
||||
# include "x11/XGServerWindow.h"
|
||||
# include "x11/XWindowBuffer.h"
|
||||
#endif
|
||||
|
||||
@implementation OpalContext
|
||||
|
||||
+ (void) initializeBackend
|
||||
|
@ -63,6 +69,11 @@
|
|||
[surface release];
|
||||
}
|
||||
|
||||
- (BOOL) supportsDrawGState
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL) isDrawingToScreen
|
||||
{
|
||||
#warning isDrawingToScreen returning NO to fix DPSimage
|
||||
|
@ -71,7 +82,9 @@
|
|||
// NOTE: This was returning NO because it was not looking at the
|
||||
// return value of GSCurrentSurface. Now it returns YES, which
|
||||
// seems to have broken image drawing (yellow rectangles are drawn instead)
|
||||
OpalSurface *surface = [OGSTATE GSCurrentSurface: NULL : NULL : NULL];
|
||||
OpalSurface *surface;
|
||||
|
||||
[OGSTATE GSCurrentSurface: &surface : NULL : NULL];
|
||||
|
||||
return [surface isDrawingToScreen];
|
||||
}
|
||||
|
@ -81,6 +94,7 @@
|
|||
[OGSTATE DPSgsave];
|
||||
[super DPSgsave];
|
||||
}
|
||||
|
||||
- (void) DPSgrestore
|
||||
{
|
||||
[super DPSgrestore];
|
||||
|
@ -107,11 +121,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (BOOL) supportsDrawGState
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
/**
|
||||
This handles 'expose' event notifications that arrive from
|
||||
X11.
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue