NAME

App::MathImage::Image::Base::Wx::DC -- draw into a Wx::DC

SYNOPSIS

use App::MathImage::Image::Base::Wx::DC;
my $image = App::MathImage::Image::Base::Wx::DC->new
                (-dc => $dc);
$image->line (0,0, 99,99, '#FF00FF');
$image->rectangle (10,10, 20,15, 'white');

CLASS HIERARCHY

App::MathImage::Image::Base::Wx::DC is a subclass of Image::Base,

Image::Base
  App::MathImage::Image::Base::Wx::DC

DESCRIPTION

In progress ...

App::MathImage::Image::Base::Wx::DC extends Image::Base to draw into a Wx::DC.

Native Wx::DC does much more than Image::Base but if you have some generic pixel twiddling code for Image::Base then this class lets you point it at a Wx paint for window, printer, etc.

Colour Names

Colour names are anything recognised by Wx::Colour->new(), which means various names like "pink" plus hex #RRGGBB or #RRRRGGGGBBB.

FUNCTIONS

See "FUNCTIONS" in Image::Base for the behaviour common to all Image-Base classes.

$image = App::MathImage::Image::Base::Wx::DC->new (key=>value,...)

Create and return a new image object. A -dc parameter must be given,

$image = App::MathImage::Image::Base::Wx::DC->new
             (-dc => $dc);

Further parameters are applied per set (see "ATTRIBUTES" below).

$image->xy ($x, $y, $colour)

Get or set the pixel at $x,$y.

Getting a pixel is per Wx::DC GetPixel(). In the current code colours are returned in "#RRGGBB" form (wxC2S_HTML_SYNTAX of Wx::Colour).

ATTRIBUTES

-dc (Wx::DC object)

The target dc.

-width, -height (read-only)

The size of the DC's target, as per $dc->GetSize().

SEE ALSO

Wx