PhImage

PhImage — Information about an image.

Synopsis

class PhImage
{
    bpl;            // integer
    colors;         // integer
    flags;          // char
    format;         // char
    image_tag;      // long
    palette;        // array
    palette_tag;    // long
    size;           // PhDim
    type;           // integer
    xscale;         // integer
    yscale;         // integer
}
		

Description

This class holds information about an image. Any image used in Photon must be an instance of this class.

[Note]

For detailed information, please refer to PhImage in the Photon documentation.

Instance Variables

bpl

An integer specifying the number of bytes per line of the image.

colors

An integer specifying the number of colors of the image.

flags

This instance variable may be a combination of zero or more of the following flags:

ConstantDescription
Pt_HIGHLIGHTEDDraw a beveled border around the widget.
Pt_AUTOHIGHLIGHTAutomatically display/remove the highlight border as the cursor passes over the widget.
Pt_ETCH_HIGHLIGHTDraw a double bevel if Pt_HIGHLIGHTED is on.
Pt_SETMake the widget 'set'. This will invert the coloring on the bevel as well.
Pt_TOGGLEThe widget's SET flag will toggle on each mouse click instead of changing with mouse down/mouse up events.
Pt_SELECTABLEThe widget may be selected, causing Pt_CB_ARM/ACTIVATE/DISARM events.
Pt_GHOSTThe widget is displayed 'ghosted'. This does not affect its response to events.
Pt_BLOCKEDThe widget will be unresponsive to events.
Pt_REALIZEDThe widget is visible on the display.
Pt_CLIP_HIGHLIGHTThe corners of the highlight rectangle are clipped off.
Pt_OPAQUEMakes the widget opaque within its own extent and for everything behind it.
Pt_DELAY_REALIZEThe widget won't be realized except by a call to PtRealizeWidget().
Pt_GETS_FOCUSThe widget may get the keyboard focus.
Pt_MENU_BUTTONMakes the widget a menu item.
Pt_DESTROYEDMarks the widget for destruction.
Pt_DAMAGEDMarks the widget for repairs.
Pt_OBSCUREDThe widget is covered by another widget, or is outside its parent's canvas.
Pt_IN_FLUXA call to PtContainerHold has been made on the widget.
Pt_CLEARKeeps the widget's extent clear of any brothers in front of it.
Pt_DAMAGE_FAMILYThe widget and its children will be repaired.
Pt_SELECT_NOREDRAWThe widget will not redraw when it is selected.
Pt_WIDGET_REBUILDThe widget will be rebuilt once all resources have been changed.
Pt_WIDGET_RESIZEThe widget will be resized once all resources have been changed.
Pt_PROCREATEDThe widget is a procreated child of a compound widget.
Pt_ALL_BUTTONSThe widget treats events on any mouse button as a selection.
Pt_FOCUS_RENDERThe widget will attempt to indicate that it has the keyboard focus through some means.
Pt_CALLBACKS_ACTIVECallbacks for this widget will be called due to changes through code, not just due to user interactions.
Pt_MENUABLEThis widget will respond to the menu button with a Pt_CB_MENU event.
Pt_NOREDRAW_SETNoRedraw Set
Pt_FREE_MEMORYFrees memory associated with widget pointers.
Pt_REGIONForce the widget to have a region ID.
Pt_REALIZINGThe widget is being realized.

format

Not in use.

image_tag

A data tag used for image caching. A value is automatically assigned to this variable when you create an image in PhAB, or load an image with PxLoadImage.

palette

The image palette.

palette_tag

A tag for the palette data.

size

A PhDim specifying the size of the image.

type

The type of graphic. See PgDrawImage in the Photon documentation for details.

xscale

An integer specifying the horizontal scaling factor.

yscale

An integer specifying the vertical scaling factor.