lmw
2023-06-07 f9dd2cdac746d308d5c4bcfdbea389ab67a66b12
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
package com.yalantis.ucrop.model;
 
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
 
/**
 * @author:luck
 * @data:2017/05/30 晚上23:00
 * @描述: CutInfo
 */
public class CutInfo implements Parcelable {
    /**
     * File ID
     */
    private long id;
    /**
     * 原图
     */
    private String path;
    /**
     * 裁剪路径
     */
    private String cutPath;
    /**
     * Android Q特有地址
     */
    private String androidQToPath;
    /**
     * 裁剪比例
     */
    private int offsetX;
    /**
     * 裁剪比例
     */
    private int offsetY;
    /**
     * 图片宽
     */
    private int imageWidth;
    /**
     * 图片高
     */
    private int imageHeight;
    /**
     * 是否裁剪
     */
    private boolean isCut;
 
    /**
     * 资源类型
     */
    private String mimeType;
 
    private float resultAspectRatio;
 
    /**
     * 视频时长
     */
    private long duration;
 
    /**
     * 网络图片下载临时存放位置
     */
    private Uri httpOutUri;
 
    public CutInfo() {
    }
 
    public CutInfo(String path, boolean isCut) {
        this.path = path;
        this.isCut = isCut;
    }
 
    public String getPath() {
        return path;
    }
 
    public void setPath(String path) {
        this.path = path;
    }
 
    public String getCutPath() {
        return cutPath;
    }
 
    public void setCutPath(String cutPath) {
        this.cutPath = cutPath;
    }
 
    public int getOffsetX() {
        return offsetX;
    }
 
    public void setOffsetX(int offsetX) {
        this.offsetX = offsetX;
    }
 
    public int getOffsetY() {
        return offsetY;
    }
 
    public void setOffsetY(int offsetY) {
        this.offsetY = offsetY;
    }
 
    public int getImageWidth() {
        return imageWidth;
    }
 
    public void setImageWidth(int imageWidth) {
        this.imageWidth = imageWidth;
    }
 
    public int getImageHeight() {
        return imageHeight;
    }
 
    public void setImageHeight(int imageHeight) {
        this.imageHeight = imageHeight;
    }
 
    public float getResultAspectRatio() {
        return resultAspectRatio;
    }
 
    public void setResultAspectRatio(float resultAspectRatio) {
        this.resultAspectRatio = resultAspectRatio;
    }
 
    public String getMimeType() {
        return mimeType;
    }
 
    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }
 
    public boolean isCut() {
        return isCut;
    }
 
    public void setCut(boolean cut) {
        isCut = cut;
    }
 
    public String getAndroidQToPath() {
        return androidQToPath;
    }
 
    public void setAndroidQToPath(String androidQToPath) {
        this.androidQToPath = androidQToPath;
    }
 
    public long getId() {
        return id;
    }
 
    public void setId(long id) {
        this.id = id;
    }
 
    public Uri getHttpOutUri() {
        return httpOutUri;
    }
 
    public void setHttpOutUri(Uri httpOutUri) {
        this.httpOutUri = httpOutUri;
    }
 
 
    public long getDuration() {
        return duration;
    }
 
    public void setDuration(long duration) {
        this.duration = duration;
    }
 
    @Override
    public int describeContents() {
        return 0;
    }
 
    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.id);
        dest.writeString(this.path);
        dest.writeString(this.cutPath);
        dest.writeString(this.androidQToPath);
        dest.writeInt(this.offsetX);
        dest.writeInt(this.offsetY);
        dest.writeInt(this.imageWidth);
        dest.writeInt(this.imageHeight);
        dest.writeByte(this.isCut ? (byte) 1 : (byte) 0);
        dest.writeString(this.mimeType);
        dest.writeFloat(this.resultAspectRatio);
        dest.writeLong(this.duration);
        dest.writeParcelable(this.httpOutUri, flags);
    }
 
    protected CutInfo(Parcel in) {
        this.id = in.readLong();
        this.path = in.readString();
        this.cutPath = in.readString();
        this.androidQToPath = in.readString();
        this.offsetX = in.readInt();
        this.offsetY = in.readInt();
        this.imageWidth = in.readInt();
        this.imageHeight = in.readInt();
        this.isCut = in.readByte() != 0;
        this.mimeType = in.readString();
        this.resultAspectRatio = in.readFloat();
        this.duration = in.readLong();
        this.httpOutUri = in.readParcelable(Uri.class.getClassLoader());
    }
 
    public static final Creator<CutInfo> CREATOR = new Creator<CutInfo>() {
        @Override
        public CutInfo createFromParcel(Parcel source) {
            return new CutInfo(source);
        }
 
        @Override
        public CutInfo[] newArray(int size) {
            return new CutInfo[size];
        }
    };
}