|Home | Tutorial | Classes | Functions | QSA Workbench | Language | Qt API | QSA Articles Qt Script for Applications

[Prev: Font] [Home] [Next: Built-in Variables and Constants]

Pixmap

The Pixmap can be used to represent images in QSA. Instances of Pixmap can be passed to C++ slots that take arguments of type QPixmap.

The Pixmap constructor can take a filename referring to an image that will then be loaded:

 
var background = new Pixmap( "background.png" );
Pixmap Properties
width

The width of the pixmap. This value is read only.

height

The height of the pixmap. This value is read only.

rect

The enclosing rectangle (0, 0, width, height) of the pixmap. This value is read only.

size

The size of the rectangle. This value is read only.

depth

The depth of the pixmap. The pixmap depth is also called bits per pixel (bpp) or bit planes of a pixmap. A null pixmap has depth 0. This value is read only.

Pixmap Functions
isNull

isNull()

Returns true if this is a null pixmap; otherwise returns false. A null pixmap has zero width, zero depth, and no contents.

fill

fill( color )

Fills the pixmap with the specified color.

resize

resize( size : Size )

resize( width : Number, height : Number )

Resizes the pixmap to the specified dimensions.

load

load( filename )

Loads the specified filename into the pixmap.

save( filename )

Saves the pixmap to the specified filename.

[Prev: Font] [Home] [Next: Built-in Variables and Constants]


Copyright © 2001-2003 TrolltechTrademarks
QSA version 1.0.1