Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by delombok at Mon Dec 20 14:13:09 UTC 2021
package io.github.humbleui.skija;
import org.jetbrains.annotations.*;
public class FontMetrics {
/**
* greatest extent above origin of any glyph bounding box, typically negative; deprecated with variable fonts
*/
public final float _top;
/**
* distance to reserve above baseline, typically negative
*/
public final float _ascent;
/**
* distance to reserve below baseline, typically positive
*/
public final float _descent;
/**
* greatest extent below origin of any glyph bounding box, typically positive; deprecated with variable fonts
*/
public final float _bottom;
/**
* distance to add between lines, typically positive or zero
*/
public final float _leading;
/**
* average character width, zero if unknown
*/
public final float _avgCharWidth;
/**
* maximum character width, zero if unknown
*/
public final float _maxCharWidth;
/**
* greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts
*/
public final float _xMin;
/**
* greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts
*/
public final float _xMax;
/**
* height of lower-case 'x', zero if unknown, typically negative
*/
public final float _xHeight;
/**
* height of an upper-case letter, zero if unknown, typically negative
*/
public final float _capHeight;
/**
* underline thickness
*/
@Nullable
public final Float _underlineThickness;
/**
* distance from baseline to top of stroke, typically positive
*/
@Nullable
public final Float _underlinePosition;
/**
* strikeout thickness
*/
@Nullable
public final Float _strikeoutThickness;
/**
* distance from baseline to bottom of stroke, typically negative
*/
@Nullable
public final Float _strikeoutPosition;
public float getHeight() {
return _descent - _ascent;
}
@java.lang.SuppressWarnings("all")
public FontMetrics(final float top, final float ascent, final float descent, final float bottom, final float leading, final float avgCharWidth, final float maxCharWidth, final float xMin, final float xMax, final float xHeight, final float capHeight, @Nullable final Float underlineThickness, @Nullable final Float underlinePosition, @Nullable final Float strikeoutThickness, @Nullable final Float strikeoutPosition) {
this._top = top;
this._ascent = ascent;
this._descent = descent;
this._bottom = bottom;
this._leading = leading;
this._avgCharWidth = avgCharWidth;
this._maxCharWidth = maxCharWidth;
this._xMin = xMin;
this._xMax = xMax;
this._xHeight = xHeight;
this._capHeight = capHeight;
this._underlineThickness = underlineThickness;
this._underlinePosition = underlinePosition;
this._strikeoutThickness = strikeoutThickness;
this._strikeoutPosition = strikeoutPosition;
}
/**
* greatest extent above origin of any glyph bounding box, typically negative; deprecated with variable fonts
*/
@java.lang.SuppressWarnings("all")
public float getTop() {
return this._top;
}
/**
* distance to reserve above baseline, typically negative
*/
@java.lang.SuppressWarnings("all")
public float getAscent() {
return this._ascent;
}
/**
* distance to reserve below baseline, typically positive
*/
@java.lang.SuppressWarnings("all")
public float getDescent() {
return this._descent;
}
/**
* greatest extent below origin of any glyph bounding box, typically positive; deprecated with variable fonts
*/
@java.lang.SuppressWarnings("all")
public float getBottom() {
return this._bottom;
}
/**
* distance to add between lines, typically positive or zero
*/
@java.lang.SuppressWarnings("all")
public float getLeading() {
return this._leading;
}
/**
* average character width, zero if unknown
*/
@java.lang.SuppressWarnings("all")
public float getAvgCharWidth() {
return this._avgCharWidth;
}
/**
* maximum character width, zero if unknown
*/
@java.lang.SuppressWarnings("all")
public float getMaxCharWidth() {
return this._maxCharWidth;
}
/**
* greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts
*/
@java.lang.SuppressWarnings("all")
public float getXMin() {
return this._xMin;
}
/**
* greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts
*/
@java.lang.SuppressWarnings("all")
public float getXMax() {
return this._xMax;
}
/**
* height of lower-case 'x', zero if unknown, typically negative
*/
@java.lang.SuppressWarnings("all")
public float getXHeight() {
return this._xHeight;
}
/**
* height of an upper-case letter, zero if unknown, typically negative
*/
@java.lang.SuppressWarnings("all")
public float getCapHeight() {
return this._capHeight;
}
/**
* underline thickness
*/
@Nullable
@java.lang.SuppressWarnings("all")
public Float getUnderlineThickness() {
return this._underlineThickness;
}
/**
* distance from baseline to top of stroke, typically positive
*/
@Nullable
@java.lang.SuppressWarnings("all")
public Float getUnderlinePosition() {
return this._underlinePosition;
}
/**
* strikeout thickness
*/
@Nullable
@java.lang.SuppressWarnings("all")
public Float getStrikeoutThickness() {
return this._strikeoutThickness;
}
/**
* distance from baseline to bottom of stroke, typically negative
*/
@Nullable
@java.lang.SuppressWarnings("all")
public Float getStrikeoutPosition() {
return this._strikeoutPosition;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof FontMetrics)) return false;
final FontMetrics other = (FontMetrics) o;
if (!other.canEqual((java.lang.Object) this)) return false;
if (java.lang.Float.compare(this.getTop(), other.getTop()) != 0) return false;
if (java.lang.Float.compare(this.getAscent(), other.getAscent()) != 0) return false;
if (java.lang.Float.compare(this.getDescent(), other.getDescent()) != 0) return false;
if (java.lang.Float.compare(this.getBottom(), other.getBottom()) != 0) return false;
if (java.lang.Float.compare(this.getLeading(), other.getLeading()) != 0) return false;
if (java.lang.Float.compare(this.getAvgCharWidth(), other.getAvgCharWidth()) != 0) return false;
if (java.lang.Float.compare(this.getMaxCharWidth(), other.getMaxCharWidth()) != 0) return false;
if (java.lang.Float.compare(this.getXMin(), other.getXMin()) != 0) return false;
if (java.lang.Float.compare(this.getXMax(), other.getXMax()) != 0) return false;
if (java.lang.Float.compare(this.getXHeight(), other.getXHeight()) != 0) return false;
if (java.lang.Float.compare(this.getCapHeight(), other.getCapHeight()) != 0) return false;
final java.lang.Object this$_underlineThickness = this.getUnderlineThickness();
final java.lang.Object other$_underlineThickness = other.getUnderlineThickness();
if (this$_underlineThickness == null ? other$_underlineThickness != null : !this$_underlineThickness.equals(other$_underlineThickness)) return false;
final java.lang.Object this$_underlinePosition = this.getUnderlinePosition();
final java.lang.Object other$_underlinePosition = other.getUnderlinePosition();
if (this$_underlinePosition == null ? other$_underlinePosition != null : !this$_underlinePosition.equals(other$_underlinePosition)) return false;
final java.lang.Object this$_strikeoutThickness = this.getStrikeoutThickness();
final java.lang.Object other$_strikeoutThickness = other.getStrikeoutThickness();
if (this$_strikeoutThickness == null ? other$_strikeoutThickness != null : !this$_strikeoutThickness.equals(other$_strikeoutThickness)) return false;
final java.lang.Object this$_strikeoutPosition = this.getStrikeoutPosition();
final java.lang.Object other$_strikeoutPosition = other.getStrikeoutPosition();
if (this$_strikeoutPosition == null ? other$_strikeoutPosition != null : !this$_strikeoutPosition.equals(other$_strikeoutPosition)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
protected boolean canEqual(final java.lang.Object other) {
return other instanceof FontMetrics;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = result * PRIME + java.lang.Float.floatToIntBits(this.getTop());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getAscent());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getDescent());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getBottom());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getLeading());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getAvgCharWidth());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getMaxCharWidth());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getXMin());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getXMax());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getXHeight());
result = result * PRIME + java.lang.Float.floatToIntBits(this.getCapHeight());
final java.lang.Object $_underlineThickness = this.getUnderlineThickness();
result = result * PRIME + ($_underlineThickness == null ? 43 : $_underlineThickness.hashCode());
final java.lang.Object $_underlinePosition = this.getUnderlinePosition();
result = result * PRIME + ($_underlinePosition == null ? 43 : $_underlinePosition.hashCode());
final java.lang.Object $_strikeoutThickness = this.getStrikeoutThickness();
result = result * PRIME + ($_strikeoutThickness == null ? 43 : $_strikeoutThickness.hashCode());
final java.lang.Object $_strikeoutPosition = this.getStrikeoutPosition();
result = result * PRIME + ($_strikeoutPosition == null ? 43 : $_strikeoutPosition.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
public java.lang.String toString() {
return "FontMetrics(_top=" + this.getTop() + ", _ascent=" + this.getAscent() + ", _descent=" + this.getDescent() + ", _bottom=" + this.getBottom() + ", _leading=" + this.getLeading() + ", _avgCharWidth=" + this.getAvgCharWidth() + ", _maxCharWidth=" + this.getMaxCharWidth() + ", _xMin=" + this.getXMin() + ", _xMax=" + this.getXMax() + ", _xHeight=" + this.getXHeight() + ", _capHeight=" + this.getCapHeight() + ", _underlineThickness=" + this.getUnderlineThickness() + ", _underlinePosition=" + this.getUnderlinePosition() + ", _strikeoutThickness=" + this.getStrikeoutThickness() + ", _strikeoutPosition=" + this.getStrikeoutPosition() + ")";
}
}