Google

Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

agl_video.h File Reference

definition of all adgali features associated with video functions. More...


Data Structures

struct  agl_channel
 defines an a channel pixmap. More...

struct  agl_pix
 defines an a pixmap. More...

struct  agl_pos
 defines an position. More...

struct  agl_rect
 defines an rectangle. More...

struct  agl_size
 defines a vector or a size. More...


pixel mask for the long representation. pixels stored in memory in RGBA order

#define AGL_RED   agl_swapbe32(0XFF000000)
 green color mask.

#define AGL_GREEN   agl_swapbe32(0X00FF0000)
 green color mask.

#define AGL_BLUE   agl_swapbe32(0X0000FF00)
 blue color mask.

#define AGL_ALPHA   agl_swapbe32(0X000000FF)
 alpha mask.


special alpha values

#define AGL_OPAQUE   0XFF
 set alpha opaque.

#define AGL_TRANSPARENT   0X00
 set alpha transparent.


video mode options

#define AGL_FULLSCREEN   1
 full screen mode.


specify the type of channel separation or combination to use

#define AGL_RGB   0
 specify a RGB (Red, Green, Blue) combination or separation.

#define AGL_CMY   1
 specify a CMY (Cyan, Magenta, Yellow) combination or separation.

#define AGL_HSV   2
 specify an HSV (hue, Saturation, Value) combination or separation.

#define AGL_AVG   3
 specify an average ( average of RGB channel ie luminance).


zone types already known

#define ZONE_NONE   0
 defines of zone that contains nothing.

#define ZONE_IMAGE   1
 defines a zone that contains an image.


zone flags known

#define ZONE_TILED   0
 defines that the zone sub elements are tiled. they are no overlap calculation.

#define ZONE_OVERLAPED   1
 defines that the zone sub elements could be overlapped. the sub zones are classified from bottom to top.

#define ZONE_CONTAINER   2
 defines that the zone contain an image of the sub elements. this could accelerate overlaped zone drawing.


transformation types for pixtranscat and pixtransalpha

#define PIX_ID   0
 no transformation.

#define PIX_SYM0   1
 operate a vertical mirror.

#define PIX_SYM45   2
 operate a 45 degree diagonal mirror.

#define PIX_SYM90   3
 operate an horizontal mirror.

#define PIX_SYM135   4
 operate a 135 degree diagonal mirror.

#define PIX_ROT90   5
 operate a 90 degree rotation.

#define PIX_ROT180   6
 operate a 180 degree rotation.

#define PIX_ROT270   7
 operate a -90 degree rotation.


Defines

#define AGL_RGBA2LONG(value)   agl_swapbe32(value)
 transcode a long color to a long value.

#define AGL_SETRED(value)   (agl_swapbe32(value<<24) & AGL_RED)
 set red color. More...

#define AGL_SETGREEN(value)   (agl_swapbe32(value << 16) & AGL_GREEN)
 set green color. More...

#define AGL_SETBLUE(value)   (agl_swapbe32(value << 8) & AGL_BLUE)
 set blue color. More...

#define AGL_SETALPHA(value)   (agl_swapbe32(value) & AGL_ALPHA)
 set alpha. More...

#define agl_pixcat(psrc, pdst, psrcrect, pdstrect, pos)   agl_pixtranscat(psrc, pdst, psrcrect, pdstrect, pos, PIX_ID)
 copy one zone into another. More...

#define agl_pixalpha(psrc, pdst, psrcrect, pdstrect, pos)   agl_pixtransalpha(psrc, pdst, psrcrect, pdstrect, pos, PIX_ID)
 copy one zone into another with alpha calculation. More...


Functions

int agl_pixtranscat (agl_pix *psrc, agl_pix *pdst, agl_rect *psrcrect, agl_rect *pdstrect, agl_pos *pos, int type)
 copy one zone into another. More...

int agl_pixtransalpha (agl_pix *psrc, agl_pix *pdst, agl_rect *psrcrect, agl_rect *pdstrect, agl_pos *pos, int type)
 copy one zone into another with alpha calculation. More...


Detailed Description

this file defines all adgali features associated vith the video functions and must be include when you use adgali agl.h includes this file


Define Documentation

