Graphical Object (GROB)


Functions

bool isGROB (SatAddr src)
 is the object at src a GROB
int GROBnibbles (SatAddr src)
 Return the size in nibbles of the GROB object at src.
bool GROBdecode (SatAddr src, int *rows, int *columns, char *pixels)
 Extract the information about a GROB.
SatAddr GROBencode (int rows, int columns, char *pixels, SatAddr dst)
 Create a GROB from the parts.
int GROBbytes (SatAddr src)
SatAddr makeGROB (int rows, int columns)
 Create a blank GROB in TEMPOB.
bool GROBsetPixel (SatAddr src, int row, int column, bool val)
 Set or clear a pixel in a GROB.

Function Documentation

int GROBbytes ( SatAddr  src  ) 

brief Return the number of bytes required to store the graphical data in a GROB

Parameters:
src The Saturn address of the GROB
Returns:
teh number of bytes, or -1 if src doesn't point to a GROB

bool GROBdecode ( SatAddr  src,
int *  rows,
int *  columns,
char *  pixels 
)

Extract the information about a GROB.

Parameters:
src Saturn address of a GROB
rows If non-null, then number of rows in the GROB will be stored here.
columns If non-null, then number of columns in the GROB will be stored here.
pixels If non-null, then GROB data will be stored here. The buffer must contain enough space for the data. You can get the space required with GROBbytes()
Returns:
true on success, false if src doesn't point to a GROB.

SatAddr GROBencode ( int  rows,
int  columns,
char *  pixels,
SatAddr  dst 
)

Create a GROB from the parts.

Parameters:
rows The number of rows in the GROB
columns The number of columns in the GROB
pixels. The pixel data for the grob, or NULL to leave the data unspecified
dst The Saturn address of the buffer to recieve the GROB, or zero to create a new buffer.
Returns:
the Saturn address of the grob

int GROBnibbles ( SatAddr  src  ) 

Return the size in nibbles of the GROB object at src.

Parameters:
src Saturn address of an GROB
Returns:
The size in nibbles of the GROB object, or -1 if src doesn't point to an GROB.

bool GROBsetPixel ( SatAddr  src,
int  row,
int  column,
bool  val 
)

Set or clear a pixel in a GROB.

Parameters:
src The Saturn address of the GROB
row The row of the pixel. Row numbers start at 0.
column The column of the pixel. Column numbers start at 0.
val The value to set the pixel to. zero makes the pixel white, non-zero makes it black.
Returns:
true on success, false if src isn't a GROB, or if row or column is out of range.

bool isGROB ( SatAddr  src  ) 

is the object at src a GROB

Parameters:
src Saturn address of an object
Returns:
true if the object at src is a GROB

SatAddr makeGROB ( int  rows,
int  columns 
)

Create a blank GROB in TEMPOB.

Parameters:
rows The number of rows
columns The number of columns
Returns:
the Saturnd address of the new GROB, or 0 on error


Generated on Sat Apr 3 16:38:31 2010 for HPObjects by  doxygen 1.5.0