! Copyright (C) 2009 Joe Groff, Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
+! See https://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.data kernel combinators
sequences math windows.gdi32 windows.types images
destructors accessors fry locals classes.struct ;
: (bitmap-info) ( dim -- BITMAPINFO )
[
- BITMAPINFO <struct>
+ BITMAPINFO new
dup bmiHeader>>
BITMAPINFOHEADER heap-size >>biSize
] dip
[ nip ]
[
swap (bitmap-info) DIB_RGB_COLORS { void* }
- [ f 0 CreateDIBSection ] [ ] with-out-parameters
+ [ f 0 CreateDIBSection ] with-out-parameters
] 2bi
[ [ SelectObject drop ] keep ] dip ;