package Object::WhatsThis; use strict; use warnings; use Object; our(@ISA); @ISA = qw(Object); sub draw { my $self = shift; my $img = $self->{image}; my ($x, $y) = fuzzy(20, 100, 100); my $height = fuzzy(15, 55); my $width = fuzzy(10, $height/1.5); my $speaker_height = fuzzy(4,13); my $speaker_width = fuzzy(5,15); $img->rectangle($x-$width-$speaker_width,$y+$speaker_height,$x+$width+$speaker_width,$y-$speaker_height,$self->{fg}); $img->filledRectangle($x-$width,$y,$x+$width,$y+$height,$self->{bg}); $img->rectangle($x-$width,$y,$x+$width,$y+$height,$self->{fg}); my $e = $width/8; my $bgn = $x-$width + 4.5 * $e; my $bgny = $y + $height/3; $img->rectangle($bgn,$bgny,$bgn+$e,$bgny+$e,$self->{fg}); $img->rectangle($bgn+2*$e,$bgny,$bgn+3*$e,$bgny+$e,$self->{fg}); $img->rectangle($bgn+4*$e,$bgny,$bgn+5*$e,$bgny+$e,$self->{fg}); $img->rectangle($bgn,$bgny+2*$e,$bgn+$e,$bgny+3*$e,$self->{fg}); $img->rectangle($bgn+2*$e,$bgny+2*$e,$bgn+3*$e,$bgny+3*$e,$self->{fg}); $img->rectangle($bgn+4*$e,$bgny+2*$e,$bgn+5*$e,$bgny+3*$e,$self->{fg}); $img->rectangle($bgn,$bgny+4*$e,$bgn+$e,$bgny+5*$e,$self->{fg}); $img->rectangle($bgn+2*$e,$bgny+4*$e,$bgn+3*$e,$bgny+5*$e,$self->{fg}); $img->rectangle($bgn+4*$e,$bgny+4*$e,$bgn+5*$e,$bgny+5*$e,$self->{fg}); $img->rectangle($x-$width,$y,$x+$width,$y+$height,$self->{fg}); $img->rectangle($x-$width,$y,$x+$width,$y+$height,$self->{fg}); $img->rectangle($x-$width,$y,$x+$width,$y+$height,$self->{fg}); $img->rectangle($x-$width,$y,$x+$width,$y+$height,$self->{fg}); $img->rectangle($x-$width,$y,$x+$width,$y+$height,$self->{fg}); $img->rectangle($x-$width,$y,$x+$width,$y+$height,$self->{fg}); }