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 | RenderInverse (LayoutBox box, Renderman renderer, float cornerX, float cornerY) |
Renders the inverse of this corner for the border. More... | |
void | Render (LayoutBox box, Renderman renderer, 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... | |
Color | Colour |
The colour of this corner. More... | |
float | 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... | |
Package Attributes | |
Vector2[] | InnerArc |
How far the inner arc is from the corner of the original box at each block. More... | |
Properties | |
float | Radius [get, set] |
The radius of this corner. More... | |
Private Member Functions | |
void | RecomputeArcs (BoxStyle widths) |
Recomputes both arcs simultaneously. More... | |
void | RecomputeInnerArc (BoxStyle widths) |
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... | |
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... | |
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.
|
inlineprivate |
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 Css.RoundCorner.Border |
The border this corner belongs to.
Color Css.RoundCorner.Colour |
The colour of this corner.
float Css.RoundCorner.CornerRadius |
The radius of this corner.
int Css.RoundCorner.FromIndex |
The edge index that this corner goes from.
|
package |
How far the inner arc is from the corner of the original box at each block.
int Css.RoundCorner.InverseBlocksRequired |
The number of inverse blocks required.
RoundBorderInverseProperty 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 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 Css.RoundCorner.RoundCorners |
The parent round corners set.
int Css.RoundCorner.ToIndex |
The edge index that this corner goes to.
|
getset |
The radius of this corner.