File tree Expand file tree Collapse file tree 1 file changed +11
-53
lines changed Expand file tree Collapse file tree 1 file changed +11
-53
lines changed Original file line number Diff line number Diff line change @@ -208,59 +208,17 @@ impl RGBA {
208
208
}
209
209
}
210
210
211
- pub const BLACK : RGBA = Self {
212
- inner : ffi:: GdkRGBA {
213
- red : 0f32 ,
214
- green : 0f32 ,
215
- blue : 0f32 ,
216
- alpha : 1f32 ,
217
- } ,
218
- } ;
219
-
220
- pub const BLUE : RGBA = Self {
221
- inner : ffi:: GdkRGBA {
222
- red : 0f32 ,
223
- green : 0f32 ,
224
- blue : 1f32 ,
225
- alpha : 1f32 ,
226
- } ,
227
- } ;
228
-
229
- pub const GREEN : RGBA = Self {
230
- inner : ffi:: GdkRGBA {
231
- red : 0f32 ,
232
- green : 1f32 ,
233
- blue : 0f32 ,
234
- alpha : 1f32 ,
235
- } ,
236
- } ;
237
-
238
- pub const RED : RGBA = Self {
239
- inner : ffi:: GdkRGBA {
240
- red : 1f32 ,
241
- green : 0f32 ,
242
- blue : 0f32 ,
243
- alpha : 1f32 ,
244
- } ,
245
- } ;
246
-
247
- pub const WHITE : RGBA = Self {
248
- inner : ffi:: GdkRGBA {
249
- red : 1f32 ,
250
- green : 1f32 ,
251
- blue : 1f32 ,
252
- alpha : 1f32 ,
253
- } ,
254
- } ;
255
-
256
- pub const TRANSPARENT : RGBA = Self {
257
- inner : ffi:: GdkRGBA {
258
- red : 0f32 ,
259
- green : 0f32 ,
260
- blue : 0f32 ,
261
- alpha : 0f32 ,
262
- } ,
263
- } ;
211
+ pub const BLACK : RGBA = Self :: new ( 0f32 , 0f32 , 0f32 , 1f32 ) ;
212
+
213
+ pub const BLUE : RGBA = Self :: new ( 0f32 , 0f32 , 1f32 , 1f32 ) ;
214
+
215
+ pub const GREEN : RGBA = Self :: new ( 0f32 , 1f32 , 0f32 , 1f32 ) ;
216
+
217
+ pub const RED : RGBA = Self :: new ( 1f32 , 0f32 , 0f32 , 1f32 ) ;
218
+
219
+ pub const WHITE : RGBA = Self :: new ( 1f32 , 1f32 , 1f32 , 1f32 ) ;
220
+
221
+ pub const TRANSPARENT : RGBA = Self :: new ( 0f32 , 0f32 , 0f32 , 0f32 ) ;
264
222
}
265
223
266
224
impl fmt:: Debug for RGBA {
You can’t perform that action at this time.
0 commit comments