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

Method flattenArray

shared/java/Point.java:16–25  ·  view source on GitHub ↗
(@Nullable Point[] pts)

Source from the content-addressed store, hash-verified

14 public final float _y;
15
16 @Contract("null -> null; !null -> new")
17 public static @Nullable float[] flattenArray(@Nullable Point[] pts) {
18 if (pts == null) return null;
19 float[] arr = new float[pts.length * 2];
20 for (int i = 0; i < pts.length; ++i) {
21 arr[i * 2] = pts[i]._x;
22 arr[i * 2 + 1] = pts[i]._y;
23 }
24 return arr;
25 }
26
27 @Contract("null -> null; !null -> new")
28 public static @Nullable Point[] fromArray(@Nullable float[] pts) {

Callers 7

drawPointsMethod · 0.95
drawLinesMethod · 0.95
drawPolygonMethod · 0.95
drawTrianglesMethod · 0.95
drawTriangleStripMethod · 0.95
drawTriangleFanMethod · 0.95
drawPatchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected