Merge back with main branch

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@35813 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2012-11-21 20:53:22 +00:00
parent f018376f12
commit aae0f7748c
14 changed files with 312 additions and 47 deletions

View file

@ -108,6 +108,13 @@
return YES;
}
- (BOOL) isDrawingToScreen
{
CairoSurface *surface = nil;
[CGSTATE GSCurrentSurface: &surface : NULL : NULL];
return [surface isDrawingToScreen];
}
- (void) flushGraphics
{
// FIXME: Why is this here? When is it called?
@ -292,3 +299,5 @@
@end
#undef _CAIRO_SURFACE_CLASSNAME
#undef _CAIRO_GSTATE_CLASSNAME

View file

@ -212,33 +212,71 @@ static NSArray *faFromFc(FcPattern *pat)
- (NSString *) defaultSystemFontName
{
if ([allFontNames containsObject: @"Bitstream Vera Sans"])
return @"Bitstream Vera Sans";
{
return @"Bitstream Vera Sans";
}
if ([allFontNames containsObject: @"FreeSans"])
return @"FreeSans";
{
return @"FreeSans";
}
if ([allFontNames containsObject: @"DejaVu Sans"])
return @"DejaVu Sans";
{
return @"DejaVu Sans";
}
if ([allFontNames containsObject: @"Tahoma"])
{
return @"Tahoma";
}
if ([allFontNames containsObject: @"Arial"])
{
return @"Arial";
}
return @"Helvetica";
}
- (NSString *) defaultBoldSystemFontName
{
if ([allFontNames containsObject: @"Bitstream Vera Sans-Bold"])
return @"Bitstream Vera Sans-Bold";
{
return @"Bitstream Vera Sans-Bold";
}
if ([allFontNames containsObject: @"FreeSans-Bold"])
return @"FreeSans-Bold";
{
return @"FreeSans-Bold";
}
if ([allFontNames containsObject: @"DejaVu Sans-Bold"])
return @"DejaVu Sans-Bold";
{
return @"DejaVu Sans-Bold";
}
if ([allFontNames containsObject: @"Tahoma-Bold"])
{
return @"Tahoma-Bold";
}
if ([allFontNames containsObject: @"Arial-Bold"])
{
return @"Arial-Bold";
}
return @"Helvetica-Bold";
}
- (NSString *) defaultFixedPitchFontName
{
if ([allFontNames containsObject: @"Bitstream Vera Sans Mono"])
return @"Bitstream Vera Sans Mono";
{
return @"Bitstream Vera Sans Mono";
}
if ([allFontNames containsObject: @"FreeMono"])
return @"FreeMono";
{
return @"FreeMono";
}
if ([allFontNames containsObject: @"DejaVu Sans Mono"])
return @"DejaVu Sans Mono";
{
return @"DejaVu Sans Mono";
}
if ([allFontNames containsObject: @"Courier New"])
{
return @"Courier New";
}
return @"Courier";
}

View file

@ -1260,7 +1260,7 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
cairo_pattern_t *cpattern;
cairo_matrix_t source_matrix;
NSDebugLLog(@"CairoGState", @"%s:self: %@\n", __PRETTY_FUNCTION__, self);
NSDebugMLLog(@"CairoGState", @"%self: %@\n", self);
if (!_ct || !source->_ct)
{
@ -1384,10 +1384,10 @@ doesn't support to use the receiver cairo target as the source. */
cairo_matrix_t local_matrix;
cairo_matrix_t source_matrix;
NSDebugLLog(@"CairoGState", @"%s - source: %@ fromRect: %@ toPoint: %@\n", __PRETTY_FUNCTION__,
source,
NSStringFromRect(aRect),
NSStringFromPoint(aPoint));
NSDebugMLLog(@"CairoGState", @"source: %@ fromRect: %@ toPoint: %@\n",
source,
NSStringFromRect(aRect),
NSStringFromPoint(aPoint));
if (!_ct || !source->_ct)
{

View file

@ -58,6 +58,11 @@
cairo_pdf_surface_set_size(_surface, size.width, size.height);
}
- (BOOL) isDrawingToScreen
{
return NO;
}
- (void) writeComment: (NSString *)comment
{
}

View file

@ -62,4 +62,9 @@
cairo_ps_surface_dsc_comment(_surface, [comment UTF8String]);
}
- (BOOL) isDrawingToScreen
{
return NO;
}
@end

View file

@ -69,4 +69,9 @@
{
}
- (BOOL) isDrawingToScreen
{
return YES;
}
@end