summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlexander Neumann <an2048@gmail.com>2019-11-06 13:42:13 +0100
committerAlexander Neumann <an2048@gmail.com>2019-11-06 13:42:13 +0100
commit2d27b5fc26bc311542b76133b24e97c2ce2b68e1 (patch)
tree4f01bcb64b852111e8f1bcff883655cd0f161b44
parentEnsure synchronizing layout results of one form doesn't replace results of another form (diff)
downloadwireguard-windows-2d27b5fc26bc311542b76133b24e97c2ce2b68e1.tar.xz
wireguard-windows-2d27b5fc26bc311542b76133b24e97c2ce2b68e1.zip
ImageList: Add DrawPixels
-rw-r--r--imagelist.go8
1 files changed, 8 insertions, 0 deletions
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)