如果改变顺序真的不是一个选项,一个可能的解决办法是播放颜色和混合模式,使下面的项目可见。
例如,如果您有一个黑色背景,然后是一个白色文本,然后是一个橙色圆圈,如果橙色圆圈有
screen
这是一个
sketch
演示解决方案。
// draw a black background so we can see white text
new Path.Rectangle({
from: [0, 0],
to: [200, 200],
fillColor: 'black'
});
// draw a white text
new PointText({
content: 'Your label here',
point: [100,80],
fontSize:20,
justification: 'center',
fillColor: 'white'
});
// draw a circle with screen blend mode
new Path.Circle({
center: [50,100],
radius: 50,
fillColor: 'orange',
blendMode: 'screen'
});
// draw a circle with normal blend mode
new Path.Circle({
center: [150,100],
radius: 50,
fillColor: 'orange',
blendMode: 'normal'
});
// draw instructions
new PointText({
content: 'Left circle has a screen blend mode so text is visible even if it is below it',
point: view.center + [0, -50],
justification: 'center'
});