Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / platform_tools / android / apps / AndroidKit / src / main / java / org / skia / androidkit / HSLAMatrixColorFilter.java
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 java.lang.IllegalArgumentException;
11
12 public class HSLAMatrixColorFilter extends ColorFilter {
13     public HSLAMatrixColorFilter(float[] m) throws IllegalArgumentException {
14         super(makeNative(m));
15     }
16
17     private static long makeNative(float[] m) throws IllegalArgumentException {
18         if (m.length != 20) {
19             throw new IllegalArgumentException("Expecting an array of 20 floats.");
20         }
21
22         return nMakeHSLAMatrix(m);
23     }
24
25     private static native long nMakeHSLAMatrix(float[] m);
26 };