GizmoStyle.java
net.minecraft.gizmos.GizmoStyle
信息
- 全限定名:net.minecraft.gizmos.GizmoStyle
- 类型:public record
- 包:net.minecraft.gizmos
- 源码路径:src/main/java/net/minecraft/gizmos/GizmoStyle.java
- 起始行号:L5
- 职责:
TODO
字段/常量
DEFAULT_WIDTH- 类型:
float - 修饰符:
private static final - 源码定位:
L6 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public static GizmoStyle stroke(int argb) @ L8
- 方法名:stroke
- 源码定位:L8
- 返回类型:GizmoStyle
- 修饰符:public static
参数:
- argb: int
说明:
TODO
public static GizmoStyle stroke(int argb, float width) @ L12
- 方法名:stroke
- 源码定位:L12
- 返回类型:GizmoStyle
- 修饰符:public static
参数:
- argb: int
- width: float
说明:
TODO
public static GizmoStyle fill(int argb) @ L16
- 方法名:fill
- 源码定位:L16
- 返回类型:GizmoStyle
- 修饰符:public static
参数:
- argb: int
说明:
TODO
public static GizmoStyle strokeAndFill(int stroke, float strokeWidth, int fill) @ L20
- 方法名:strokeAndFill
- 源码定位:L20
- 返回类型:GizmoStyle
- 修饰符:public static
参数:
- stroke: int
- strokeWidth: float
- fill: int
说明:
TODO
public boolean hasFill() @ L24
- 方法名:hasFill
- 源码定位:L24
- 返回类型:boolean
- 修饰符:public
参数:
- 无
说明:
TODO
public boolean hasStroke() @ L28
- 方法名:hasStroke
- 源码定位:L28
- 返回类型:boolean
- 修饰符:public
参数:
- 无
说明:
TODO
public int multipliedStroke(float alphaMultiplier) @ L32
- 方法名:multipliedStroke
- 源码定位:L32
- 返回类型:int
- 修饰符:public
参数:
- alphaMultiplier: float
说明:
TODO
public int multipliedFill(float alphaMultiplier) @ L36
- 方法名:multipliedFill
- 源码定位:L36
- 返回类型:int
- 修饰符:public
参数:
- alphaMultiplier: float
说明:
TODO
代码
public record GizmoStyle(int stroke, float strokeWidth, int fill) {
private static final float DEFAULT_WIDTH = 2.5F;
public static GizmoStyle stroke(int argb) {
return new GizmoStyle(argb, 2.5F, 0);
}
public static GizmoStyle stroke(int argb, float width) {
return new GizmoStyle(argb, width, 0);
}
public static GizmoStyle fill(int argb) {
return new GizmoStyle(0, 0.0F, argb);
}
public static GizmoStyle strokeAndFill(int stroke, float strokeWidth, int fill) {
return new GizmoStyle(stroke, strokeWidth, fill);
}
public boolean hasFill() {
return this.fill != 0;
}
public boolean hasStroke() {
return this.stroke != 0 && this.strokeWidth > 0.0F;
}
public int multipliedStroke(float alphaMultiplier) {
return ARGB.multiplyAlpha(this.stroke, alphaMultiplier);
}
public int multipliedFill(float alphaMultiplier) {
return ARGB.multiplyAlpha(this.fill, alphaMultiplier);
}
}引用的其他类
- ARGB
- 引用位置:
方法调用 - 关联成员:
ARGB.multiplyAlpha()
- 引用位置: