parrotcode: Parrot class representing rectangles in Parrot SDL | |
Contents | Libraries |
SDL::Rect - Parrot class representing rectangles in Parrot SDL
# load this library
load_bytecode 'library/SDL/Rect.imc'
# create a new SDL::Rect object
.local pmc rect
.local int rect_type
find_type rect_type, 'SDL::Rect'
rect = new rect_type
# set some arguments for this SDL::Rect
.local pmc rect_args
new rect_args, .PerlHash
rect_args[ 'x' ] = 270
rect_args[ 'y' ] = 190
rect_args[ 'height' ] = 100
rect_args[ 'width' ] = 100
# now set the arguments on the object
rect.'_new'( rect_args )
# ... and blit to or fill surfaces with this object!
The SDL::Rect class represents rects in SDL. SDL::Rect objects represent sources and destinations for filling and blitting to and from SDL::Surface objects.
An SDL::Rect object has the following methods:
SDL_Rect
. You'll probably never need to call this directly, unless you're using raw SDL functions.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, The Perl Foundation.
|