Main Page | Data Structures | File List | Data Fields | Globals

fb2d/fb2d.h File Reference

2D Frame Buffer operations More...

#include <jagdefs.h>
#include <screen.h>

Data Structures

struct  linear_transform
struct  affine_transform

Enumerations

enum  mode {
  MODE_ZERO = 0, MODE_NSAND = SRCEN|DSTEN|LFU_NAN, MODE_NSAD = SRCEN|DSTEN|LFU_NA, MODE_NOTS = SRCEN|LFU_NAN|LFU_NA,
  MODE_SAND = SRCEN|DSTEN|LFU_AN, MODE_NOTD = DSTEN|LFU_NAN|LFU_AN, MODE_N_SXORD = SRCEN|DSTEN|LFU_NAN|LFU_A, MODE_NSORND = SRCEN|DSTEN|LFU_NAN|LFU_NA|LFU_AN,
  MODE_SAD = SRCEN|DSTEN|LFU_A, MODE_SXORD = SRCEN|DSTEN|LFU_NA|LFU_AN, MODE_D = DSTEN|LFU_NA|LFU_A, MODE_NSORD = SRCEN|DSTEN|LFU_NAN|LFU_NA|LFU_A,
  MODE_S = SRCEN|LFU_AN|LFU_A, MODE_SORND = SRCEN|DSTEN|LFU_NAN|LFU_AN|LFU_A, MODE_SORD = SRCEN|DSTEN|LFU_NA|LFU_AN|LFU_A, MODE_ONE = LFU_NAN|LFU_NA|LFU_AN|LFU_A,
  MODE_TRANSPARENT = SRCEN|LFU_AN|LFU_A|DCOMPEN
}

Functions

void * init_fb2d_manager (void *addr)
void fb2d_compose_linear_transform (linear_transform *src, linear_transform *dst)
void fb2d_set_rotation (linear_transform *dst, int angle)
void fb2d_set_matching_points (affine_transform *t, int x1, int y1, int x2, int y2)
void fb2d_compute_bounding_box (linear_transform *m, int w1, int h1, int *w2, int *h2)
void fb2d_copy_straight (screen *src, screen *dst, int w, int h, mode m)
void fb2d_copy_transformed (screen *src, screen *dst, affine_transform *t, int w, int h, mode m)


Detailed Description

2D Frame Buffer operations


Enumeration Type Documentation

enum mode
 

The copy modes available

Enumerator:
MODE_ZERO  All 0
MODE_NSAND  Not Source And Not Destination
MODE_NSAD  Not Source And Destination
MODE_NOTS  Not Source
MODE_SAND  Source And Destination
MODE_NOTD  Not Destination
MODE_N_SXORD  Not (Source Xor Destination)
MODE_NSORND  Not Source Or Not Destination
MODE_SAD  Source And Destination
MODE_SXORD  Source Xor Destination
MODE_D  Destination
MODE_NSORD  Not Source Or Destination
MODE_S  Source
MODE_SORND  Source Or Not Destination
MODE_SORD  Source Or Destination
MODE_ONE  All 1
MODE_TRANSPARENT  Transparent Source


Function Documentation

void fb2d_compose_linear_transform linear_transform src,
linear_transform dst
 

Composition of two linear_transform. The result of the composition is written back in the second linear_transform.

Parameters:
src  Address of the first linear_transform. It should be long aligned.
dst  Address of the second linear_transform. It should be long aligned.

void fb2d_compute_bounding_box linear_transform m,
int  w1,
int  h1,
int *  w2,
int *  h2
 

Compute the bounding box after transformation.

Parameters:
m  Address of linear_transform. It should be long aligned.
w1  Width of bounding box before transformation
h1  Height of bounding box before transformation
w2  Width of bounding box after transformation (written back)
h2  Height of bounding box after transformation (written back)

void fb2d_copy_straight screen src,
screen dst,
int  w,
int  h,
mode  m
 

Copy a box of the source screen in the target screen

You can specify from and where it copies with fields screen::x and screen::y.

This function does not require fb2d manager to be initialised by init_fb2d_manager.

Parameters:
src  Source screen
dst  Target screen
w  Width of box
h  Height of box
m  Mode of copy

void fb2d_copy_transformed screen src,
screen dst,
affine_transform t,
int  w,
int  h,
mode  m
 

Copy a transformed box of the source screen in the target screen

You can specify from and where it copies with fields screen::x and screen::y.

The width and height are to be understood in the target screen. Thus, it may be convenient to compute the good values with help of function compute_bounding_box_2d.

Parameters:
src  Source screen
dst  Target screen
t  Address of affine_transform. It should be long aligned
w  Width of box
h  Height of box
m  Mode of copy

void fb2d_set_matching_points affine_transform t,
int  x1,
int  y1,
int  x2,
int  y2
 

Compute the translation part of the given affine_transform so that the two points given coincides before and after transformation.

Parameters:
t  Address of affine_transform. It should be long aligned.
x1  X coordinate before transformation
y1  Y coordinate before transformation
x2  X coordinate after transformation
y2  Y coordinate after transformation

void fb2d_set_rotation linear_transform dst,
int  angle
 

Set the given linear_transform to a rotation. The rotation angle is modulo 2048. This gives a precision of 360/2048 degree.

Parameters:
dst  Address of linear_transform. It should be long aligned.
angle  Angle

void* init_fb2d_manager void *  addr  ) 
 

Initialise the DSP 2D Frame Buffer manager.

The given address must be an address in DSP ram where to load the DSP routine.

It returns the address of the end of the collision routine in DSP ram (which is long aligned).

Parameters:
addr  Address where to load the DSP routine. It should be long aligned.


Generated on Wed Jan 10 03:11:03 2007 for The Removers Libraries by  doxygen 1.4.4