Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Canvas ¶
type Canvas struct {
// contains filtered or unexported fields
}
Canvas represents a 2D surface of a particular size. Coordinates on this surface are zero-based. Point (x:0, y:0) is in the top left corner. Horizontal axis corresponds to X coordinate (grows to the right). Vertical axis corresponds to Y coordinate (grows to the bottom).
Example of a 2x3 canvas: |---------------| | (0,0) | (1,0) | |---------------| | (0,1) | (1,1) | |---------------| | (0,2) | (1,2) | |---------------|
func NewCanvas ¶
NewCanvas allocates a new canvas with the given hight and width. hight and width must be bigger than zero
Click to show internal directories.
Click to hide internal directories.