Skinning with common shapes
Feathers UI offers a number of built-in skin classes that draw common shapes using OpenFL's Graphics API. The border and fill of these skins may be easily customized with solid colors, gradients, and bitmaps. These skins automatically redraw themselves when resized or when the state of their parent component changes.
Skinning in Feathers UI is not limited to the classes described below. If you need something a little more powerful, consider subclassing the
ProgrammaticSkinclass and drawing you own custom graphics. Additionally, any OpenFL display object may be used as a skin, so you can use primitives likeBitmaporSprite, if you prefer.
Shape skins
CircleSkinrenders as a circle.DonutSkinrenders as a circle with its center cut out.EllipseSkinrenders as an ellipse.HorizontalLineSkinrenders as a single horizontal line, which may be aligned to the top, middle, or bottom.LeftAndRightBorderSkinrenders as a rectangle, with the border on the left and right edges only.PillSkinrenders similarly to a "pill", with semi-circle "caps" on the edges of a rectangle in the center.RectangleSkinrenders as a rectangle or square, with optional rounded corners.TabSkinrenders as a tab, which is a rectangle with two rounded corners along the same edge.TopAndBottomBorderSkinrenders as a rectangle, with the border on the top and bottom edges only.TriangleSkinrenders as a triangle, with the option to omit the border on one of its sides.UnderlineSkinrenders as a rectangle, with the border on the bottom edge only.VerticalLineSkinrenders as a single vertical line, which may be aligned to the left, center, or right.
Fill
The FillStyle enum is used to customize the shape's fill appearance.
SolidColordisplays the fill as a solid color. Its parameters are passed to theGraphics.beginFill()method.Gradientdisplays the fill as a gradient. Its parameters are passed to theGraphics.beginGradientFill()method.Bitmapdisplays the fill usingBitmapData. Its parameters are passed to theGraphics.beginBitmapFill()method.
Border
The LineStyle enum is used to customize the shape's border appearance.
SolidColordisplays the border using a solid color. Its parameters are passed to theGraphics.lineStyle()method.Gradientdisplays the border as a gradient. Its parameters are passed to theGraphics.lineGradientStyle()method.Bitmapdisplays the border usingBitmapData. Its parameters are passed to theGraphics.lineBitmapStyle()method.