wxr
2022-11-24 2af932533ef851bf983385244e9912976dbd4daa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.mm.android.deviceaddmodule.mobilecommon.widget.linechart.utils;
 
 
/**
 * 数据视图
 * ---------------------------
 * 约定:
 * left 必须小于 right
 * bottom 必须小于 top
 */
 
public class RectD {
 
    public double left;
    public double top;
    public double right;
    public double bottom;
 
    public RectD() {
    }
 
    public RectD(double left, double top, double right, double bottom) {
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;
    }
 
    public RectD(RectD rectD) {
        setRectD(rectD);
    }
 
    public void setRectD(RectD rectD) {
        left = rectD.left;
        top = rectD.top;
        right = rectD.right;
        bottom = rectD.bottom;
    }
 
    public double width() {
        return right - left;
    }
 
    public double height() {
        return top - bottom;
    }
 
 
    public String toString() {
        return "RectD(" + left + ", " + top + ", "
                + right + ", " + bottom + ")";
    }
}