Dali: FloatImage -- C API

[ Header Files | Types | Constants | Allocation | Initialization | Queries | See Also ]

Header Files

#include <dvmbasic.h>

Type Definitions

FloatImage

A FloatImage is a buffer storing 2D array of int. Just like a ByteImage, a FloatImage can be either physical or virtual.

    typedef struct FloatImage {
        int width;
        int height;
        int x;
        int y;
        int parentWidth;
        unsigned char isVirtual;
        float *firstByte;
    } FloatImage;
  
width
the width of the FloatImage
height
the height of the FloatImage
x
the x-offset of the top-left corner of the FloatImage from it's parent.
y
the y-offset of the top-left corner of the FloatImage from it's parent.
parentWidth
the width of the physical parent of this FloatImage. (should be called rootWidth since the parent might not be physical)
virtual
1 iff the FloatImage is virtual. 0 otherwise.
firstByte
pointer to the first short in this FloatImage.

Constants

Return Codes

Return codes from various byte32 primitives. DVM_FLOAT_OK indicates the primitives executed successfully. DVM_FLOAT_ERROR indicates some error has occurs. We may defined more error codes to indicates different type of errors.

    #define DVM_FLOAT_OK 0
    #define DVM_FLOAT_ERROR 1
  

Operators

Allocation

FloatImage *FloatNew (int w, int h)

void FloatFree (FloatImage *image)

FloatImage *FloatClip (FloatImage *image, int x, int y, int w, int h)

void FloatReclip (FloatImage *image, int x, int y, int w, int h, FloatImage *clipped)


Initialization

void FloatCopy (FloatImage *src, FloatImage *dest)


Queries

int FloatGetX(FloatImage *image)
int FloatGetY(FloatImage *image)
int FloatGetWidth(FloatImage *image)
int FloatGetHeight(FloatImage *image)
int FloatGetVirtual(FloatImage *image)


See Also

ByteImage , MPEG


Last updated : Monday, February 01, 1999, 04:44 PM