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.androidkit; 9 10 import android.support.annotation.Nullable; 11 import java.lang.IllegalArgumentException; 12 13 public class TwoPointConicalGradient extends Gradient { TwoPointConicalGradient(float x0, float y0, float r0, float x1, float y1, float r1, int[] colors, float[] pos, TileMode tm, @Nullable Matrix localMatrix)14 public TwoPointConicalGradient(float x0, float y0, float r0, float x1, float y1, float r1, 15 int[] colors, float[] pos, TileMode tm, 16 @Nullable Matrix localMatrix) throws IllegalArgumentException { 17 super(colors, pos, tm, localMatrix, 18 (c, p, t, m) -> nMakeTwoPointConical(x0, y0, r0, x1, y1, r1, c, p, t, m)); 19 } 20 TwoPointConicalGradient(float x0, float y0, float r0, float x1, float y1, float r1, int[] colors, float[] pos, TileMode tm)21 public TwoPointConicalGradient(float x0, float y0, float r0, float x1, float y1, float r1, 22 int[] colors, float[] pos, 23 TileMode tm) throws IllegalArgumentException { 24 this(x0, y0, r0, x1, y1, r1, colors, pos, tm, null); 25 } 26 TwoPointConicalGradient(float x0, float y0, float r0, float x1, float y1, float r1, float[] colors, float[] pos, TileMode tm, @Nullable Matrix localMatrix)27 public TwoPointConicalGradient(float x0, float y0, float r0, float x1, float y1, float r1, 28 float[] colors, float[] pos, TileMode tm, 29 @Nullable Matrix localMatrix) throws IllegalArgumentException { 30 super(colors, pos, tm, localMatrix, 31 (c, p, t, m) -> nMakeTwoPointConical(x0, y0, r0, x1, y1, r1, c, p, t, m)); 32 } 33 TwoPointConicalGradient(float x0, float y0, float r0, float x1, float y1, float r1, float[] colors, float[] pos, TileMode tm)34 public TwoPointConicalGradient(float x0, float y0, float r0, float x1, float y1, float r1, 35 float[] colors, float[] pos, 36 TileMode tm) throws IllegalArgumentException { 37 this(x0, y0, r0, x1, y1, r1, colors, pos, tm, null); 38 } 39 nMakeTwoPointConical(float x0, float y0, float r0, float x1, float y1, float r1, float[] colors, float[] pos, int tilemode, long nativeLocalMatrix)40 private static native long nMakeTwoPointConical(float x0, float y0, float r0, 41 float x1, float y1, float r1, 42 float[] colors, float[] pos, int tilemode, 43 long nativeLocalMatrix); 44 } 45