|  | VISION Documentation (LDV) |  | Last update: 29/10/00
Download documentation | 5. S T R U C T U R E S |

.5.1 LDV_INFOS

typedef struct
{
short StrSize ;
short Type ;
char Authors[1+45] ;
LDV_CAPS Caps[10] ;
char RFU[16] ;
}
LDV_INFOS ;

Field | Type | Comments
StrSize | short | LDV_INFOS structure size. Must be initialised with sizeof(LDV_INFOS). The aim of this field is to prevent VISION from exploding its internal data if the size of this structure should change.
Type | short | Must be equal to TLDV_MODIFYIMG, TLDV_LOADIMG or TLDV_SAVEIMG, or even more in the future. Currently, only the TLDV_MODIFYIMG type is accepted by VISION
Authors | char[1+45] | Name of the author(s). 45 characters are available for this purpose.
Caps | LDV_CAPS[10] | Table describing the capabilities of the LDV for each number of plane. The LDV can handle a maximum of 9 differents planes because the structure table must end with a structure where fields are initialised with 0.
RFU | char[16] | Reserved for future use. Don't touch!

5.2 LDV_CAPS

typedef struct
{
char NbPlanes ;
char NbPlanesOut ;
unsigned long Flags ;
}
LDV_CAPS ;

Field | Type | Comments
NbPlanes | char | Number of planes for this capability (1, 2, 4, 8 , 16, 24 (not handled), 32)
NbPlanesOut | char | Number of planes on output for this capability. For a TLDV_MODIFYIMG LDV type, this field must be equal to NbPlanes

Flags

unsigned long

Combination (| symbol) of the following masks:

- LDVF_STDFORMAT: LDV accepts the standard format
- LDVF_ATARIFORMAT: LDV accepts the ATARI format
- LDVF_SPECFORMAT: LDV accepts the format specific to the graphic card
- LDVF_SUPPORTPREVIEW: LDV has a Preview function (highly recommanded, even if it only calls Run)
- LDVF_AFFECTPALETTE: LDV modifies the palette (NbPlanes must be less than or equal to 8)
- LDVF_SUPPORTPROG: LDV will call the PrSetProg function of VAPI interface (recommanded if the processing takes more than 2 seconds)
- LDVF_OPINPLACE: LDV knows how to work on the source image, without the need for VISION to allocate the destination (it is said the transformation in done in place). In this case, the out parameter of the Run function is the same as the in parameter. As far as possible, use this flag, this will lessen the memory consumption.
- LDVF_REALTIMEPARAMS: LDV does Preview (small image displayed by the VISION dialogue) fast enough for the modification of LDV's parameters by the sliders to be smooth (at least 1 image per second)

5.3 LDV_IMAGE

typedef struct
{
short RasterFormat ;
MFDB Raster ;
LDV_PALETTE Palette ; /* Structure given if Raster.fd_nplanes <= 8 */
}
LDV_IMAGE ;

Field | Type | Comments
RasterFormat | short | LDVF_STDFORMAT, LDVF_ATARIFORMAT or LDVF_SPECFORMAT
Raster | MFDB | The classical ATARI MFDB describing the image data (excluding the palette)
Palette | LDV_PALETTE | Pointer on a structure LDV_PALETTE describing the palette associated with the image if the number of bits is less than or equal to 8.

5.4 LDV_PALETTE

typedef struct
{
short NbColors ;
VDI_ELEMENTPAL *Pal ;
}
LDV_PALETTE ;

Field | Type | Comments
NbColors | short | The number of elements in the table pointed by Palette (i.e., 2, 4, 16 ou 256 colours)
Pal | VDI_ELEMENTALPAL * | Pointer on a table of NbColors elements of the type VDI_ELEMENTPAL. The proposed palette is indexed by VDI indexes (those used by the VDI functions such as line drawing) and not TOS ones (those you get from VAPI raster functions). Thankfully, VAPI has functions to convert VDI to TOS indexes in both directions.

5.5 VDI_ELEMENTALPAL

typedef struct
{
short Red ;
short Green ;
short Blue ;
}
VDI_ELEMENTPAL ;

Field | Type | Comments
Red | short | Component Red of the VDI index of the palette (0 <= index <= 1000)
Green | short | Component Green of the VDI index of the palette (0 <= index <= 1000)
Blue | short | Component Blue of the VDI index of the palette (0 <= index <= 1000)

5.6 LDV_PARAMS

typedef struct
{
short x1, y1, x2, y2 ;
short NbParams ;
LDV_BASICPARAM Param[LDVNBMAX_PARAMETERS] ;
}
LDV_PARAMS ;

Field | Type | Comments
x1 | short | X position of the left top border of the rectangle to be processed (0 for a full image)
y1 | short | Y position of the left top border of the rectangle to be processed (0 for a full image)
x2 | short | X position of the right bottom border of the rectable to be processed (image width - 1 for a full image)
y2 | short | YX position of the right bottom border of the rectable to be processed (image height - 1 for a full image)
NbParams | short | Number of valid parameters in the Param table
Param | LDV_BASICPARAM | Table containing the parameters entered from the VISION user interface

5.7 LDV_BASICPARAM (UNION)

typedef union
{
short s ;
float f ;
}
LDV_BASICPARAM ;

Field | Type | Comments
s | short | Parameter value (if this parameter, defined in the associated .INI is an integer)
f | float | Parameter value (if this parameter, defined in the associated .INI is a Float. Currently, the type Float is not handled, and since compilers can differ in the way they code floats, I strongly recommend to use Shorts).

|  | VISION Documentation (LDV) |  | Last updpate: 29/10/00
Download documentation | S T R U C T U R E S |