NAME ^

SDL::Image - Parrot class representing images in Parrot SDL

SYNOPSIS ^

        # load this library
        load_bytecode 'library/SDL/Image.imc'

        # set a filename in a PMC
        .local pmc filename
        new filename, .PerlString
        set filename, 'examples/sdl/parrot_small.png'

        # create a new SDL::Image object
        .local pmc image
        .local int image_type

        find_type image_type, 'SDL::Image'
        image = new image_type, filename

        # blit and update this object as you like!

DESCRIPTION ^

SDL::Image objects represent images loaded from external files. You'll need to have the SDL_image library installed to use this.

This class extends SDL::Surface, so any operations you can do on objects of that class you can do on SDL::Image objects.

METHODS ^

An SDL::Image object has the following methods:

BUILD( filename )

Given the string filename containing the path to a file to load, loads the image.

The name of this method may change, per discussion on p6i.

AUTHOR ^

Written and maintained by chromatic, <chromatic at wgz dot org>, with suggestions from Jens Rieks. Please send patches, feedback, and suggestions to the Perl 6 Internals mailing list.

COPYRIGHT ^

Copyright (c) 2004, The Perl Foundation.


parrot