-
Notifications
You must be signed in to change notification settings - Fork 8
Pen
Christopher Nikkel edited this page Dec 23, 2018
·
2 revisions
type Pen =
{
Color: Color;
Opacity: float option;
Width: Length option;
}
Pen
is used to specify the color, opacity, and width for styles. It uses Color and Length to describe its attributes.
Constant | Type | Description |
---|---|---|
Pen.red |
Pen | a red Pen |
Pen.green |
Pen | a green Pen |
Pen.blue |
Pen | a blue Pen |
Pen.black |
Pen | a black Pen |
Pen.gray |
Pen | a gray Pen |
Pen.white |
Pen | a white Pen |
Pen.yellow |
Pen | a yellow Pen |
Pen.purple |
Pen | a purple Pen |
Pen.orange |
Pen | an orange Pen |
Function | Signature | Description |
---|---|---|
Pen.create |
Color -> Pen |
creates a Pen with the specified Color |
createWithOpacity |
Color -> float -> Pen |
creates a Pen with the specified Color and opacity |
createWithWidth |
Length -> Pen |
creates a Pen with the specified width as a Length |
createWithOpacityAndWidth |
float -> Length -> Pen |
creates a Pen with the specified Color, opacity, and width as a Length |
withOpacity |
float -> Pen -> Pen |
adds an opacity to a Pen |
withWidth |
Length -> Pen -> Pen |
adds width to a Pen |
let pen1 =
Pen.createWithOpacityAndWidth (Color.ofName Colors.Aqua) 5.0 Length.one