Index Parent

Picture class

The Picture class is used to display datatype pictures.

Of course, you may give a Picture object a Frame, a Background and an InputMode, to make it act like a button.

Note that disabling a Picture object is not supported in this release, so if you need to disable a Picture object, just incapsulate it in a group.


Name Type Class Note
BitmapCompression N G The compression scheme of the picture
BitmapDepth N G The number of the bitplanes of the picture
BitmapHeight N G The real height of the picture
BitmapMasking N G The masking type of the picture, one of:
  • 0 - None
  • 1 - Mask
  • 2 - Transparent color
  • 3 - Lasso
  • 4 - Alpha
BitmapTransparent N G The transparent color, if BitMasking is 2
BitampWidth N G The real width of the picture
BitmapXAspect N G  
BitmapYAspect N G  
Center B ISGN Set HCenter and VCenter
FreeHoriz B I The picture is horizontal unlimited (free).
FreeVert B I The picture is vertical unlimited (free)
HCenter B ISGN If the object is FreeHoriz, or it has a FixWidth set, it is horiz centered in the space it belongs to
Pic N I Many datatypes give the chance to select the picture number to show, in the case of a multi image. It is the integral id of the image (0,...)
Pics N G Many datatypes give the chance to select the picture number to show, in the case of a multi image. It is the number of the pictures contained in the sources.
Precision S I One of:
  • Exact
  • Image
  • Icon
  • Gui
Scale N ISGN It is a positive value, percent factor for scaling. It works with all datatypes but ilbm (sorry, but scaled ilbm pictures are shown with wrong palettes).
ScaledWidth N G Width of the scaled image
ScaledHeight N G Height of the scaled image
Source S I IND The source of data. See SourceType. Note that this attribute have to be always supplied.
SourceType S I One of:
  • File - Source is a file name (default)
  • Mem - Source is string containing the pic data It may obtained via p2s.rexx macro. Note that because of Datatypes fail to support that, it is implemented via a dummy file in directory t:; the file is deleted at object disposing
  • Clipboard - Source is the clipboard unit number
Transparent B ISGN If the picture has an alpha mask or a transparent color, it makes that transparent, Otherwise color 0 is made transparent.
VCenter B ISGN If the object is FreeVert, or it has a FixHeight set, it is vert centered in the space it belongs to


Note that:

  1. Source have to be always supplied
  2. SourceType is File by default
  3. You may supplied the Area class attribute FixWidth, FixHeight to hard set the dimension of the object
  4. If you want to open a picture with its real dimension, do not supply any of FreeHoriz, FreeVert, FixedWidth, FixedHeight
  5. If you ant a picture to be auto-scaled to the dimension of the window, just set FreeVert and FreHoriz, and do not round the image with spaces (you should not set Transparent too, see below).
  6. I am not so good in gfx programming so: the original transparent channel (color or alpha) of the picture is not used when scaling. Instead always color 0 is used as transparent color. If you supply FreeHoriz and/or FreeVert, the computation of the transparent plane may take very long. It means that you should set transparent for: not scaled image and very small images (e.g. miniatures).


Name Parameters Note
CopyToClip   Copy the picture (the whole picture not the scaled one) to the clipboard unit 0