HarmonyOS NODE_LINEAR_GRADIENT设置问题
NODE_LINEAR_GRADIENT属性文档如下,但object格式描述不清晰,麻烦提供一下示例。
/**
* @brief Sets the gradient attribute, which can be set, reset, and obtained as required through APIs.
*
* Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n
* .value[0].f32: start angle of the linear gradient. A positive value indicates a clockwise rotation from the
* origin, (0, 0). The default value is <b>180</b>. \n
* .value[1].i32: direction of the linear gradient. It does not take effect when <b>angle</b> is set.
* The parameter type is {@link ArkUI_LinearGradientDirection}: \n
* .value[2].i32: whether the colors are repeated. The default value is <b>false</b>. \n
* .object: array of color stops, each of which consists of a color and its stop position.
* Invalid colors are automatically skipped. \n
* colors: colors of the color stops. \n
* stops: stop positions of the color stops. \n
* size: number of colors. \n
* \n
* Format of the return value {@link ArkUI_AttributeItem}: \n
* .value[0].f32: start angle of the linear gradient. \n
* .value[1].i32: direction of the linear gradient. It does not take effect when <b>angle</b> is set. \n
* .value[0].i32: whether the colors are repeated. \n
* .object: array of color stops, each of which consists of a color and its stop position.
* Invalid colors are automatically skipped. \n
* colors: colors of the color stops. \n
* stops: stop positions of the color stops. \n
* size: number of colors. \n
*
*/
NODE_LINEAR_GRADIENT,
HarmonyOS
赞
收藏 0
回答 1
待解决
相关问题
linear-gradient设置颜色的起止位置
1430浏览 • 1回复 待解决
linear-gradient不支持start,end属性
1534浏览 • 1回复 待解决
HarmonyOS capi阴影样式(NODE_CUSTOM_SHADOW)设置不生效
693浏览 • 1回复 待解决
HarmonyOS capi image node的source无法设置为rawfile的文件
585浏览 • 1回复 待解决
3516下载提示node.lib问题
9683浏览 • 2回复 已解决
#鸿蒙通关秘籍#如何运用Linear Containers的动态扩容特性?
889浏览 • 1回复 待解决
HarmonyOS ArkUI C API使用NODE_BACKGROUND_IMAGE设置背景图无效果
950浏览 • 1回复 待解决
HarmonyOS ArkUI-C中Swiper如何实现SwiperDisplayMode.AUTO_LINEAR的显示效果
921浏览 • 1回复 待解决
k8s 在加入新 node 后的 pod 调度问题
2961浏览 • 1回复 待解决
HarmonyOS ArkUI CAPI的setAttribute设置Node组件属性缺少使用说明文档
866浏览 • 1回复 待解决
关于node和mysql并发处理的小问题有知道的吗?
3505浏览 • 1回复 待解决
HarmonyOS 阴影设置问题
1383浏览 • 1回复 待解决
HarmonyOS ArkUI有哪些类型的Node?
1115浏览 • 1回复 待解决
kubectl get node修改name
3190浏览 • 0回复 待解决
HarmonyOS 设置横竖屏问题
824浏览 • 1回复 待解决
HarmonyOS 设置屏幕亮度问题
2424浏览 • 1回复 待解决
HarmonyOS page设置全屏问题
1031浏览 • 1回复 待解决
HarmonyOS Flex 布局设置问题
1759浏览 • 1回复 待解决
HarmonyOS 启动页设置问题
1715浏览 • 1回复 待解决
HarmonyOS 启动图设置问题
1179浏览 • 1回复 待解决
HarmonyOS @ohos/node-polyfill crypto加密报错
807浏览 • 1回复 待解决
HarmonyOS 横竖屏设置问题
755浏览 • 1回复 待解决
Task assembleHap not found in hvigor node: entry
3458浏览 • 1回复 待解决
HarmonyOS Swiper组件在displayMode的AUTO_LINEAR被废弃之后如何实现原来的效果
671浏览 • 1回复 待解决
可以参考NODE_RADIAL_GRADIENT的方式:
对于Linear的场景,可以根据需要调整value的值。