Definition: |
a32Dib identifier
-- or -- integer i = a32Dib(object x) |
Description: | This serves to define the a32Dib type. You can also call it like an ordinary function to determine if an object is an a32Dib. |
Comments: |
An arwen32dib bitmap is a sequence of length 7:
When invoked as a function, returns 1 if x is an a32Dib otherwise returns 0. Some routines, such as newDib, can fail and return 0, hence there is another user defined type, a32Dib0, which allows 0 or the above. Provided you have appropriate error handling in place (ie a test for 0) you can instead store the result of newDib (etc) in an a32Dib0 variable, rather than terminate the application with a run-time typecheck error. If you do not have said test, a typecheck is slightly preferrable to an attempt to subscript an atom, so a32Dib is the better choice. You can of course store arwen32dib bitmaps in a variable declared as an object or a sequence, or indeed in an element of a sequence, if for some reason you do not want to perform any potentially helpful safety checks. Any performance overhead from type checking is likely to be neglible compared to the number of pixels being processed. |
Example: |
a32Dib dib dib = newDib(300, 200) -- create a bitmap |
See Also: | a32Colour |