#define AGL_SETALPHA value    (agl_swapbe32(value) & AGL_ALPHA)
 

this function sets the alpha channel in a pixel value

Parameters:
value   the alpha value or this pixel (255 is opaque, 0 is transparent)
Returns:
the pixel value

#define AGL_SETBLUE value    (agl_swapbe32(value << 8) & AGL_BLUE)
 

this function sets the blue color in a pixel value

Parameters:
value   the color value is between 0 and 255 (0 is black)
Returns:
the pixel value

#define AGL_SETGREEN value    (agl_swapbe32(value << 16) & AGL_GREEN)
 

this function sets the green color in a pixel value

Parameters:
value   the color value is between 0 and 255 (0 is black)
Returns:
the pixel value

#define AGL_SETRED value    (agl_swapbe32(value<<24) & AGL_RED)
 

this function sets the red color in a pixel value

Parameters:
value   the color value is between 0 and 255 (0 is black)
Returns:
the pixel value

#define agl_pixalpha psrc, pdst, psrcrect, pdstrect, pos    agl_pixtransalpha(psrc, pdst, psrcrect, pdstrect, pos, PIX_ID)
 

copy one zone into another one with clipping of destination zone and source zone and apply alpha to zones if psrcrect and pdstrect are NULL, this is a real alpha copy

Parameters:
psrc   the source zone to copy
pdst   the destination zone
psrcrect   the clipping rectangle for the source zone. This rectangle defines a clipping into the source zone. The coordonates refers into the source zone
pdstrect   the clipping rectangle for the destination zone.
pos   the position of the source zone into the destination zone.
Returns:
  • -1 if an error occurs
  • 0 if nothing bad appears

#define agl_pixcat psrc, pdst, psrcrect, pdstrect, pos    agl_pixtranscat(psrc, pdst, psrcrect, pdstrect, pos, PIX_ID)
 

copy one zone into another one with clipping of destination zone and source zone alpha of the destination zone is supposed to be opaque if psrcrect and pdstrect are NULL, no clipping is done alpha of original dest zone is 255 (opaque)

Parameters:
psrc   the source zone to copy
pdst   the destination zone
psrcrect   the clipping rectangle for the source zone. This rectangle defines a clipping into the source zone. The coordonates refers into the source zone
pdstrect   the clipping rectangle for the destination zone.
pos   the position of the source zone into the destination zone.
Returns:
  • -1 if an error occurs
  • 0 if nothing bad appears


Function Documentation

int agl_pixtransalpha agl_pix * psrc,
agl_pix * pdst,
agl_rect * psrcrect,
agl_rect * pdstrect,
agl_pos * pos,
int type
 

copy one zone into another one with clipping of destination zone and source zone and apply alpha to zones if psrcrect and pdstrect are NULL, this is a real alpha copy apply transformation to source before copying to dest

Parameters:
psrc   the source zone to copy
pdst   the destination zone
psrcrect   the clipping rectangle for the source zone. This rectangle defines a clipping into the source zone. The coordonates refers into the source zone
pdstrect   the clipping rectangle for the destination zone.
pos   the position of the source zone into the destination zone.
type   the type of copy.
Returns:
  • -1 if an error occurs
  • 0 if nothing bad appears

int agl_pixtranscat agl_pix * psrc,
agl_pix * pdst,
agl_rect * psrcrect,
agl_rect * pdstrect,
agl_pos * pos,
int type
 

copy one zone into another one with clipping of destination zone and source zone alpha of the destination zone is supposed to be opaque if psrcrect and pdstrect are NULL, no clipping is done alpha of original dest zone is 255 (opaque) apply transformation to source before copying to dest

Parameters:
psrc   the source zone to copy
pdst   the destination zone
psrcrect   the clipping rectangle for the source zone. This rectangle defines a clipping into the source zone. The coordonates refers into the source zone
pdstrect   the clipping rectangle for the destination zone.
pos   the position of the source zone into the destination zone.
type   the type of copy.
Returns:
  • -1 if an error occurs
  • 0 if nothing bad appears


Doc generated at 6 Sep 2001 for, adgali 0.1.0 written by Stephane APIOU, © 2001 Generated by doxygen 1.2.9.1 ,