Class SliceSettings
Definition
Namespace: StardewUI.Graphics
Assembly: StardewUI.dll
Additional nine-slice settings for dealing with certain "unique" structures.
Inheritance
Object ⇦ SliceSettings
Implements
IEquatable<SliceSettings>
Members
Constructors
| Name | Description |
|---|---|
| SliceSettings(Int32?, SliceCenterPosition, Int32?, SliceCenterPosition, Single, Boolean) | Additional nine-slice settings for dealing with certain "unique" structures. |
Properties
| Name | Description |
|---|---|
| CenterX | The X position to use for the horizontal center slices, or null to start where the left fixed edge ends. |
| CenterXPosition | Specifies whether the CenterX should be understood as the start position or the end position of the horizontal center slice. |
| CenterY | The Y position to use for the vertical center slices, or null to start where the top fixed edge ends. |
| CenterYPosition | Specifies whether the CenterY should be understood as the start position or the end position of the vertical center slice. |
| EdgesOnly | If true, then only the outer 8 edge segments should be drawn, and the 9th (horizontal and vertical middle, i.e. "background") segment will be ignored. |
| EqualityContract | |
| Scale | Scale to apply to the slices themselves; for example, if a 16x16 source draws to a 64x64 target, and a scale of 2 is used, then a 2x3 border slice would draw as 16x24 (normal 8x16, multiplied by 2). |
Methods
| Name | Description |
|---|---|
| WithScale(Single) | Creates a copy of this SliceSettings with a different scale. |
Details
Constructors
SliceSettings(int?, SliceCenterPosition, int?, SliceCenterPosition, float, bool)
Additional nine-slice settings for dealing with certain "unique" structures.
public SliceSettings(int? CenterX, StardewUI.Graphics.SliceCenterPosition CenterXPosition, int? CenterY, StardewUI.Graphics.SliceCenterPosition CenterYPosition, float Scale, bool EdgesOnly);
Parameters
CenterX Nullable<Int32>
The X position to use for the horizontal center slices, or null to start where the left fixed edge ends.
CenterXPosition SliceCenterPosition
Specifies whether the CenterX should be understood as the start position or the end position of the horizontal center slice.
CenterY Nullable<Int32>
The Y position to use for the vertical center slices, or null to start where the top fixed edge ends.
CenterYPosition SliceCenterPosition
Specifies whether the CenterY should be understood as the start position or the end position of the vertical center slice.
Scale Single
Scale to apply to the slices themselves; for example, if a 16x16 source draws to a 64x64 target, and a scale of 2 is used, then a 2x3 border slice would draw as 16x24 (normal 8x16, multiplied by 2).
EdgesOnly Boolean
If true, then only the outer 8 edge segments should be drawn, and the 9th (horizontal and vertical middle, i.e. "background") segment will be ignored.
Properties
CenterX
The X position to use for the horizontal center slices, or null to start where the left fixed edge ends.
Property Value
CenterXPosition
Specifies whether the CenterX should be understood as the start position or the end position of the horizontal center slice.
Property Value
CenterY
The Y position to use for the vertical center slices, or null to start where the top fixed edge ends.
Property Value
CenterYPosition
Specifies whether the CenterY should be understood as the start position or the end position of the vertical center slice.
Property Value
EdgesOnly
If true, then only the outer 8 edge segments should be drawn, and the 9th (horizontal and vertical middle, i.e. "background") segment will be ignored.
Property Value
EqualityContract
Property Value
Scale
Scale to apply to the slices themselves; for example, if a 16x16 source draws to a 64x64 target, and a scale of 2 is used, then a 2x3 border slice would draw as 16x24 (normal 8x16, multiplied by 2).
Property Value
Methods
WithScale(float)
Creates a copy of this SliceSettings with a different scale.
Parameters
newScale Single
The scale to use.
Returns
A copy of this SliceSettings with its Scale set to newScale.