Handbook
Glossary
screenshot ( window -- bitmap )
Vocabulary
cap
Inputs
window
a
world
Outputs
bitmap
an
image
Word description
Creates a bitmap image of a UI window.
Notes
If the current
gl-scale-factor
is
2.0
, then the
2x
slot in the resulting
image
will be
t
.
Definition
USING:
accessors
cap.private
images
images.normalization
kernel
math
namespaces
opengl
sequences
;
IN:
cap
::
screenshot
( window -- bitmap )
<image>
gl-scale-factor
get-global
[
2.0
=
>>2x?
]
when*
window
gl-screenshot
>>bitmap
window
dim>>
[
gl-scale
>fixnum
]
map
>>dim
ubyte-components
>>component-type
RGBA
>>component-order
t
>>upside-down?
normalize-image
;