Developer

API Reference

ImageParm

Brew Release
Brew MP 1.0.2
See Also
None
Description
This data type defines a data structure used to access the individual attributes of a bitmap image. These attributes indicate how the bitmap will be displayed or how it will behave. For example, the size and position of an image are each separately represented by image attributes, as are the rate of animation and the destination display.
ImageParam is, essentially, the basis for a parameter block interface for setting or retrieving each attribute. The data structure itself defines a single image attribute -- identifying the attribute being accessed and up to two arguments that together define the value for that parameter. To illustrate, the image size is identified by the IPARM_SIZE parameter, with the horizontal width and vertical height being the arguments of that parameter. Likewise, to specify how the bitmap is to be transferred to the display, the data structure would identify IPARM_ROP as the attribute parameter, with the raster operation to be performed passed as the lone argument.
Each image parameters is discussed in detail in AEEImage.h.
Members
  • parm:  Identifies the image parameter to be set or retrieved.  The meaning of 'arg1'
              and 'arg2' depends on the parameter being accessed.  See AEEImage.h for the
              complete list of image parameters.
  • arg1:  Identifies the first parameter argument.  The meaning of this argument is
              dependent on the attribute defined in the 'parm' field.  For example, when
              'parm' is set to IPARM_SIZE, 'arg1' contains the horizontal width of the image.
              However, when 'parm' is set to IPARM_OFFSET, 'arg1' contains the horizontal
              position where the image is to be displayed within its graphics port.
  • arg2:  Identifies the second parameter argument.  The meaning of this argument is
              dependent on the attribute defined in the 'parm' field.  For example, when
              'parm' is set to IPARM_SIZE, 'arg2' contains the vertical height of the image.
              However, when 'parm' is set to IPARM_OFFSET, 'arg2' contains the vertical
              position where the image is to be displayed within its graphics port.
    
Definition
   typedef struct {
      int  parm;
      int  arg1;
      int  arg2;
   } ImageParm;
Comment
Though ImageParm is primarily used to set the value of a given image attribute, it can also be used to retrieve various values. For example, the AEERasterOp associated with an image may be retrieved by setting 'parm' to IPARM_GETROP. When the widget receives an EVT_WDG_SETPROPERTY event identifying PROP_IMAGE_PARM as the property to be set, the image widget will actually interpret this event as a request to retrieve the underlying image's AEERasterOp, and will return a pointer to the AEERasterOp, as well as a result code, in the 'arg1' and 'arg2' fields of the ImageParm data structure passed in with the event.
See AEEImage.h for a complete discussion of the parameters and value arguments that define each image attribute.
  • Follow