UnderlineMetrics.java
1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.fontengine.font;
public final class UnderlineMetrics {
public final double position;
public final double thickness;
public UnderlineMetrics(double position, double thickness) {
this.position = position;
this.thickness = thickness;
}
public UnderlineMetrics toEmSpace(double unitsPerEmX, double unitsPerEmY) {
return new UnderlineMetrics(this.position / unitsPerEmY, this.thickness / unitsPerEmY);
}
public UnderlineMetrics toDesignSpace(double unitsPerEmX, double unitsPerEmY) {
return new UnderlineMetrics(this.position * unitsPerEmY, this.thickness * unitsPerEmY);
}
public boolean equals(Object o) {
if (o == null) {
return false;
}
if (o == this) {
return true;
}
if (!(o instanceof UnderlineMetrics)) {
return false;
}
UnderlineMetrics vm = (UnderlineMetrics)o;
return vm.position == this.position && vm.thickness == this.thickness;
}
public int hashCode() {
return (int)this.position ^ (int)this.thickness;
}
public String toString() {
return "[p=" + this.position + " t=" + this.thickness + "]";
}
}