6 Star 4 Fork 0

HarmonyOS-TPC / polygonsview

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

polygonsview

模仿掌上英雄联盟能力分析效果

效果展示

依赖

方式一.Library引用

添加本工程中library模块到任意工程中,在需要使用的模块build.gradle中添加

implementation project(':library')

方式二

allprojects{
    repositories{
        mavenCentral()
    }
}
implementation 'io.openharmony.tpc.thirdlib:polygonsview:1.0.0'

流程

  1. 绘制中心线,用于计算外层多边形各点的坐标

  2. 绘制最外层多边形

  3. 分析原型图算出每个多边形之间的间距

  4. 绘制里三层多边形

  5. 绘制字体

  6. 根据进度值绘制等级进度


难点

关键在于坐标的计算(三角函数的运用,哈哈),与旋转角度的掌控。


Attributes

name format description
setStr String[] 设置提示字体(长度必须为7位,从中上开始顺时针方向)
setStrColor color 设置字体颜色
setOneColor color 设置最外层正多形颜色
setTwoColor color 设置第二层正多形颜色
setThreeColor color 设置第三层多边形颜色
setFourColor color 设置最内层多边形颜色
setCenterColor color 设置中心线颜色
setRankColor color 设置rank线颜色
setValue1 float(0~4) 设置rank值1 (从中上开始顺时针方向)
setValue2 float(0~4) 设置rank值2
setValue3 float(0~4) 设置rank值3
setValue4 float(0~4) 设置rank值4
setValue5 float(0~4) 设置rank值5
setValue6 float(0~4) 设置rank值6
setValue7 float(0~4) 设置rank值7

License

Copyright 2016 jiangzehui

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

空文件

简介

模仿掌上英雄联盟能力分析效果 展开 收起
Java
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/HarmonyOS-tpc/polygonsview.git
git@gitee.com:HarmonyOS-tpc/polygonsview.git
HarmonyOS-tpc
polygonsview
polygonsview
master

搜索帮助

14c37bed 8189591 565d56ea 8189591