CanvasStyle
Syntax
interface CanvasStyle {
border?: string;
background?: string;
cursor?: Cursor;
}
Attributes
border
The border style of canvas.
The border style contains three parts, borderWidth, borderStyle and borderColor.
Only takes effect when set borderWidth, borderStyle and borderColor at the same time.
borderWidth only supports px
unit.
borderStyle only supports dashed
, solid
.
Example
border: "2px dashed red",
background
The background style of canvas.
Example
background: "rgba(255,255,255,0)",
cursor
The cursor style.
A Cursor
can be one of types below. For detailed info, please refer to CSS-cursor.
type Cursor = "auto" | "default" | "none" | "context-menu" | "help" | "pointer" | "progress" | "wait" | "cell" | "crosshair" | "text" | "vertical-text" | "alias" | "copy" | "move" | "no-drop" | "not-allowed" | "e-resize" | "n-resize" | "ne-resize" | "nw-resize" | "s-resize" | "se-resize" | "sw-resize" | "w-resize" | "ns-resize" | "ew-resize" | "nesw-resize" | "col-resize" | "nwse-resize" | "row-resize" | "all-scroll" | "zoom-in" | "zoom-out" | "grab" | "grabbing";