FXImage

Image class


FXImage(a, pix=None, opts=0, w=1, h=1)

Create an image.

ArgumentTypeDefaultDescription
aFXApp  
pix None 
optsInt0 
wInt1 
hInt1 


blend(color, sharpen=True)

Blends the icon with the specified color; should only be used on icons that support an alpha channel, for example, PNG.

ArgumentTypeDefaultDescription
colorFXColor  
sharpenBoolTrue 


create()

Create image resource.

Reimplemented from FXId.

Reimplemented in FXIcon.


destroy()

Destroy image resource.

Reimplemented from FXId.

Reimplemented in FXIcon.


detach()

Detach image resource.

Reimplemented from FXId.

Reimplemented in FXIcon.


getOptions()

To get to the option flags.


getPixel(x, y)

Get pixel at x,y.

ArgumentTypeDefaultDescription
xInt  
yInt  


render()

Render the image from client-side pixel buffer.

Reimplemented in FXIcon.


resize(w, h)

Resize pixmap to the specified width and height.

Reimplemented from FXDrawable.

Reimplemented in FXIcon.

ArgumentTypeDefaultDescription
wInt  
hInt  


scale(w, h)

Rescale pixels image to the specified width and height.

ArgumentTypeDefaultDescription
wInt  
hInt  


setPixel(x, y, color)

Change pixel at x,y.

ArgumentTypeDefaultDescription
xInt  
yInt  
colorFXColor  


Global flags

Image rendering hints

IMAGE_KEEP

Keep pixel data in client.

IMAGE_OWNED

Pixel data is owned by image.

IMAGE_DITHER

Dither image to look better.

IMAGE_NEAREST

Turn off dithering and map to nearest color.

IMAGE_ALPHA

Data has alpha channel.

IMAGE_OPAQUE

Force opaque background.

IMAGE_ALPHACOLOR

Override transparancy color.

IMAGE_SHMI

Using shared memory image.

IMAGE_SHMP

Using shared memory pixmap.

IMAGE_ALPHAGUESS

Guess transparency color from corners.