This is a brief image structure for very simple transfers of image data to a RastPort
Source position: intuition.pas line 725
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: Pointer; |
|
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; |
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.
|
This is a brief image structure for very simple transfers of image data to a RastPort |
|
|
Window structure |
|
|
New window structure |
|
|
Future TNewWindow |
|
|
Graphical informations for the 3D look |
|
|
GadgetClass Tag. (PImage) Gadget imagry is an image |
|
|
GadgetClass Tag. |
|
|
Draw the specified Image structure into a RastPort. |
|
|
Draw an (extended) Intuition Image with special visual state. |
|
|
Erases an Image. |
|
|
Tests whether an image "contains" a point. |
|
|
Set Image Background Pen |
|
|
Get Image bounding rectangle |
|
|
Set Image Foreground pen |