径向渐变
使用收藏夹整理内容 根据您的喜好保存和分类内容。
从中心点向外辐射,两个颜色之间渐变过渡。
语法
<RadialGradient centerX="float" centerY="float" radius="float"
colors="argb-color argb-color" positions="float float" />
属性
RadialGradient 元素必须包含以下属性
centerX
半径中心的 x 坐标。
此属性是 可转换的。
centerY
半径中心的 y 坐标。
此属性是 可转换的。
radius
必须为正数。此渐变圆形的半径。
此属性是 可转换的。
colors
用空格分隔的颜色列表。您必须使用 ARGB 格式 (#ff000000 = 不透明黑色) 或 RGB 格式 (#000000 = 黑色) 指定每个颜色。
positions
用空格分隔的浮点数列表。colors 属性中每个对应颜色的相对位置 [0..1]。如果此字符串为空,则颜色将沿渐变线均匀分布。
内部元素
RadialGradient 元素可以包含 0 到 4 个 Transform 元素。
推荐内容
此页面上的内容和代码示例受 内容许可 中描述的许可证约束。Java 和 OpenJDK 是 Oracle 和/或其关联公司的商标或注册商标。
上次更新时间:2024-11-12 UTC。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的信息","missingTheInformationINeed","thumb-down"],["过于复杂/步骤过多","tooComplicatedTooManySteps","thumb-down"],["已过时","outOfDate","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新时间:2024-11-12 UTC."],[],[]]