Skip to content

Commit

Permalink
Update and add required documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed May 22, 2018
1 parent 2187255 commit 82bd48c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/canvas/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ func (r *Image) MinSize() ui.Size {
return ui.NewSize(1, 1)
}

// NewImage returns a new Image instance
// NewRaster returns a new Image instance that is rendered dynamically using
// the specified pixelColor function
func NewRaster(pixelColor func(x, y, w, h int) color.RGBA) *Image {
return &Image{
PixelColor: pixelColor,
Expand Down
3 changes: 3 additions & 0 deletions ui/input/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ type KeyCode int
type Modifier int

const (
// ShiftModifier represents a shift key being held
ShiftModifier Modifier = 1 << iota
// ControlModifier represents the ctrl key being held
ControlModifier
// AltModifier represents either alt keys being held
AltModifier
)

0 comments on commit 82bd48c

Please sign in to comment.