Unverified Commit 2d070a54 authored by Nikolay Igotti's avatar Nikolay Igotti Committed by GitHub

Move to Gradle 7.1 (#166)

parent 5d041475
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
......@@ -9,10 +9,7 @@ package org.jetbrains.skia
* It encodes how pixel bits describe alpha, transparency; color components red, blue,
* and green; and ColorSpace, the range and linearity of colors.
*/
class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: ColorSpace?) {
val colorType: ColorType
val alphaType: ColorAlphaType
val colorSpace: ColorSpace?
class ColorInfo(val colorType: ColorType, val alphaType: ColorAlphaType, val colorSpace: ColorSpace?) {
val isOpaque: Boolean
get() = alphaType == ColorAlphaType.OPAQUE || colorType.isAlwaysOpaque
......@@ -40,10 +37,9 @@ class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: Col
val isGammaCloseToSRGB: Boolean
get() = colorSpace != null && colorSpace.isGammaCloseToSRGB
override fun equals(o: Any?): Boolean {
if (o === this) return true
if (o !is ColorInfo) return false
val other = o
override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is ColorInfo) return false
if (!other.canEqual(this as Any)) return false
val `this$_colorType`: Any = colorType
val `other$_colorType`: Any = other.colorType
......@@ -77,16 +73,10 @@ class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: Col
}
fun withColorType(_colorType: ColorType): ColorInfo {
if (_colorType == null) {
throw NullPointerException("_colorType is marked non-null but is null")
}
return if (colorType == _colorType) this else ColorInfo(_colorType, alphaType, colorSpace)
}
fun withAlphaType(_alphaType: ColorAlphaType): ColorInfo {
if (_alphaType == null) {
throw NullPointerException("_alphaType is marked non-null but is null")
}
return if (alphaType == _alphaType) this else ColorInfo(colorType, _alphaType, colorSpace)
}
......@@ -101,10 +91,4 @@ class ColorInfo(colorType: ColorType, alphaType: ColorAlphaType, colorSpace: Col
*/
val DEFAULT = ColorInfo(ColorType.UNKNOWN, ColorAlphaType.UNKNOWN, null)
}
init {
this.colorType = colorType
this.alphaType = alphaType
this.colorSpace = colorSpace
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment