File tree Expand file tree Collapse file tree 2 files changed +46
-60
lines changed
MPChartLib/src/main/java/com/github/mikephil/charting/model Expand file tree Collapse file tree 2 files changed +46
-60
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package com.github.mikephil.charting.model
2+
3+ import com.github.mikephil.charting.utils.Fill
4+
5+ @Deprecated(" Use `Fill` instead" )
6+ class GradientColor : Fill () {
7+ @get:Deprecated(" Use `Fill.getGradientColors()`" )
8+ @set:Deprecated(" Use `Fill.setGradientColors(...)`" )
9+ var startColor: Int
10+ get() = gradientColors[0 ]
11+ set(startColor) {
12+ if (gradientColors == null || gradientColors.size != 2 ) {
13+ setGradientColors(
14+ intArrayOf(
15+ startColor,
16+ if (gradientColors != null && gradientColors.size > 1 )
17+ gradientColors[1 ]
18+ else
19+ 0
20+ )
21+ )
22+ } else {
23+ gradientColors[0 ] = startColor
24+ }
25+ }
26+
27+ @get:Deprecated(" Use `Fill.getGradientColors()`" )
28+ @set:Deprecated(" Use `Fill.setGradientColors(...)`" )
29+ var endColor: Int
30+ get() = gradientColors[1 ]
31+ set(endColor) {
32+ if (gradientColors == null || gradientColors.size != 2 ) {
33+ setGradientColors(
34+ intArrayOf(
35+ if (gradientColors != null && gradientColors.size > 0 )
36+ gradientColors[0 ]
37+ else
38+ 0 ,
39+ endColor
40+ )
41+ )
42+ } else {
43+ gradientColors[1 ] = endColor
44+ }
45+ }
46+ }
You can’t perform that action at this time.
0 commit comments