parrotcode: Parrot class representing images in Parrot SDL | |
Contents | Libraries |
SDL::Image - Parrot class representing images in Parrot SDL
# load this library
load_bytecode 'library/SDL/Image.pir'
# create a new SDL::Image object
.local pmc image
image = new 'SDL::Image'
image.'init'( file => 'examples/sdl/parrot_small.png' )
# blit and update this object as you like!
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.
An SDL::Image object has the following methods:
file
containing the path to a file to load, loads the image.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 (C) 2004-2008, The Perl Foundation.
|