Color of a screen pixel: Difference between revisions
m
Fix Perl 6 -> Raku calling conventions
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
Thundergnat (talk | contribs) m (Fix Perl 6 -> Raku calling conventions) |
||
Line 811:
=={{header|Raku}}==
(formerly Perl 6)
This example works with MacOS, customize with the appropriate <tt>screencapture</tt> utility for other OSes.
<lang perl6>use GD::Raw;
Line 835 ⟶ 836:
Alternately, a version that should work in any X11 environment. Needs X11::xdo and MagickWand installed.
<lang perl6>signal(SIGINT).tap: { sleep .1; cleanup(); print "\n" xx 50, "\e[H\e[J"; exit(0) }▼
▲signal(SIGINT).tap: { sleep .1; cleanup(); print "\n" xx 50, "\e[H\e[J"; exit(0) }
multi MAIN () {
|