Documentation ¶
Overview ¶
Package wandi specifies common interfaces used for window creation, event handling and image drawing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Drawable ¶
type Drawable interface { // Draw draws the entire src image onto the dst image starting at the // destination point dp. Draw(dp image.Point, src Image) (err error) // DrawRect draws a subset of the src image, as defined by the source // rectangle sr, onto the dst image starting at the destination point dp. DrawRect(dp image.Point, src Image, sr image.Rectangle) (err error) }
A Drawable is a mutable collection of pixels.
type Image ¶
type Image interface { // Width returns the width of the image. Width() int // Height returns the height of the image. Height() int }
An Image is a rectangular collection of pixels.
type Window ¶
type Window interface { // Close closes the window. Close() // SetTitle sets the title of the window. SetTitle(title string) // Width returns the width of the window. Width() int // Height returns the height of the window. Height() int // The Drawable interface is implemented by the window. Drawable // Display displays what has been rendered so far to the window. Display() // PollEvent returns a pending event from the event queue or nil if the queue // was empty. Note that more than one event may be present in the event // queue. PollEvent() (event we.Event) }
A Window represents a graphical window capable of handling draw operations and window events.
Click to show internal directories.
Click to hide internal directories.