Skip to content

Commit

Permalink
ImageList: Add DrawPixels
Browse files Browse the repository at this point in the history
  • Loading branch information
lxn committed Nov 6, 2019
1 parent b225e7d commit 2d27b5f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions imagelist.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ func (il *ImageList) AddImage(image interface{}) (int32, error) {
}
}

func (il *ImageList) DrawPixels(canvas *Canvas, index int, bounds Rectangle) error {
if !win.ImageList_DrawEx(il.hIml, int32(index), canvas.hdc, int32(bounds.X), int32(bounds.Y), int32(bounds.Width), int32(bounds.Height), win.CLR_DEFAULT, win.CLR_DEFAULT, win.ILD_NORMAL) {
return newError("ImageList_DrawEx")
}

return nil
}

func (il *ImageList) Dispose() {
if il.hIml != 0 {
win.ImageList_Destroy(il.hIml)
Expand Down

0 comments on commit 2d27b5f

Please sign in to comment.