Represents the a rounded corner of a border. This works by creating two sections - the "inverse" border and the border itself. The inverse border is essentially a series of transparent whose purpose is just to affect the depth buffer.
Public Member Functions | |
RoundCorner (RoundedCorners roundCorners, RoundCornerPosition position) | |
Creates a new rounded corner in the given position. More... | |
void | RecomputeInnerArc () |
Recomputes the inner arc. The inner arc is special because it depends on border width. The two borders that this corner connects may be different widths, so it may have to transition from one thickness to another. More... | |
void | RenderInverse (float cornerX, float cornerY) |
Renders the inverse of this corner for the border. More... | |
void | Render (float alpha, float cornerX, float cornerY) |
Public Attributes | |
int | ToIndex |
The edge index that this corner goes to. More... | |
int | FromIndex |
The edge index that this corner goes from. More... | |
int | CornerRadius |
The radius of this corner. More... | |
BorderProperty | Border |
The border this corner belongs to. More... | |
int | InverseBlocksRequired |
The number of inverse blocks required. More... | |
RoundedCorners | RoundCorners |
The parent round corners set. More... | |
RoundCornerPosition | Position |
The position of this corner (e.g. top left). More... | |
RoundBorderInverseProperty | InverseBorder |
The inverse property which inverse fragments are rendered to. More... | |
Static Public Attributes | |
static int | Resolution =4 |
The amount of pixels per section of the corner. The lower this is, the smoother the corner (but the lower the performance). Below this, micro resolution is used instead. More... | |
static int | MicroResolution =1 |
The corner resolution if a corner radius is equal to resolution or lower. More... | |
Properties | |
int | Radius [get, set] |
The radius of this corner. More... | |
Private Member Functions | |
void | RecomputeArcs () |
Recomputes both arcs simultaneously. More... | |
Private Attributes | |
Vector2[] | OuterArc |
How far the outer arc is from the corner of the original box at each block. Note that this is always round; One axis is CornerRadius-theOtherAxis. More... | |
Vector2[] | InnerArc |
How far the inner arc is from the corner of the original box at each block. More... | |
int | BlocksRequired |
The number of blocks (fragments of the curve; translate directly to MeshBlocks) that this corner is constructed of. More... | |
|
inline |
Creates a new rounded corner in the given position.
|
inlineprivate |
Recomputes both arcs simultaneously.
|
inline |
Recomputes the inner arc. The inner arc is special because it depends on border width. The two borders that this corner connects may be different widths, so it may have to transition from one thickness to another.
|
inline |
|
inline |
Renders the inverse of this corner for the border.
|
private |
The number of blocks (fragments of the curve; translate directly to MeshBlocks) that this corner is constructed of.
BorderProperty PowerUI.Css.RoundCorner.Border |
The border this corner belongs to.
int PowerUI.Css.RoundCorner.CornerRadius |
The radius of this corner.
int PowerUI.Css.RoundCorner.FromIndex |
The edge index that this corner goes from.
|
private |
How far the inner arc is from the corner of the original box at each block.
int PowerUI.Css.RoundCorner.InverseBlocksRequired |
The number of inverse blocks required.
RoundBorderInverseProperty PowerUI.Css.RoundCorner.InverseBorder |
The inverse property which inverse fragments are rendered to.
|
static |
The corner resolution if a corner radius is equal to resolution or lower.
|
private |
How far the outer arc is from the corner of the original box at each block. Note that this is always round; One axis is CornerRadius-theOtherAxis.
RoundCornerPosition PowerUI.Css.RoundCorner.Position |
The position of this corner (e.g. top left).
|
static |
The amount of pixels per section of the corner. The lower this is, the smoother the corner (but the lower the performance). Below this, micro resolution is used instead.
RoundedCorners PowerUI.Css.RoundCorner.RoundCorners |
The parent round corners set.
int PowerUI.Css.RoundCorner.ToIndex |
The edge index that this corner goes to.
|
getset |
The radius of this corner.