fix text node shadow & gradient conflict

This commit is contained in:
王劲鹏
2022-11-03 15:00:29 +08:00
committed by osborn
parent 0a305b3104
commit 5782a0d161
3 changed files with 233 additions and 86 deletions

View File

@@ -7,6 +7,31 @@ class TextDemo extends Panel {
vlayout(
[
title("Text Demo"),
text({
text: '十万钻石场',
textSize: 60,
font: 'PingFangSC-Medium',
textAlignment: Gravity.Center,
shadow: {
color: Color.parse('#640000'),
opacity: 0.49,
radius: 0.5,
offsetX: 0,
offsetY: 1,
},
textColor: {
colors: [Color.parse('#FFFFFF'), Color.parse('#FFE6A5'), Color.parse('#FFE39B'), Color.parse('#FFF0CE')],
locations: [0.0, 0.7, 0.9, 1.0],
orientation: GradientOrientation.TOP_BOTTOM,
}
}).apply({
layoutConfig: {
widthSpec: LayoutSpec.FIT,
heightSpec: LayoutSpec.FIT,
margin: { top: 131 },
alignment: Gravity.CenterX,
}
}),
input({
width: 100,
height: 100,