Small cleanup of cairo backend.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@19902 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2004-08-23 12:28:16 +00:00
parent 402dcd1923
commit f338db7159
4 changed files with 29 additions and 29 deletions

View file

@ -1,3 +1,13 @@
2004-08-23 Fred Kiefer <FredKiefer@gmx.de>
* Source/cairo/CairoContext.m (-DPScurrentalpha:,
-DPSsetoffset::): Removed methods.
* Source/cairo/CairoGState.m (-offset, -setoffset:): Added methods.
(-forwardInvocation:): Improved output.
(-GSSetDevice:::) Commented out NSLog calls.
* Source/gsc/GSGState.m (-_showString:lenght:): Removed this
method which was a left over from last patch.
2004-08-09 14:38 Alexander Malmberg <alexander@malmberg.org>
* Source/win32/WIN32Server.m, Source/win32/WIN32ServerEvent.m,

View file

@ -104,11 +104,6 @@
return self;
}
- (void) DPSsetoffset: (short int)x : (short int)y
{
XRGSTATE->_offset = NSMakePoint(x, y);
}
- (void) flushGraphics
{
/* FIXME */
@ -145,9 +140,4 @@
[XRGSTATE GSSetDevice: device : x : y];
}
- (void) DPScurrentalpha: (float *)a
{
*a = cairo_current_alpha(XRGSTATE->_ct);
}
@end

View file

@ -31,7 +31,6 @@
#define NEEDS_CSMK() NSLog(@"Need CSMK %@ %s", [self description], sel_get_name(_cmd))
#define FIXME() NSLog(@":::FIXME::: %@ %s", [self description], sel_get_name(_cmd))
static cairo_matrix_t *local_matrix;
/* Be warned that CairoGState didn't derived GSGState */
@ -39,13 +38,16 @@ static cairo_matrix_t *local_matrix;
+ (void) initialize
{
local_matrix = cairo_matrix_create();
if (self == [CairoGState class])
{
local_matrix = cairo_matrix_create();
}
}
- (void) forwardInvocation: (NSInvocation *)anInvocation
{
/* only for trapping any unknown message. */
FIXME();
NSLog (@":::UNKNOWN::: %@ %@", self, anInvocation);
exit(1);
}
@ -106,6 +108,16 @@ _flipCairoSurfaceMatrix(cairo_t *ct, CairoSurface *surface)
cairo_set_matrix(ct, local_matrix);
}
- (void) setOffset: (NSPoint)theOffset
{
_offset = theOffset;
}
- (NSPoint) offset
{
return _offset;
}
- (void) GSCurrentDevice: (void **)device: (int *)x : (int *)y
{
if (x)
@ -133,22 +145,18 @@ _flipCairoSurfaceMatrix(cairo_t *ct, CairoSurface *surface)
ASSIGN(_surface, [CairoSurface surfaceForDevice: device depthInfo: &cairo_info]);
_offset = NSMakePoint(x, y);
/*
NSLog(@"before: surface %p on state %p",
cairo_current_target_surface(_ct), self);
*/
[_surface setAsTargetOfCairo: _ct];
_flipCairoSurfaceMatrix(_ct, _surface);
/*
NSLog(@"after: surface %p on state %p %@",
cairo_current_target_surface (_ct), self,
NSStringFromSize([_surface size]));
}
/* This shall be invoked by Context */
/*
-(void) _setSurface: (CairoSurface *)surface
{
ASSIGN(_surface, surface);
}
*/
}
@end

View file

@ -358,14 +358,6 @@
/* ----------------------------------------------------------------------- */
/* Text operations */
/* ----------------------------------------------------------------------- */
/* Show the first lenght characters from C string s at the current point
and return the width of the string. Does not move the point.
*/
- (float) _showString: (const char*)s lenght: (int)lenght
{
[self subclassResponsibility: _cmd];
return 0.0;
}
typedef enum {
show_delta, show_array_x, show_array_y, show_array_xy