Image Object

Parents, Children, Properties, Methods, Events

Purpose: Positions bitmaps and icons within an object.

Description

The Points property specifies the co-ordinates of one or more points at which the specified graphical objects are to be drawn.

The Picture property specifies the name(s) of Bitmap, Icon or Metafile object(s) that are to be drawn. It may be a simple character vector or a vector of vectors.

To draw a single graphic picture, the Picture property is a simple character vector specifying the name of a Bitmap, Icon or Metafile object. Points is either a 2-element vector or a 1-row, 2-column matrix whose elements specify the y-coordinate and x-coordinate respectively at which the object is to be drawn.

To draw the same picture at several different positions, the Picture property is a simple character vector specifying the name of the Bitmap, Icon or Metafile object. Points is either a 2-column matrix of y-coordinates and x-coordinates, or a nested vector whose first element contains the y-coordinates and whose second element contains the x-coordinates.

To draw several different pictures, the Picture property is a vector of character vectors specifying the names of several Bitmap, Icon and/or Metafile objects. Points is a 2-column matrix or 2-element nested vector as described above.

Setting the EdgeStyle property causes the picture to be surrounded by the appropriate border. For example, setting EdgeStyle to 'Plinth' produces a button-like appearance.

Setting the Size property causes the picture to be scaled to fit within the specified rectangle. It is only necessary to specify Size when an Image is used to draw a Metafile object. For a Bitmap or Icon, Size defaults to the size of the object being drawn.

The Dragable property specifies whether or not the Image can be dragged and dropped using the mouse.

Examples

First make a Form

      'F' ⎕WC 'Form'

Then make two Bitmaps :

      'YES' ⎕WC 'Bitmap' 'C:\WDYALOG\WS\YES'
      'NO'  ⎕WC 'Bitmap' 'C:\WDYALOG\WS\NO'

Display the "YES" Bitmap at (20,10)

      'F.I' ⎕WC 'Image' (20 10)('Picture' 'YES')

Display the "YES" Bitmap at (20,10) and (20,50)

      'F.I' ⎕WC 'Image' (20(10 50))('Picture' 'YES')

Display the "YES" Bitmap at (20,10) and the "NO" Bitmap at (20,50)

      'F.I' ⎕WC'Image'(20(10 50))('Picture' 'YES' 'NO')