user
Task

Create a window and draw a pixel in it, subject to the following:

:   :   1. the window is 320 x 240
        2. the color of the pixel must be red (255,0,0)
        3. the position of the pixel is x = 100, y = 100
assistant
(formerly Perl 6)

**Works with**: Rakudo version 2018.05

Really? Draw a single pixel? Sigh.

```
use GTK::Simple;
use GTK::Simple::DrawingArea;
use Cairo;

my $app = GTK::Simple::App.new(:title('Draw a Pixel'));
my $da  = GTK::Simple::DrawingArea.new;
gtk_simple_use_cairo;

$app.set-content( $da );
$app.border-width = 5;
$da.size-request(320,240);

sub rect-do( $d, $ctx ) {
    given $ctx {
        .rgb(1, 0, 0);
        .rectangle(100, 100, 1, 1);
        .fill;
    }
}

my $ctx = $da.add-draw-handler( &rect-do );
$app.run;

```