All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.humbleui.skija.GradientStyle Maven / Gradle / Ivy

There is a newer version: 0.116.2
Show newest version
// Generated by delombok at Mon Dec 20 14:13:09 UTC 2021
package io.github.humbleui.skija;

import org.jetbrains.annotations.ApiStatus;

public class GradientStyle {
    @ApiStatus.Internal
    public static final int _INTERPOLATE_PREMUL = 1;
    public static GradientStyle DEFAULT = new GradientStyle(FilterTileMode.CLAMP, true, null);
    @ApiStatus.Internal
    public final FilterTileMode _tileMode;
    @ApiStatus.Internal
    public final boolean _premul;
    @ApiStatus.Internal
    public final Matrix33 _localMatrix;

    @ApiStatus.Internal
    public int _getFlags() {
        return 0 | (_premul ? _INTERPOLATE_PREMUL : 0);
    }

    @ApiStatus.Internal
    public float[] _getMatrixArray() {
        return _localMatrix == null ? null : _localMatrix.getMat();
    }

    @java.lang.SuppressWarnings("all")
    public GradientStyle(final FilterTileMode tileMode, final boolean premul, final Matrix33 localMatrix) {
        this._tileMode = tileMode;
        this._premul = premul;
        this._localMatrix = localMatrix;
    }

    @java.lang.SuppressWarnings("all")
    public FilterTileMode getTileMode() {
        return this._tileMode;
    }

    @java.lang.SuppressWarnings("all")
    public boolean isPremul() {
        return this._premul;
    }

    @java.lang.SuppressWarnings("all")
    public Matrix33 getLocalMatrix() {
        return this._localMatrix;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof GradientStyle)) return false;
        final GradientStyle other = (GradientStyle) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (this.isPremul() != other.isPremul()) return false;
        final java.lang.Object this$_tileMode = this.getTileMode();
        final java.lang.Object other$_tileMode = other.getTileMode();
        if (this$_tileMode == null ? other$_tileMode != null : !this$_tileMode.equals(other$_tileMode)) return false;
        final java.lang.Object this$_localMatrix = this.getLocalMatrix();
        final java.lang.Object other$_localMatrix = other.getLocalMatrix();
        if (this$_localMatrix == null ? other$_localMatrix != null : !this$_localMatrix.equals(other$_localMatrix)) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof GradientStyle;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        result = result * PRIME + (this.isPremul() ? 79 : 97);
        final java.lang.Object $_tileMode = this.getTileMode();
        result = result * PRIME + ($_tileMode == null ? 43 : $_tileMode.hashCode());
        final java.lang.Object $_localMatrix = this.getLocalMatrix();
        result = result * PRIME + ($_localMatrix == null ? 43 : $_localMatrix.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public java.lang.String toString() {
        return "GradientStyle(_tileMode=" + this.getTileMode() + ", _premul=" + this.isPremul() + ", _localMatrix=" + this.getLocalMatrix() + ")";
    }

    /**
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    public GradientStyle withTileMode(final FilterTileMode _tileMode) {
        return this._tileMode == _tileMode ? this : new GradientStyle(_tileMode, this._premul, this._localMatrix);
    }

    /**
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    public GradientStyle withPremul(final boolean _premul) {
        return this._premul == _premul ? this : new GradientStyle(this._tileMode, _premul, this._localMatrix);
    }

    /**
     * @return {@code this}.
     */
    @java.lang.SuppressWarnings("all")
    public GradientStyle withLocalMatrix(final Matrix33 _localMatrix) {
        return this._localMatrix == _localMatrix ? this : new GradientStyle(this._tileMode, this._premul, _localMatrix);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy