Flutter Engine
The Flutter Engine
third_party
skia
platform_tools
android
apps
jetski
src
main
java
org
skia
jetski
Color.java
Go to the documentation of this file.
1
/*
2
* Copyright 2021 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
package
org.skia.jetski;
9
10
public
class
Color
{
11
private
float
mR, mG, mB, mA;
12
13
public
Color
(
float
r
,
float
g
,
float
b
,
float
a
) {
14
mR =
r
;
15
mG =
g
;
16
mB =
b
;
17
mA =
a
;
18
}
19
20
public
Color
() {
21
this
(0, 0, 0, 1);
22
}
23
24
/*
25
* Converts int given by android.graphics.Color
26
* to JetSki Color
27
*/
28
public
Color
(
int
color
) {
29
mA = ((
color
>> 24) & 0xff) / 255.f;
30
mR = ((
color
>> 16) & 0xff) / 255.f;
31
mG = ((
color
>> 8) & 0xff) / 255.f;
32
mB = ((
color
) & 0xff) / 255.f;
33
}
34
35
public
float
r
() {
return
mR; }
36
public
float
g
() {
return
mG; }
37
public
float
b
() {
return
mB; }
38
public
float
a
() {
return
mA; }
39
40
public
void
setR
(
float
r
) { mR =
r
; }
41
public
void
setG
(
float
g
) { mG =
g
; }
42
public
void
setB
(
float
b
) { mB =
b
; }
43
public
void
setA
(
float
a
) { mA =
a
; }
44
}
org.skia.jetski.Color
Definition:
Color.java:10
org.skia.jetski.Color.Color
Color(int color)
Definition:
Color.java:28
org.skia.jetski.Color.b
float b()
Definition:
Color.java:37
org.skia.jetski.Color.Color
Color(float r, float g, float b, float a)
Definition:
Color.java:13
org.skia.jetski.Color.setG
void setG(float g)
Definition:
Color.java:41
org.skia.jetski.Color.r
float r()
Definition:
Color.java:35
org.skia.jetski.Color.setA
void setA(float a)
Definition:
Color.java:43
org.skia.jetski.Color.Color
Color()
Definition:
Color.java:20
org.skia.jetski.Color.g
float g()
Definition:
Color.java:36
org.skia.jetski.Color.setB
void setB(float b)
Definition:
Color.java:42
org.skia.jetski.Color.setR
void setR(float r)
Definition:
Color.java:40
org.skia.jetski.Color.a
float a()
Definition:
Color.java:38
color
DlColor color
Definition:
dl_golden_blur_unittests.cc:23
Generated on Sun Jun 23 2024 21:56:08 for Flutter Engine by
1.9.4