4
* Copyright (C) 2003 Free Software Foundation, Inc.
6
* Written by Banlu Kemiyatorn <object at gmail dot com>
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Library General Public
9
* License as published by the Free Software Foundation; either
10
* version 2 of the License, or (at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Library General Public License for more details.
17
* You should have received a copy of the GNU Library General Public
18
* License along with this library; if not, write to the Free
19
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
22
#include <AppKit/NSBezierPath.h>
23
#include <AppKit/NSColor.h>
24
#include <AppKit/NSGraphics.h>
25
#include "cairo/CairoGState.h"
26
#include "cairo/CairoFontInfo.h"
27
#include "cairo/CairoSurface.h"
28
#include "cairo/CairoContext.h"
29
#include "NSBezierPathCairo.h"
32
#define FIXME() NSLog(@":::FIXME::: %@ %s", [self description], sel_get_name(_cmd))
34
static cairo_matrix_t *local_matrix;
36
/* Be warned that CairoGState didn't derived GSGState */
37
@implementation CairoGState
41
if (self == [CairoGState class])
43
local_matrix = cairo_matrix_create();
47
- (void) forwardInvocation: (NSInvocation *)anInvocation
49
/* only for trapping any unknown message. */
50
NSLog (@":::UNKNOWN::: %@ %@", self, anInvocation);
54
- (id) copyWithZone: (NSZone *)zone
56
CairoGState *copy = (CairoGState *)NSCopyObject(self, 0, zone);
58
copy->_ct = cairo_create();
59
cairo_copy(copy->_ct, _ct);
61
NSLog(@"copy state %p(%p) to %p(%p)",self,
62
cairo_current_target_surface(_ct),
64
cairo_current_target_surface(copy->_ct)
76
[self DPSinitgraphics];
80
- (id) initWithDrawContext: (CairoContext *)drawContext
82
//NSLog (@"CairoGState initWithDrawContext:%@", drawContext);
90
//NSLog(@"destate %p",self);
99
_flipCairoSurfaceMatrix(cairo_t *ct, CairoSurface *surface)
101
cairo_matrix_set_identity(local_matrix);
102
cairo_matrix_scale(local_matrix, 1, -1);
106
cairo_matrix_translate(local_matrix, 0, -[surface size].height);
108
cairo_set_matrix(ct, local_matrix);
111
- (void) setOffset: (NSPoint)theOffset
121
- (void) GSCurrentDevice: (void **)device: (int *)x : (int *)y
131
*device = _surface->gsDevice;
136
NSLog(@":::FIXME::: surface isn't set. %@ %s", [self description],
142
- (void) GSSetDevice: (void *)device : (int)x : (int)y
144
CairoInfo cairo_info;
146
ASSIGN(_surface, [CairoSurface surfaceForDevice: device depthInfo: &cairo_info]);
147
_offset = NSMakePoint(x, y);
149
NSLog(@"before: surface %p on state %p",
150
cairo_current_target_surface(_ct), self);
152
[_surface setAsTargetOfCairo: _ct];
153
_flipCairoSurfaceMatrix(_ct, _surface);
155
NSLog(@"after: surface %p on state %p %@",
156
cairo_current_target_surface (_ct), self,
157
NSStringFromSize([_surface size]));
163
@implementation CairoGState (Ops)
167
- (void) DPScurrentalpha: (float *)a
169
*a = cairo_current_alpha(_ct);
172
- (void) DPScurrentcmykcolor: (float *)c : (float *)m : (float *)y :(float *)k
176
cairo_current_rgb_color(_ct, &color[0], &color[1], &color[2]);
183
- (void) DPScurrentgray: (float *)gray
187
cairo_current_rgb_color(_ct, &dr, &dg, &db);
188
*gray = (dr + dg + db) / 3.0;
191
- (void) DPScurrenthsbcolor: (float *)h : (float *)s : (float *)b
197
cairo_current_rgb_color(_ct, &dr, &dg, &db);
198
color = [NSColor colorWithCalibratedRed: dr
208
- (void) DPScurrentrgbcolor: (float *)r : (float *)g : (float *)b
212
cairo_current_rgb_color(_ct, &dr, &dg, &db);
218
- (void) DPSsetalpha: (float)a
220
cairo_set_alpha(_ct, a);
223
- (void) DPSsetcmykcolor: (float)c : (float)m : (float)y : (float)k
230
cairo_set_rgb_color(_ct, r, g, b);
233
- (void) DPSsetgray: (float)gray
235
cairo_set_rgb_color(_ct, gray, gray, gray);
238
- (void) DPSsethsbcolor: (float)h : (float)s : (float)b
241
float red, green, blue, alpha;
243
color = [NSColor colorWithCalibratedHue: h
251
[self DPSsetrgbcolor: red : green : blue];
254
- (void) DPSsetrgbcolor: (float)r : (float)g: (float)b
256
cairo_set_rgb_color(_ct, r, g, b);
259
- (void) GSSetFillColorspace: (void *)spaceref
264
- (void) GSSetStrokeColorspace: (void *)spaceref
269
- (void) GSSetFillColor: (const float *)values
274
- (void) GSSetStrokeColor: (const float *)values
283
- (void) DPSashow: (float)x : (float)y : (const char *)s
288
- (void) DPSawidthshow: (float)cx : (float)cy : (int)c : (float)ax
289
: (float)ay : (const char *)s
294
- (void) DPScharpath: (const char *)s : (int)b
296
char *c = malloc(b + 1);
301
cairo_text_path(_ct, c);
305
- (void) DPSshow: (const char *)s
307
cairo_show_text(_ct, s);
310
- (void) DPSwidthshow: (float)x : (float)y : (int)c : (const char *)s
315
- (void) DPSxshow: (const char *)s : (const float *)numarray : (int)size
320
- (void) DPSxyshow: (const char *)s : (const float *)numarray : (int)size
325
- (void) DPSyshow: (const char *)s : (const float *)numarray : (int)size
330
- (void) GSSetCharacterSpacing: (float)extra
335
- (void) GSSetFont: (GSFontInfo *)fontref
337
if (_font == fontref)
342
ASSIGN(_font, fontref);
343
cairo_set_font(_ct, ((CairoFontInfo *)_font)->xrFont);
346
- (void) GSSetFontSize: (float)size
351
- (NSAffineTransform *) GSGetTextCTM
353
return [self GSCurrentCTM];
356
- (NSPoint) GSGetTextPosition
360
[self DPScurrentpoint: &x : &y];
361
return NSMakePoint(x, y);
364
- (void) GSSetTextCTM: (NSAffineTransform *)ctm
366
[self GSSetCTM: ctm];
369
- (void) GSSetTextDrawingMode: (GSTextDrawingMode)mode
374
- (void) GSSetTextPosition: (NSPoint)loc
379
- (void) GSShowText: (const char *)string : (size_t)length
384
- (void) GSShowGlyphs: (const NSGlyph *)glyphs : (size_t)length
388
cairo_current_point(_ct, &dx, &dy);
390
[_font drawGlyphs: glyphs
401
- (void) DPSinitgraphics
409
_ct = cairo_create();
410
/* Cairo's default line width is 2.0 */
411
_flipCairoSurfaceMatrix(_ct, _surface);
412
//NSLog(@"in flip %p (%p)", self, cairo_current_target_surface(_ct));
413
cairo_set_line_width(_ct, 1.0);
416
- (void) DPScurrentflat: (float *)flatness
418
*flatness = cairo_current_tolerance(_ct);
421
- (void) DPScurrentlinecap: (int *)linecap
425
lc = cairo_current_line_cap(_ct);
430
case CAIRO_LINE_CAP_BUTT:
433
case CAIRO_LINE_CAP_ROUND:
436
case CAIRO_LINE_CAP_SQUARE:
440
NSLog(@"ERROR Line cap unknown");
446
- (void) DPScurrentlinejoin: (int *)linejoin
448
cairo_line_join_t lj;
450
lj = cairo_current_line_join(_ct);
455
case CAIRO_LINE_JOIN_MITER:
458
case CAIRO_LINE_JOIN_ROUND:
461
case CAIRO_LINE_JOIN_BEVEL:
465
NSLog(@"ERROR Line join unknown");
471
- (void) DPScurrentlinewidth: (float *)width
473
*width = cairo_current_line_width(_ct);
476
- (void) DPScurrentmiterlimit: (float *)limit
478
*limit = cairo_current_miter_limit(_ct);
481
- (void) DPScurrentpoint: (float *)x : (float *)y
485
cairo_current_point(_ct, &dx, &dy);
490
- (void) DPScurrentstrokeadjust: (int *)b
495
- (void) DPSsetdash: (const float *)pat : (int)size : (float)offset
501
dpat = malloc(sizeof(double) * size);
507
cairo_set_dash(_ct, dpat, size, offset);
511
- (void) DPSsetflat: (float)flatness
513
cairo_set_tolerance(_ct, flatness);
516
- (void) DPSsetlinecap: (int)linecap
518
cairo_set_line_cap(_ct, (cairo_line_cap_t)linecap);
521
- (void) DPSsetlinejoin: (int)linejoin
523
cairo_set_line_join(_ct, (cairo_line_join_t)linejoin);
526
- (void) DPSsetlinewidth: (float)width
528
cairo_set_line_width(_ct, width);
531
- (void) DPSsetmiterlimit: (float)limit
533
cairo_set_miter_limit(_ct, limit);
536
- (void) DPSsetstrokeadjust: (int)b
545
- (void) DPSconcat: (const float *)m
547
cairo_matrix_set_affine(local_matrix, m[0], m[1], m[2], m[3], m[4], m[5]);
548
cairo_concat_matrix(_ct, local_matrix);
551
- (void) DPSinitmatrix
553
cairo_matrix_set_identity(local_matrix);
554
cairo_set_matrix(_ct, local_matrix);
555
_flipCairoSurfaceMatrix(_ct, _surface);
558
- (void) DPSrotate: (float)angle
560
cairo_rotate(_ct, angle);
563
- (void) DPSscale: (float)x : (float)y
565
cairo_scale(_ct, x, y);
568
- (void) DPStranslate: (float)x : (float)y
570
cairo_translate(_ct, x, y);
573
- (void) _flipCairoFont
575
cairo_matrix_set_identity(local_matrix);
576
cairo_matrix_scale(local_matrix, 1, -1);
577
cairo_transform_font(_ct, local_matrix);
582
_log_matrix(cairo_t * ct)
584
double da, db, dc, dd, dtx, dty;
586
cairo_current_matrix(ct, local_matrix);
587
cairo_matrix_get_affine(local_matrix, &da, &db, &dc, &dd, &dtx, &dty);
589
NSLog(@"%g %g %g %g %g %g", da, db, dc, dd, dtx, dty);
593
- (NSAffineTransform *) GSCurrentCTM
595
NSAffineTransform *transform;
596
NSAffineTransformStruct tstruct;
597
double da, db, dc, dd, dtx, dty;
599
transform = [NSAffineTransform transform];
600
cairo_current_matrix(_ct, local_matrix);
601
cairo_matrix_get_affine(local_matrix, &da, &db, &dc, &dd, &dtx, &dty);
608
[transform setTransformStruct:tstruct];
612
- (void) GSSetCTM: (NSAffineTransform *)ctm
614
NSAffineTransformStruct tstruct;
616
tstruct = [ctm transformStruct];
617
cairo_matrix_set_affine(local_matrix,
618
tstruct.m11, tstruct.m12,
619
tstruct.m21, tstruct.m22, tstruct.tX, tstruct.tY);
620
cairo_set_matrix(_ct, local_matrix);
623
- (void) GSConcatCTM: (NSAffineTransform *)ctm
625
NSAffineTransformStruct tstruct;
627
tstruct = [ctm transformStruct];
628
cairo_matrix_set_affine(local_matrix,
629
tstruct.m11, tstruct.m12,
630
tstruct.m21, tstruct.m22, tstruct.tX, tstruct.tY);
631
cairo_concat_matrix(_ct, local_matrix);
638
- (NSPoint) currentPoint
643
cairo_current_point(_ct, &dx, &dy);
644
return NSMakePoint(dx, dy);
647
- (void) DPSarc: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2
649
//NSLog(@"%g %g", angle1, angle2);
650
cairo_arc(_ct, x, y, r, angle1 * M_PI / 180, angle2 * M_PI / 180);
653
- (void) DPSarcn: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2
655
cairo_arc_negative(_ct, x, y, r, angle1 * M_PI / 180, angle2 * M_PI / 180);
658
- (void) DPSarct: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r
662
cairo_arc_to(_ct, x1, y1, x2, y2, r);
665
NSBezierPath *newPath;
667
newPath = [[NSBezierPath alloc] init];
668
if ((path != nil) && ([path elementCount] != 0))
670
[newPath lineToPoint: [self currentPoint]];
672
[newPath appendBezierPathWithArcFromPoint: NSMakePoint(x1, y1)
673
toPoint: NSMakePoint(x2, y2)
675
[newPath transformUsingAffineTransform: ctm];
677
[path appendBezierPath: newPath];
687
- (void) DPSclosepath
689
cairo_close_path(_ct);
692
- (void) DPScurveto: (float)x1 : (float)y1 : (float)x2
693
: (float)y2 : (float)x3 : (float)y3
695
cairo_curve_to(_ct, x1, y1, x2, y2, x3, y3);
700
cairo_set_fill_rule(_ct, CAIRO_FILL_RULE_EVEN_ODD);
702
cairo_set_fill_rule(_ct, CAIRO_FILL_RULE_WINDING);
708
cairo_set_fill_rule(_ct, CAIRO_FILL_RULE_EVEN_ODD);
710
cairo_set_fill_rule(_ct, CAIRO_FILL_RULE_WINDING);
719
_c2cmoveto(void *cl, double x, double y)
721
cairo_t *ct = (cairo_t *)cl;
722
cairo_move_to(ct, x, y);
726
_c2clineto(void *cl, double x, double y)
728
cairo_t *ct = (cairo_t *)cl;
729
cairo_line_to(ct, x, y);
733
_c2cclosepath(void *cl)
735
cairo_t *ct = (cairo_t *)cl;
736
cairo_close_path(ct);
739
- (void) DPSflattenpath
741
/* recheck this in plrm */
742
cairo_t *fct = cairo_create();
744
cairo_copy(fct, _ct);
746
cairo_current_path_flat(fct, _c2cmoveto, _c2clineto, _c2cclosepath, _ct);
752
cairo_init_clip(_ct);
755
- (void) DPSlineto: (float)x : (float)y
757
cairo_line_to(_ct, x, y);
760
- (void) DPSmoveto: (float)x : (float)y
762
cairo_move_to(_ct, x, y);
770
- (void) DPSpathbbox: (float *)llx : (float *)lly : (float *)urx : (float *)ury
772
NSBezierPath *path = [NSBezierPath bezierPathFromCairo: _ct];
773
NSRect rect = [path controlPointBounds];
785
- (void) DPSrcurveto: (float)x1 : (float)y1 : (float)x2
786
: (float)y2 : (float)x3 : (float)y3
788
cairo_rel_curve_to(_ct, x1, y1, x2, y2, x3, y3);
791
- (void) DPSrectclip: (float)x : (float)y : (float)w : (float)h
794
cairo_move_to(_ct, x, y);
795
cairo_rel_line_to(_ct, w, 0);
796
cairo_rel_line_to(_ct, 0, h);
797
cairo_rel_line_to(_ct, -w, 0);
798
cairo_close_path(_ct);
803
- (void) DPSrectfill: (float)x : (float)y : (float)w : (float)h
807
cairo_move_to(_ct, x, y);
808
cairo_rel_line_to(_ct, w, 0);
809
cairo_rel_line_to(_ct, 0, h);
810
cairo_rel_line_to(_ct, -w, 0);
811
cairo_close_path(_ct);
816
- (void) DPSrectstroke: (float)x : (float)y : (float)w : (float)h
820
cairo_move_to(_ct, x, y);
821
cairo_rel_line_to(_ct, w, 0);
822
cairo_rel_line_to(_ct, 0, h);
823
cairo_rel_line_to(_ct, -w, 0);
824
cairo_close_path(_ct);
829
- (void) DPSreversepath
831
NSBezierPath *path = [NSBezierPath bezierPathFromCairo: _ct];
833
path = [path bezierPathByReversingPath];
835
[path appendBezierPathToCairo: _ct];
838
- (void) DPSrlineto: (float)x : (float)y
840
cairo_rel_line_to(_ct, x, y);
843
- (void) DPSrmoveto: (float)x : (float)y
845
cairo_rel_move_to(_ct, x, y);
853
- (void) GSSendBezierPath: (NSBezierPath *)path
856
[path appendBezierPathToCairo: _ct];
859
- (void) GSRectClipList: (const NSRect *)rects : (int)count
868
The specification is not clear if the union of the rects
869
should produce the new clip rect or if the outline of all rects
870
should be used as clip path.
872
union_rect = rects[0];
873
for (i = 1; i < count; i++)
874
union_rect = NSUnionRect(union_rect, rects[i]);
876
[self DPSrectclip: NSMinX(union_rect) : NSMinY(union_rect)
877
: NSWidth(union_rect) : NSHeight(union_rect)];
880
- (void) GSRectFillList: (const NSRect *)rects : (int)count
884
for (i = 0; i < count; i++)
886
[self DPSrectfill: NSMinX(rects[i]) : NSMinY(rects[i])
887
: NSWidth(rects[i]) : NSHeight(rects[i])];
893
_opName(NSCompositingOperation op)
897
case NSCompositeClear:
898
return @"NSCompositeClear";
900
case NSCompositeCopy:
901
return @"NSCompositeCopy";
903
case NSCompositeSourceOver:
904
return @"NSCompositeSourceOver";
906
case NSCompositeSourceIn:
907
return @"NSCompositeSourceIn";
909
case NSCompositeSourceOut:
910
return @"NSCompositeSourceOut";
912
case NSCompositeSourceAtop:
913
return @"NSCompositeSourceAtop";
915
case NSCompositeDestinationOver:
916
return @"NSCompositeDestinationOver";
918
case NSCompositeDestinationIn:
919
return @"NSCompositeDestinationIn";
921
case NSCompositeDestinationOut:
922
return @"NSCompositeDestinationOut";
924
case NSCompositeDestinationAtop:
925
return @"NSCompositeDestinationAtop";
928
return @"NSCompositeXOR";
930
case NSCompositePlusDarker:
931
return @"NSCompositePlusDarker";
933
case NSCompositeHighlight:
934
return @"NSCompositeHighlight";
936
case NSCompositePlusLighter:
937
return @"NSCompositePlusLighter";
947
_set_op(cairo_t * ct, NSCompositingOperation op)
951
case NSCompositeClear:
952
cairo_set_operator(ct, CAIRO_OPERATOR_CLEAR);
954
case NSCompositeCopy:
955
cairo_set_operator(ct, CAIRO_OPERATOR_SRC);
957
case NSCompositeSourceOver:
958
cairo_set_operator(ct, CAIRO_OPERATOR_OVER);
960
case NSCompositeSourceIn:
961
cairo_set_operator(ct, CAIRO_OPERATOR_IN);
963
case NSCompositeSourceOut:
964
cairo_set_operator(ct, CAIRO_OPERATOR_OUT);
966
case NSCompositeSourceAtop:
967
cairo_set_operator(ct, CAIRO_OPERATOR_ATOP);
969
case NSCompositeDestinationOver:
970
cairo_set_operator(ct, CAIRO_OPERATOR_OVER_REVERSE);
972
case NSCompositeDestinationIn:
973
cairo_set_operator(ct, CAIRO_OPERATOR_IN_REVERSE);
975
case NSCompositeDestinationOut:
976
cairo_set_operator(ct, CAIRO_OPERATOR_OUT_REVERSE);
978
case NSCompositeDestinationAtop:
979
cairo_set_operator(ct, CAIRO_OPERATOR_ATOP_REVERSE);
982
cairo_set_operator(ct, CAIRO_OPERATOR_XOR);
984
case NSCompositePlusDarker:
986
case NSCompositeHighlight:
987
cairo_set_operator(ct, CAIRO_OPERATOR_SATURATE);
989
case NSCompositePlusLighter:
990
cairo_set_operator(ct, CAIRO_OPERATOR_ADD);
993
cairo_set_operator(ct, CAIRO_OPERATOR_SRC);
997
- (void) DPSimage: (NSAffineTransform *)matrix : (int)pixelsWide
998
: (int)pixelsHigh : (int)bitsPerSample
999
: (int)samplesPerPixel : (int)bitsPerPixel
1000
: (int)bytesPerRow : (BOOL)isPlanar
1001
: (BOOL)hasAlpha : (NSString *)colorSpaceName
1002
: (const unsigned char *const[5])data
1004
cairo_format_t format;
1005
NSAffineTransformStruct tstruct;
1007
cairo_surface_t *surface;
1010
NSLog(@"%@ DPSimage %dx%d (%p)", self, pixelsWide, pixelsHigh,
1011
cairo_current_target_surface (_ct));
1013
if (isPlanar || !([colorSpaceName isEqualToString: NSDeviceRGBColorSpace] ||
1014
[colorSpaceName isEqualToString: NSCalibratedRGBColorSpace]))
1016
NSLog(@"Image format not support");
1020
switch (bitsPerSample * samplesPerPixel)
1023
format = CAIRO_FORMAT_ARGB32;
1026
format = CAIRO_FORMAT_RGB24;
1029
NSLog(@"Image format not support");
1032
// [self DPSinitclip];
1034
tstruct = [matrix transformStruct];
1036
NSLog(@"%g %g %g %g %g %g",
1037
tstruct.m11, tstruct.m12,
1038
tstruct.m21, tstruct.m22,
1039
tstruct.tX, tstruct.tY);
1042
ict = cairo_create();
1043
[_surface setAsTargetOfCairo: ict];
1044
_flipCairoSurfaceMatrix(ict, _surface);
1045
cairo_matrix_set_affine(local_matrix,
1046
tstruct.m11, tstruct.m12,
1047
tstruct.m21, tstruct.m22, tstruct.tX, tstruct.tY);
1048
cairo_concat_matrix(ict, local_matrix);
1050
surface = cairo_surface_create_for_image((void*)data,
1055
cairo_matrix_set_identity(local_matrix);
1056
cairo_matrix_scale(local_matrix, 1, -1);
1057
cairo_matrix_translate(local_matrix, 0, -pixelsHigh);
1058
cairo_surface_set_matrix(surface, local_matrix);
1059
cairo_show_surface(ict,
1063
cairo_surface_destroy(surface);
1067
- (void) compositerect: (NSRect)aRect op: (NSCompositingOperation)op
1070
cairo_rectangle(_ct, NSMinX(aRect), NSMinY(aRect), NSWidth(aRect),
1075
- (void) compositeGState: (CairoGState *)source
1076
fromRect: (NSRect)aRect
1077
toPoint: (NSPoint)aPoint
1078
op: (NSCompositingOperation)op
1079
fraction: (float)delta
1081
cairo_surface_t *src;
1084
NSLog(NSStringFromRect(aRect));
1085
NSLog(@"src %p(%p,%@) des %p(%p,%@)",source,cairo_current_target_surface(source->_ct),NSStringFromSize([source->_surface size]),
1086
self,cairo_current_target_surface(_ct),NSStringFromSize([_surface size]));
1090
cairo_set_alpha(_ct, delta);
1091
cairo_translate(_ct, aPoint.x, aPoint.y);
1093
cairo_matrix_set_identity(local_matrix);
1094
cairo_matrix_scale(local_matrix, 1, -1);
1095
cairo_matrix_translate(local_matrix, 0, -[source->_surface size].height);
1096
// cairo_matrix_translate(local_matrix, NSMinX(aRect), NSMinY(aRect));
1097
src = cairo_current_target_surface(source->_ct);
1098
cairo_surface_set_matrix(src, local_matrix);
1099
cairo_show_surface(_ct, src, NSWidth(aRect), NSHeight(aRect));
1103
- (void) compositeGState: (CairoGState *)source
1104
fromRect: (NSRect)aRect
1105
toPoint: (NSPoint)aPoint
1106
op: (NSCompositingOperation)op
1108
[self compositeGState: source
1115
- (void) dissolveGState: (CairoGState *)source
1116
fromRect: (NSRect)aRect
1117
toPoint: (NSPoint)aPoint
1120
[self compositeGState: source
1123
op: NSCompositeSourceOver