typedef long LDV_STATUS
The type of LDV functions return code is a 32 bits integer. Why? First, because some compilers (e.g., GCC) return a 32 bits integer even when specifying a 16 bits integer (short). Secondly, this allows for future extensions of the return code in the remaining bits.
Define | Description |
ELDV_NOERROR | No error. The function worked correctly |
ELDV_INVALIDPARAMETER | At least one of the parameters is not valid |
ELDV_NBPLANESNOTSUPPORTED | The function does not support the number of planes passed in parameters |
ELDV_NOTENOUGHMEMORY | Not enough memory |
ELDV_PREVIEWNOTSUPPORTED | The Preview function is not defined (points to NULL) |
ELDV_RUNNOTSUPPORTED | The Run function is not defined (points to NULL I wonder who would be dumb enough to write an LDV that does nothing! |
ELDV_BADVAPIVERSION | The available version of VAPI does not allow to use the LDV (some functions or interfaces are missing) |
ELDV_IMGFORMATMISMATCH | The image formats handled by the LDV do not allow VISION to provide an image compatible with one of the expected formats. Normally, the error comes from the LDV. |
ELDV_GENERALFAILURE | General failure, reason not specified. |
These codes can be sent back by LDV functions or by VISION to the user to display the corresponding error messsage. Think also to use the LDV_SUCCESS macro which indicates whether the code passed as a parameter is a success or an error.
Define | Description |
TLDV_MODIFYIMG | Image modifier module. Can also be used to initialise an image by overwriting completely its content, without taking into account the current data. |
TLDV_LOADIMG | Image loader module. VISION does not handle it yet |
TLDV_SAVEIMG | Image saving module. VISION does not handle it yet |
4.4 Information on possibilities
Define | Description |
LDVF_STDFORMAT | The LDV accepts the standard image format as defined by ATARI (bitplanes one after the others). This format is not available in True Color. |
LDVF_ATARIFORMAT | The LDV accept ATARI format (interlaced bitplanes (ST), Falcon True Color mode) |
LDVF_SPECFORMAT | The LDV accepts the specific format of the graphic card |
LDVF_SUPPORTPREVIEW | The LDV provides a Preview function (highly recommanded, even if it calls Run) |
LDVF_AFFECTPALETTE | The LDV modifies the palette (bitplanes modes only). In this case, operation on palette must always be done "in place". VISION will systematically save the palette of the image in the Undo buffer. |
LDVF_SUPPORTPROG | The LDV will call function PrSetProg of the VAPI interface (recommanded is the process takes more than 2 secondes). Before calling Run, VISION will display a progess bar for the LDV and will make it disapear afterwards. By calling PrSetProg from the VAPI interface, the LDV will be able to inform user on the progress of the process. |
LDVF_OPINPLACE | The LDV knows how to work on the source image, without VISION having to allocate the destination (the transformation is said to occur in place). In this case, the out parameter of the Run function is the same as in. As far as possible, use this flag, this spares memory. The presence of this flag impose obviously that the LDV does not modify the size of the image. |
LDVF_REALTIMEPARAMS | The LDV does the Run function fast enough in Preview mode (small image displayed by the VISION) dialog box for the modification of the LDV parameters done with the sliders to be smooth enough (at least 1 image per second). In this case, VISION will call the Prewiew function when the user modifies a parameter control slider, without any need to press the "Preview" button |
These flags must be combined with the "logical or" (|).