RelativeRectangle

RelativeRectangle

概述

RelativeRectangle 是 Aspose.3D FOSS 中用于 Java 的一个类。继承自:Struct<RelativeRectangle>,Serializable。

相对矩形 将相对组件转换为绝对值的公式为:Scale *(Reference Width)+ offset。因此,如果我们希望它表示绝对值,请将所有 scale 字段设为零,并改用 offset 字段。

此类提供了 25 种方法用于在 Java 程序中处理 RelativeRectangle 对象。可用的方法包括:RelativeRectangle、clone、copyFrom、equals、fromScale、getOffsetHeight、getOffsetWidth、getOffsetX、getOffsetY、getScaleHeight、getScaleWidth、getScaleX,以及另外 12 种方法。安装 Aspose.3D FOSS for Java 包后,所有公共成员对任何 Java 应用程序均可访问。属性:offsetHeight、offsetWidth、offsetX、offsetY、scaleHeight、scaleWidth,以及另外 2 项。

属性

名称类型访问描述
scaleXfloat读取相对坐标 X @return 相对坐标 X /
scaleYfloat读取相对坐标 Y @return 相对坐标 Y /
scaleWidthfloat读取相对宽度 @return 相对宽度 /
scaleHeightfloat读取相对高度 @return 相对高度 /
offsetXint读取获取坐标 X 的偏移量 @return 坐标 X 的偏移量 /
offsetYint读取获取坐标 Y 的偏移量 @return 坐标 Y 的偏移量 /
offsetWidthint读取获取宽度的偏移量 @return 宽度的偏移量
offsetHeightint读取获取高度的偏移量 @return 高度的偏移量 /

方法

签名描述
RelativeRectangle()在此 RelativeRectangle 实例上调用 RelativeRectangle。
RelativeRectangle(left: int, top: int, width: int, height: int)在此 RelativeRectangle 实例上调用 RelativeRectangle(left, top, width, height)。
getScaleX() → float相对坐标 X @return 相对坐标 X /
setScaleX(value: float)相对坐标 X @param value 新值 /
getScaleY() → float相对坐标 Y @return 相对坐标 Y /
setScaleY(value: float)相对坐标 Y @param value 新值 /
getScaleWidth() → float相对宽度 @return Relative width /
setScaleWidth(value: float)相对宽度 @param value 新值 /
getScaleHeight() → float相对高度 @return Relative height /
setScaleHeight(value: float)相对高度 @param value 新值 /
getOffsetX() → int获取坐标 X 的偏移量 @return 坐标 X 的偏移量 /
setOffsetX(value: int)设置坐标 X 的偏移量 @param value 新的值
getOffsetY() → int获取坐标 Y 的偏移量 @return 坐标 Y 的偏移量 /
setOffsetY(value: int)设置 Y 坐标的偏移量 @param value 新值
getOffsetWidth() → int获取宽度的偏移量 @return 宽度的偏移量
setOffsetWidth(value: int)设置宽度的偏移 @param value 新值
getOffsetHeight() → int获取高度的偏移量 @return 高度的偏移量 /
setOffsetHeight(value: int)设置高度的偏移量 @param value 新值
toAbsolute(left: int, top: int, width: int, height: int) → Rect将相对矩形转换为绝对矩形 @param left 矩形的左边 @param top 矩形的顶部 @param width 矩形的宽度 @param height 矩形的高度 @r
fromScale(scaleX: float, scaleY: float, scaleWidth: float, scaleHeight: float) → RelativeRectangle使用所有偏移字段为零、缩放字段来自给定参数的方式构造一个 RelativeRectangle。
toString() → String对该 RelativeRectangle 实例调用 toString。
clone() → RelativeRectangle在此 RelativeRectangle 实例上调用 clone。
copyFrom(src: RelativeRectangle)在此 RelativeRectangle 实例上调用 copyFrom(src)。
hashCode() → int在此 RelativeRectangle 实例上调用 hashCode。
equals(obj: Object) → boolean在此 RelativeRectangle 实例上调用 equals(obj)。

另请参阅

 中文