Skip to content

Commit

Permalink
Added several more operators (color-dodge, color-burn, difference, etc)
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Mar 11, 2011
1 parent b63b4c8 commit f69958e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/CanvasRenderingContext2d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,24 @@ Context2d::SetGlobalCompositeOperation(Local<String> prop, Local<Value> val, con
cairo_set_operator(ctx, CAIRO_OPERATOR_HSL_COLOR);
} else if (0 == strcmp("hsl-luminosity", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_HSL_LUMINOSITY);
} else if (0 == strcmp("clear", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_CLEAR);
} else if (0 == strcmp("source", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_SOURCE);
} else if (0 == strcmp("dest", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_DEST);
} else if (0 == strcmp("saturate", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_SATURATE);
} else if (0 == strcmp("color-dodge", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_COLOR_DODGE);
} else if (0 == strcmp("color-burn", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_COLOR_BURN);
} else if (0 == strcmp("difference", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_DIFFERENCE);
} else if (0 == strcmp("exclusion", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_EXCLUSION);
} else if (0 == strcmp("over", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_OVER);
#endif
} else if (0 == strcmp("lighter", *type)) {
cairo_set_operator(ctx, CAIRO_OPERATOR_ADD);
Expand Down

0 comments on commit f69958e

Please sign in to comment.