Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

[[ Blend Modes ]] Support more blend modes #6759

Open
wants to merge 2 commits into
base: develop-9.0
Choose a base branch
Loading
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[[ Blend Modes ]] Support more blend modes in coregraphics compositor
  • Loading branch information
montegoulding committed Oct 25, 2018
commit 35b584889abe3a0b8fe8058cfa925839e4f11696
40 changes: 39 additions & 1 deletion 40 engine/src/tilecachecg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,45 @@ bool MCTileCacheCoreGraphicsCompositor_BeginLayer(void *p_context, const MCRecta
case GXblendExclusion:
t_blend_mode = kCGBlendModeExclusion;
break;
default:
case GXblendClear:
case GXclear:
t_blend_mode = kCGBlendModeClear;
break;
case GXblendSrc:
case GXblendSrcOver:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GXblendSrcOver / GXcopy are BlendModeNormal - i.e. SrcOver

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

case GXcopy:
t_blend_mode = kCGBlendModeCopy;
break;
case GXblendDst:
case GXblendDstOver:
t_blend_mode = kCGBlendModeDestinationOver;
break;
case GXblendSrcIn:
t_blend_mode = kCGBlendModeSourceIn;
break;
case GXblendDstIn:
t_blend_mode = kCGBlendModeDestinationIn;
break;
case GXblendSrcOut:
t_blend_mode = kCGBlendModeSourceOut;
break;
case GXblendDstOut:
t_blend_mode = kCGBlendModeDestinationOut;
break;
case GXblendSrcAtop:
t_blend_mode = kCGBlendModeSourceAtop;
break;
case GXblendDstAtop:
t_blend_mode = kCGBlendModeDestinationAtop;
break;
case GXblendXor:
case GXxor:
t_blend_mode = kCGBlendModeXOR;
break;
case GXblendPlus:
t_blend_mode = kCGBlendModePlusLighter;
break;
default:
t_blend_mode = kCGBlendModeNormal;
break;
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.