类 FontMath
java.lang.Object
com.google.typography.font.sfntly.math.FontMath
Utility math for fonts.
- 作者:
- Stuart Gill
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static int
log2
(int a) static int
paddingRequired
(int size, int alignmentSize) Calculates the amount of padding needed.
-
构造器详细资料
-
FontMath
private FontMath()
-
-
方法详细资料
-
log2
public static int log2(int a) -
paddingRequired
public static int paddingRequired(int size, int alignmentSize) Calculates the amount of padding needed. The values provided need to be in the same units. So, if the size is given as the number of bytes then the alignment size must also be specified as byte size to align to.- 参数:
size
- the size of the data that may need paddingalignmentSize
- the number of units to align to- 返回:
- the number of units needing to be added for alignment
-