Lines Matching refs:hsv

1406      *   <li><code>hsv[0]</code> is Hue \([0..360[\)</li>
1407 * <li><code>hsv[1]</code> is Saturation \([0...1]\)</li>
1408 * <li><code>hsv[2]</code> is Value \([0...1]\)</li>
1413 * @param hsv 3 element array which holds the resulting HSV components.
1418 @IntRange(from = 0, to = 255) int blue, @Size(3) float hsv[]) {
1419 if (hsv.length < 3) {
1420 throw new RuntimeException("3 components required for hsv");
1422 nativeRGBToHSV(red, green, blue, hsv);
1428 * <li><code>hsv[0]</code> is Hue \([0..360[\)</li>
1429 * <li><code>hsv[1]</code> is Saturation \([0...1]\)</li>
1430 * <li><code>hsv[2]</code> is Value \([0...1]\)</li>
1433 * @param hsv 3 element array which holds the resulting HSV components.
1435 public static void colorToHSV(@ColorInt int color, @Size(3) float hsv[]) {
1436 RGBToHSV((color >> 16) & 0xFF, (color >> 8) & 0xFF, color & 0xFF, hsv);
1442 * <li><code>hsv[0]</code> is Hue \([0..360[\)</li>
1443 * <li><code>hsv[1]</code> is Saturation \([0...1]\)</li>
1444 * <li><code>hsv[2]</code> is Value \([0...1]\)</li>
1446 * If hsv values are out of range, they are pinned.
1447 * @param hsv 3 element array which holds the input HSV components.
1451 public static int HSVToColor(@Size(3) float hsv[]) {
1452 return HSVToColor(0xFF, hsv);
1459 * <li><code>hsv[0]</code> is Hue \([0..360[\)</li>
1460 * <li><code>hsv[1]</code> is Saturation \([0...1]\)</li>
1461 * <li><code>hsv[2]</code> is Value \([0...1]\)</li>
1463 * If hsv values are out of range, they are pinned.
1465 * @param hsv 3 element array which holds the input HSV components.
1469 public static int HSVToColor(@IntRange(from = 0, to = 255) int alpha, @Size(3) float hsv[]) {
1470 if (hsv.length < 3) {
1471 throw new RuntimeException("3 components required for hsv");
1473 return nativeHSVToColor(alpha, hsv);
1476 private static native void nativeRGBToHSV(int red, int greed, int blue, float hsv[]);
1477 private static native int nativeHSVToColor(int alpha, float hsv[]);