Dali: Byte16Image -- C API

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

Header Files

#include <dvmbasic.h>

Type Definitions

Byte16Image

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

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

Constants

Return Codes

Return codes from various byte16 primitives. DVM_BYTE16_OK indicates the primitives executed successfully. DVM_BYTE16_ERROR indicates some error has occurs. We may defined more error codes to indicates different type of errors.

    #define DVM_BYTE16_OK 0
    #define DVM_BYTE16_ERROR 1
  

Operators

Allocation

Byte16Image *Byte16New (int w, int h)

void Byte16Free (Byte16Image *image)

Byte16Image *Byte16Clip (Byte16Image *image, int x, int y, int w, int h)

void Byte16Reclip (Byte16Image *image, int x, int y, int w, int h, Byte16Image *clipped)


Initialization

void Byte16Copy (Byte16Image *src, Byte16Image *dest)


Queries

int Byte16GetX(Byte16Image *image)
int Byte16GetY(Byte16Image *image)
int Byte16GetWidth(Byte16Image *image)
int Byte16GetHeight(Byte16Image *image)
int Byte16GetVirtual(Byte16Image *image)


See Also

ByteImage , MPEG


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