Unit 'intuition' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

TImage

This is a brief image structure for very simple transfers of image data to a RastPort

Declaration

Source position: intuition.pas line 529

type TImage = record

  LeftEdge: SmallInt;

  

Starting offset relative to some origin

  TopEdge: SmallInt;

  

Starting offsets relative to some origin

  Width: SmallInt;

  

Pixel size (though data is Word-aligned)

  Height: SmallInt;

  

Height of image

  Depth: SmallInt;

  

Pixel size

  ImageData: PWord;

  

A Pointer to the actual Word-aligned bits

  PlanePick: Byte;

  

  PlaneOnOff: Byte;

  

  NextImage: PImage;

  

If not nil, Intuition presumes that it points to another Image structure with another Image to be rendered

end;

Description

The TImage.PlanePick and PlaneOnOff variables work much the same way as the equivalent GELS Bob variables. It's a space-saving mechanism for image data. Rather than defining the image data for every plane of the RastPort, you need define data only for the planes that are not entirely zero or one. As you define your Imagery, you will often find that most of the planes ARE just as color selectors. For instance, if you're designing a two-color Gadget to use colors two and three, and the Gadget will reside in a five-plane display, bit plane zero of your imagery would be all ones, bit plane one would have data that describes the imagery, and bit planes two through four would be all zeroes. Using these flags allows you to avoid wasting all that memory in this way: first, you specify which planes you want your data to appear in using the PlanePick variable. For each bit set in the variable, the next "plane" of your image data is blitted to the display. For each bit clear in this variable, the corresponding bit in PlaneOnOff is examined. If that bit is clear, a "plane" of zeroes will be used. If the bit is set, ones will go out instead. So, for our example:

Gadget.PlanePick = $02;

Gadget.PlaneOnOff = $01;

Note that this also allows for generic Gadgets, like the System Gadgets, which will work in any number of bit planes. Note also that if you want an Image that is only a filled rectangle, you can get this by setting PlanePick to zero (pick no planes of data) and set PlaneOnOff to describe the pen color of the rectangle.

See also

PImage

  

This is a brief image structure for very simple transfers of image data to a RastPort

TWindow

  

Window structure

TNewWindow

  

New window structure

TExtNewWindow

  

Future TNewWindow

TDrawInfo

  

Graphical informations for the 3D look

GA_Image

  

GadgetClass Tag. (PImage) Gadget imagry is an image

GA_SelectRender

  

GadgetClass Tag.

DrawImage

  

Draw the specified Image structure into a RastPort.

DrawImageState

  

Draw an (extended) Intuition Image with special visual state.

EraseImage

  

Erases an Image.

PointInImage

  

Tests whether an image "contains" a point.

IM_BGPEN

  

Set Image Background Pen

IM_BOX

  

Get Image bounding rectangle

IM_FGPEN

  

Set Image Foreground pen


Documentation generated on: 2021-07-30