An area for viewing an image
PtWidget → PtBasic → PtContainer → PtImageArea
For more information, see the diagram of the widget hierarchy.
<photon/PtImageArea.h>
PtImageArea is an area in which you can display an image. You can select an area, zoom in and out, and scroll if the image is too large to fit in the area. You can optionally display a grid when you've zoomed in past a specified amount.
PtImageArea() can not handle alpha images. |
Resource | C type | Pt type | Default |
---|---|---|---|
Pt_ARG_IMAGEAREA_FLAGS | short | Flag | 0 |
Pt_ARG_IMAGEAREA_GRID_COLOR | PgColor_t | Scalar | Pg_BLACK |
Pt_ARG_IMAGEAREA_GRID_THRESHOLD | long | Scalar | 0 |
Pt_ARG_IMAGEAREA_IMAGE | PhImage_t * | Image | NULL |
Pt_ARG_IMAGEAREA_LEFT | short | Scalar | 0 |
Pt_ARG_IMAGEAREA_SELECTION | PhRect_t | Struct | 0, 0, 0, 0 |
Pt_ARG_IMAGEAREA_TOP | short | Scalar | 0 |
Pt_ARG_IMAGEAREA_ZOOM | long | Scalar | 0 |
Pt_CB_IMAGEAREA_DRAG | PtCallback_t * | Link | NULL |
Pt_CB_IMAGEAREA_MOVEMENT | PtCallback_t * | Link | NULL |
Pt_CB_IMAGEAREA_SCROLLED | PtCallback_t * | Link | NULL |
Pt_CB_IMAGEAREA_SELECTION | PtCallback_t * | Link | NULL |
C type | Pt type | Default |
---|---|---|
short | Flag | 0 |
Flags that control the behavior of the image area:
C type | Pt type | Default |
---|---|---|
PgColor_t | Scalar | Pg_BLACK |
The color of the grid, if displayed. See PgColor_t in the Photon Library Reference.
C type | Pt type | Default |
---|---|---|
long | Scalar | 0 |
The grid threshold, expressed as a fixed-point 16.16 number. If the zooming factor (Pt_ARG_IMAGEAREA_ZOOM) is greater than this threshold, the grid is displayed.
C type | Pt type | Default |
---|---|---|
PhImage_t * | Image | NULL |
A pointer to a PhImage_t structure (see the Photon Library Reference) that defines the image to be displayed in the image area.
C type | Pt type | Default |
---|---|---|
short | Scalar | 0 |
The coordinate, in image pixels, of the left side of the image viewport. This only applies when the image is larger than the widget.
C type | Pt type | Default |
---|---|---|
PhRect_t | Struct | 0, 0, 0, 0 |
A PhRect_t structure (see the Photon Library Reference) that contains the selected area of the image, in image coordinates (pixels).
C type | Pt type | Default |
---|---|---|
short | Scalar | 0 |
The coordinate, in image pixels, of the top side of the image viewport. This only applies when the image is larger than the widget.
C type | Pt type | Default |
---|---|---|
long | Scalar | 0 |
The zooming factor, expressed as a fixed-point 16.16 number.
C type | Pt type | Default |
---|---|---|
PtCallback_t * | Link | NULL |
A list of PtCallback_t structures that define the callbacks invoked when the image area is dragged.
Each callback is passed a PtCallbackInfo_t structure that contains at least the following members:
These callbacks should return Pt_CONTINUE.
C type | Pt type | Default |
---|---|---|
PtCallback_t * | Link | NULL |
A list of PtCallback_t structures that define the callbacks that are invoked when the mouse cursor is moved over the image area.
Each callback is passed a PtCallbackInfo_t structure that contains at least the following members:
These callbacks should return Pt_CONTINUE.
C type | Pt type | Default |
---|---|---|
PtCallback_t * | Link | NULL |
A list of PtCallback_t structures that define the callbacks that are invoked when the image area is scrolled.
Each callback is passed a PtCallbackInfo_t structure that contains at least the following members:
These callbacks should return Pt_CONTINUE.
C type | Pt type | Default |
---|---|---|
PtCallback_t * | Link | NULL |
A list of PtCallback_t structures that define the callbacks invoked when the image area is selected.
Each callback is passed a PtCallbackInfo_t structure that contains at least the following members:
These callbacks should return Pt_CONTINUE.
If the widget modifies an inherited resource, the “Default override” column indicates the new value. This modification affects any subclasses of the widget.