google-apis-vision_v1 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/google/apis/vision_v1/classes.rb +220 -221
- data/lib/google/apis/vision_v1/gem_version.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88d33752326fc14c730931766a1cfe86a46ab4bf741a8cab3a66146691e17b3b
|
4
|
+
data.tar.gz: c740fb0a752ce5b93323605187ab0baed3dd9bce8ad6df476ffab1c71a466fb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3492b96cc928b97a8c55a31c03d7c6445b404a87257e355a45660af7bd72620248e494d73040964ab262de4e912ef520d8117e58ee4b56389cc528c8b0b146a
|
7
|
+
data.tar.gz: 8831620bef10f909062e7bab0f4064bb516c1227d0b5584e199a65de1bc5907bdb8ecaeab7cfa8d68032fcdfc0e6096540073a404168b1d8fab8fd87f8d1fc34
|
data/CHANGELOG.md
CHANGED
@@ -645,61 +645,60 @@ module Google
|
|
645
645
|
|
646
646
|
# Represents a color in the RGBA color space. This representation is designed
|
647
647
|
# for simplicity of conversion to/from color representations in various
|
648
|
-
# languages over compactness
|
649
|
-
# be trivially provided to the constructor of
|
650
|
-
# also be trivially provided to UIColor's
|
648
|
+
# languages over compactness. For example, the fields of this representation can
|
649
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
650
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
651
651
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
652
|
-
# CSS
|
652
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
653
653
|
# information about the absolute color space that should be used to interpret
|
654
654
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
655
|
-
# applications
|
656
|
-
#
|
657
|
-
#
|
658
|
-
#
|
659
|
-
#
|
660
|
-
# protocolor.
|
661
|
-
#
|
662
|
-
#
|
663
|
-
# float
|
664
|
-
# float
|
665
|
-
#
|
666
|
-
#
|
667
|
-
#
|
668
|
-
#
|
669
|
-
#
|
670
|
-
#
|
671
|
-
#
|
672
|
-
#
|
673
|
-
#
|
674
|
-
#
|
675
|
-
#
|
676
|
-
#
|
677
|
-
#
|
678
|
-
#
|
679
|
-
#
|
655
|
+
# applications should assume the sRGB color space. When color equality needs to
|
656
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
657
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
658
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
659
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
660
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
661
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
662
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
663
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
664
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
665
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
666
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
667
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
668
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
669
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
670
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
671
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
672
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
673
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
674
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
675
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
676
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
677
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
678
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
679
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
680
680
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
681
681
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
682
682
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
683
|
-
#
|
683
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
684
684
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
685
|
-
# ', alphaFrac, ')'].join(''); `; var
|
686
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
687
|
-
#
|
688
|
-
#
|
689
|
-
#
|
690
|
-
#
|
685
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
686
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
687
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
688
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
689
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
690
|
+
# / ...
|
691
691
|
class Color
|
692
692
|
include Google::Apis::Core::Hashable
|
693
693
|
|
694
694
|
# The fraction of this color that should be applied to the pixel. That is, the
|
695
|
-
# final pixel color is defined by the equation: pixel color = alpha * (this
|
696
|
-
# color) + (1.0 - alpha) * (background color) This means that a value of 1.0
|
695
|
+
# final pixel color is defined by the equation: `pixel color = alpha * (this
|
696
|
+
# color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
|
697
697
|
# corresponds to a solid color, whereas a value of 0.0 corresponds to a
|
698
698
|
# completely transparent color. This uses a wrapper message rather than a simple
|
699
699
|
# float scalar so that it is possible to distinguish between a default value and
|
700
|
-
# the value being unset. If omitted, this color object is
|
701
|
-
#
|
702
|
-
# 0).
|
700
|
+
# the value being unset. If omitted, this color object is rendered as a solid
|
701
|
+
# color (as if the alpha value had been explicitly given a value of 1.0).
|
703
702
|
# Corresponds to the JSON property `alpha`
|
704
703
|
# @return [Float]
|
705
704
|
attr_accessor :alpha
|
@@ -739,49 +738,49 @@ module Google
|
|
739
738
|
|
740
739
|
# Represents a color in the RGBA color space. This representation is designed
|
741
740
|
# for simplicity of conversion to/from color representations in various
|
742
|
-
# languages over compactness
|
743
|
-
# be trivially provided to the constructor of
|
744
|
-
# also be trivially provided to UIColor's
|
741
|
+
# languages over compactness. For example, the fields of this representation can
|
742
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
743
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
745
744
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
746
|
-
# CSS
|
745
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
747
746
|
# information about the absolute color space that should be used to interpret
|
748
747
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
749
|
-
# applications
|
750
|
-
#
|
751
|
-
#
|
752
|
-
#
|
753
|
-
#
|
754
|
-
# protocolor.
|
755
|
-
#
|
756
|
-
#
|
757
|
-
# float
|
758
|
-
# float
|
759
|
-
#
|
760
|
-
#
|
761
|
-
#
|
762
|
-
#
|
763
|
-
#
|
764
|
-
#
|
765
|
-
#
|
766
|
-
#
|
767
|
-
#
|
768
|
-
#
|
769
|
-
#
|
770
|
-
#
|
771
|
-
#
|
772
|
-
#
|
773
|
-
#
|
748
|
+
# applications should assume the sRGB color space. When color equality needs to
|
749
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
750
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
751
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
752
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
753
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
754
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
755
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
756
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
757
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
758
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
759
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
760
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
761
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
762
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
763
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
764
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
765
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
766
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
767
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
768
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
769
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
770
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
771
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
772
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
774
773
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
775
774
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
776
775
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
777
|
-
#
|
776
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
778
777
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
779
|
-
# ', alphaFrac, ')'].join(''); `; var
|
780
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
781
|
-
#
|
782
|
-
#
|
783
|
-
#
|
784
|
-
#
|
778
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
779
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
780
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
781
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
782
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
783
|
+
# / ...
|
785
784
|
# Corresponds to the JSON property `color`
|
786
785
|
# @return [Google::Apis::VisionV1::Color]
|
787
786
|
attr_accessor :color
|
@@ -1514,49 +1513,49 @@ module Google
|
|
1514
1513
|
|
1515
1514
|
# Represents a color in the RGBA color space. This representation is designed
|
1516
1515
|
# for simplicity of conversion to/from color representations in various
|
1517
|
-
# languages over compactness
|
1518
|
-
# be trivially provided to the constructor of
|
1519
|
-
# also be trivially provided to UIColor's
|
1516
|
+
# languages over compactness. For example, the fields of this representation can
|
1517
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1518
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1520
1519
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1521
|
-
# CSS
|
1520
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1522
1521
|
# information about the absolute color space that should be used to interpret
|
1523
1522
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1524
|
-
# applications
|
1525
|
-
#
|
1526
|
-
#
|
1527
|
-
#
|
1528
|
-
#
|
1529
|
-
# protocolor.
|
1530
|
-
#
|
1531
|
-
#
|
1532
|
-
# float
|
1533
|
-
# float
|
1534
|
-
#
|
1535
|
-
#
|
1536
|
-
#
|
1537
|
-
#
|
1538
|
-
#
|
1539
|
-
#
|
1540
|
-
#
|
1541
|
-
#
|
1542
|
-
#
|
1543
|
-
#
|
1544
|
-
#
|
1545
|
-
#
|
1546
|
-
#
|
1547
|
-
#
|
1548
|
-
#
|
1523
|
+
# applications should assume the sRGB color space. When color equality needs to
|
1524
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
1525
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
1526
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
1527
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1528
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1529
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
1530
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
1531
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
1532
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
1533
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
1534
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
1535
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
1536
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
1537
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
1538
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
1539
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
1540
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
1541
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
1542
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
1543
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
1544
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
1545
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
1546
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
1547
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
1549
1548
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1550
1549
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1551
1550
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1552
|
-
#
|
1551
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1553
1552
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1554
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1555
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1556
|
-
#
|
1557
|
-
#
|
1558
|
-
#
|
1559
|
-
#
|
1553
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
1554
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
1555
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
1556
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
1557
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
1558
|
+
# / ...
|
1560
1559
|
# Corresponds to the JSON property `color`
|
1561
1560
|
# @return [Google::Apis::VisionV1::Color]
|
1562
1561
|
attr_accessor :color
|
@@ -3234,49 +3233,49 @@ module Google
|
|
3234
3233
|
|
3235
3234
|
# Represents a color in the RGBA color space. This representation is designed
|
3236
3235
|
# for simplicity of conversion to/from color representations in various
|
3237
|
-
# languages over compactness
|
3238
|
-
# be trivially provided to the constructor of
|
3239
|
-
# also be trivially provided to UIColor's
|
3236
|
+
# languages over compactness. For example, the fields of this representation can
|
3237
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3238
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3240
3239
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3241
|
-
# CSS
|
3240
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3242
3241
|
# information about the absolute color space that should be used to interpret
|
3243
3242
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3244
|
-
# applications
|
3245
|
-
#
|
3246
|
-
#
|
3247
|
-
#
|
3248
|
-
#
|
3249
|
-
# protocolor.
|
3250
|
-
#
|
3251
|
-
#
|
3252
|
-
# float
|
3253
|
-
# float
|
3254
|
-
#
|
3255
|
-
#
|
3256
|
-
#
|
3257
|
-
#
|
3258
|
-
#
|
3259
|
-
#
|
3260
|
-
#
|
3261
|
-
#
|
3262
|
-
#
|
3263
|
-
#
|
3264
|
-
#
|
3265
|
-
#
|
3266
|
-
#
|
3267
|
-
#
|
3268
|
-
#
|
3243
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3244
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3245
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3246
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3247
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3248
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3249
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3250
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3251
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3252
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3253
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3254
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3255
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3256
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3257
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3258
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3259
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3260
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3261
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3262
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3263
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3264
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3265
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3266
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3267
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3269
3268
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3270
3269
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3271
3270
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3272
|
-
#
|
3271
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3273
3272
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3274
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3275
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3276
|
-
#
|
3277
|
-
#
|
3278
|
-
#
|
3279
|
-
#
|
3273
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3274
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3275
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3276
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3277
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3278
|
+
# / ...
|
3280
3279
|
# Corresponds to the JSON property `color`
|
3281
3280
|
# @return [Google::Apis::VisionV1::Color]
|
3282
3281
|
attr_accessor :color
|
@@ -4988,49 +4987,49 @@ module Google
|
|
4988
4987
|
|
4989
4988
|
# Represents a color in the RGBA color space. This representation is designed
|
4990
4989
|
# for simplicity of conversion to/from color representations in various
|
4991
|
-
# languages over compactness
|
4992
|
-
# be trivially provided to the constructor of
|
4993
|
-
# also be trivially provided to UIColor's
|
4990
|
+
# languages over compactness. For example, the fields of this representation can
|
4991
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
4992
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
4994
4993
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
4995
|
-
# CSS
|
4994
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
4996
4995
|
# information about the absolute color space that should be used to interpret
|
4997
4996
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
4998
|
-
# applications
|
4999
|
-
#
|
5000
|
-
#
|
5001
|
-
#
|
5002
|
-
#
|
5003
|
-
# protocolor.
|
5004
|
-
#
|
5005
|
-
#
|
5006
|
-
# float
|
5007
|
-
# float
|
5008
|
-
#
|
5009
|
-
#
|
5010
|
-
#
|
5011
|
-
#
|
5012
|
-
#
|
5013
|
-
#
|
5014
|
-
#
|
5015
|
-
#
|
5016
|
-
#
|
5017
|
-
#
|
5018
|
-
#
|
5019
|
-
#
|
5020
|
-
#
|
5021
|
-
#
|
5022
|
-
#
|
4997
|
+
# applications should assume the sRGB color space. When color equality needs to
|
4998
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
4999
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5000
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5001
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5002
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5003
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5004
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5005
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5006
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5007
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5008
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5009
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5010
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5011
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5012
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5013
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5014
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5015
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5016
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5017
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5018
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5019
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5020
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5021
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5023
5022
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5024
5023
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5025
5024
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5026
|
-
#
|
5025
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5027
5026
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
5028
|
-
# ', alphaFrac, ')'].join(''); `; var
|
5029
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
5030
|
-
#
|
5031
|
-
#
|
5032
|
-
#
|
5033
|
-
#
|
5027
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5028
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5029
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5030
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5031
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5032
|
+
# / ...
|
5034
5033
|
# Corresponds to the JSON property `color`
|
5035
5034
|
# @return [Google::Apis::VisionV1::Color]
|
5036
5035
|
attr_accessor :color
|
@@ -6882,49 +6881,49 @@ module Google
|
|
6882
6881
|
|
6883
6882
|
# Represents a color in the RGBA color space. This representation is designed
|
6884
6883
|
# for simplicity of conversion to/from color representations in various
|
6885
|
-
# languages over compactness
|
6886
|
-
# be trivially provided to the constructor of
|
6887
|
-
# also be trivially provided to UIColor's
|
6884
|
+
# languages over compactness. For example, the fields of this representation can
|
6885
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6886
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6888
6887
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6889
|
-
# CSS
|
6888
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6890
6889
|
# information about the absolute color space that should be used to interpret
|
6891
6890
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6892
|
-
# applications
|
6893
|
-
#
|
6894
|
-
#
|
6895
|
-
#
|
6896
|
-
#
|
6897
|
-
# protocolor.
|
6898
|
-
#
|
6899
|
-
#
|
6900
|
-
# float
|
6901
|
-
# float
|
6902
|
-
#
|
6903
|
-
#
|
6904
|
-
#
|
6905
|
-
#
|
6906
|
-
#
|
6907
|
-
#
|
6908
|
-
#
|
6909
|
-
#
|
6910
|
-
#
|
6911
|
-
#
|
6912
|
-
#
|
6913
|
-
#
|
6914
|
-
#
|
6915
|
-
#
|
6916
|
-
#
|
6891
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6892
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6893
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6894
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6895
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6896
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6897
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6898
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6899
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6900
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6901
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6902
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6903
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6904
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6905
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6906
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6907
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6908
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6909
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6910
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6911
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6912
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6913
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6914
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6915
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6917
6916
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6918
6917
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6919
6918
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6920
|
-
#
|
6919
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6921
6920
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6922
|
-
# ', alphaFrac, ')'].join(''); `; var
|
6923
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
6924
|
-
#
|
6925
|
-
#
|
6926
|
-
#
|
6927
|
-
#
|
6921
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6922
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6923
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6924
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6925
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6926
|
+
# / ...
|
6928
6927
|
# Corresponds to the JSON property `color`
|
6929
6928
|
# @return [Google::Apis::VisionV1::Color]
|
6930
6929
|
attr_accessor :color
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module VisionV1
|
18
18
|
# Version of the google-apis-vision_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.4.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.2.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210317"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-vision_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -52,7 +52,7 @@ licenses:
|
|
52
52
|
metadata:
|
53
53
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
54
54
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-vision_v1/CHANGELOG.md
|
55
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-vision_v1/v0.
|
55
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-vision_v1/v0.4.0
|
56
56
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-vision_v1
|
57
57
|
post_install_message:
|
58
58
|
rdoc_options: []
|