getWidth
getWidth: (Dimension) -> numberThe width.
Dimension.new(…)
client:getRealDimensions()
client:getStretchedDimensions()| Method | Returns | Description |
|---|---|---|
getWidth() | number | The width. |
getHeight() | number | The height. |
equals(any) | boolean | Whether other is a Dimension of the same width and height; false for anything else. == is identity: the same object. |
new(number, number) | Dimension | (number, number) -> Dimension: A width by height size. |
new() | Dimension |
| Field | Type | Description |
|---|---|---|
width | number | The width, a public field: writable (d.width = 5), and seen by every holder of this object. |
height | number | The height, a public field: writable (d.height = 5), and seen by every holder of this object. |
| Method | Returns | Description |
|---|---|---|
Client.getRealDimensions | Dimension | The canvas size: the window over the client's own UI scale (its "UiScaling" setting), raised to keep 765 × 503 at the window's aspect. Whil… |
Client.getStretchedDimensions | Dimension | The size the canvas is drawn at, in the units a plugin sees: the canvas size, as getRealDimensions(). The client stretches its canvas to… |
Component.getMaximumSize | Dimension | The maximum size (the native member). |
Component.getMinimumSize | Dimension | The minimum size (the native member). |
Component.getPreferredSize | Dimension | The preferred size: the size set with setPreferredSize, else the look's or the layout's, else Component's default. The native member: a… |
Component.getSize | Dimension | The size, as a new Dimension. |
DimensionClass.new | Dimension | (number, number) -> Dimension: A width by height size. |
JViewport.getExtentSize | Dimension | The visible part's size. |
Overlay.getPreferredSize | Dimension? | The preferred size, or nil: the very Dimension given to setPreferredSize, until the user resizes or resets the overlay; then the one th… |
Overlay.render | Dimension? | Draws the overlay with graphics (translated to the overlay's location, in the font its position calls for) and answers its size, or nil.… |
PanelComponent.getPreferredSize | Dimension? | getPreferredSize(). |
Rectangle.getSize | Dimension | The size, as a new Dimension. |
RenderableEntity.render | Dimension? | render(graphics): draw on graphics and answer the size drawn, or nil. An exception the component throws is a Luau error with its mess… |
getWidthgetWidth: (Dimension) -> numberThe width.
getHeightgetHeight: (Dimension) -> numberThe height.
equalsequals: (Dimension, any) -> booleanWhether other is a Dimension of the same width and height; false for anything else. == is identity: the same object.
newnew: ((number, number) -> Dimension) & (() -> Dimension)(number, number) -> Dimension: A width by height size.
() -> Dimension: A zero size.