MCPcopy Create free account
hub / github.com/JetBrains/skija / flattenArray

Method flattenArray

shared/java/Color4f.java:40–49  ·  view source on GitHub ↗
(Color4f[] colors)

Source from the content-addressed store, hash-verified

38 }
39
40 public static float[] flattenArray(Color4f[] colors) {
41 float[] arr = new float[colors.length * 4];
42 for (int i = 0; i < colors.length; ++i) {
43 arr[i * 4] = colors[i]._r;
44 arr[i * 4 + 1] = colors[i]._g;
45 arr[i * 4 + 2] = colors[i]._b;
46 arr[i * 4 + 3] = colors[i]._a;
47 }
48 return arr;
49 }
50
51 // TODO premultiply alpha
52 public Color4f makeLerp(Color4f other, float weight) {

Callers 4

makeLinearGradientMethod · 0.95
makeRadialGradientMethod · 0.95
makeSweepGradientMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected