User Tools

Site Tools


Pixmap

DAZScript wrapper for QPixmap.

More...

Inherits :

Properties

Constructors

DAZ Script
Pixmap ()
Pixmap ( Pixmap pixmap )
Pixmap ( String filename )

Methods

DAZ Script
voidfill ( Color color )
voidfromImage ( Image image )
BooleanisNull ()
voidload ( String filename )
BooleanloadFromData ( ByteArray data, String format=“” )
voidresize ( Number width, Number height )
voidresize ( Size size )
voidsave ( String filename )
ImagetoImage ()

Detailed Description

This is the DAZScript counterpart to the QPixmap type used in the DAZ Studio SDK.

Attention:

  • Inheritance will change to Object in a pending update.

Properties


Number : depth

The color depth of the pixmap (Read-Only)


Number : height

The height of the pixmap in pixels (Read-Only)


Rect : rect

The enclosing rectangle of the pixmap in pixels (Read-Only)


Size : size

The size of the pixmap (Read-Only)


Number : width

The width of the pixmap in pixels (Read-Only)

Constructors


Pixmap()

Default Constructor.


Pixmap( Pixmap pixmap )

Copy Constructor.

Parameter(s):

  • pixmap - The Pixmap to copy.

Pixmap( String filename )

Parameter(s):

  • filename - The name of the file to load the pixmap's data from.

Methods


void : fill( Color color )

Fills the pixmap with color.

Parameter(s):

  • color - The color to set all the pixels in the pixmap.

void : fromImage( Image image )

Parameter(s):

  • image - The image to convert.

See Also:

Since:

  • 4.9.3.105

Boolean : isNull()

Gets whether or not the pixmap is Null.

Return Value:

  • true if this is a Null (empty) pixmap, false if the pixmap has data.

void : load( String filename )

Loads data into the pixmap from a file.

Parameter(s):

  • filename - The name of the file to load into the pixmap.

Boolean : loadFromData( ByteArray data, String format=“” )

Loads data into the pixmap from a byte array using the specified format.

Parameter(s):

  • data - The binary data to load into the pixmap.
  • format - The file format of the bytes in data; i.e. “PNG”.

Return Value:

  • true if the data was loaded, otherwise false. (since 4.10.0.88)

void : resize( Number width, Number height )

Resizes the pixmap.

Parameter(s):

  • width - The new width for the pixmap.
  • height - The new height for the pixmap.

void : resize( Size size )

Resizes the pixmap.

Parameter(s):

  • size - The new size for the pixmap.

void : save( String filename )

Saves the pixmap to a file.

Parameter(s):

  • filename - The name of the file to save the pixmap to.

Image : toImage()

Return Value:

  • The pixmap converted to an image, or null if the conversion fails.

See Also:

Since:

  • 4.9.3.105