diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-30 01:15:28 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-30 01:15:28 -0400 |
| commit | 4f16b9438877d353e52870cb3631509bd0677da9 (patch) | |
| tree | 41aec2030b2b837a6e5aef94e9233fa4e89b9716 /redo/area_windows.go | |
| parent | 432a210726f2c5b753ff430765e9b3736d8db3b2 (diff) | |
Fixed image lists on Windows being NON-premultiplied.
Diffstat (limited to 'redo/area_windows.go')
| -rw-r--r-- | redo/area_windows.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/redo/area_windows.go b/redo/area_windows.go index d2e13e4..e5e8ac0 100644 --- a/redo/area_windows.go +++ b/redo/area_windows.go @@ -118,10 +118,11 @@ func doPaint(xrect *C.RECT, hscroll C.int, vscroll C.int, data unsafe.Pointer, d } //export dotoARGB -func dotoARGB(img unsafe.Pointer, ppvBits unsafe.Pointer) { +func dotoARGB(img unsafe.Pointer, ppvBits unsafe.Pointer, toNRGBA C.BOOL) { i := (*image.RGBA)(unsafe.Pointer(img)) + t := toNRGBA != C.FALSE // the bitmap Windows gives us has a stride == width - toARGB(i, uintptr(ppvBits), i.Rect.Dx() * 4) + toARGB(i, uintptr(ppvBits), i.Rect.Dx() * 4, t) } //export areaWidthLONG |
