From 2d27b5fc26bc311542b76133b24e97c2ce2b68e1 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 6 Nov 2019 13:42:13 +0100 Subject: ImageList: Add DrawPixels --- imagelist.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/imagelist.go b/imagelist.go index 5f79a74c..8ef94e9d 100644 --- a/imagelist.go +++ b/imagelist.go @@ -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) -- cgit v1.2.3-59-g8ed1b