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

agl_video.h File Reference

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

Go to the source code of this file.

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_ALPHA   agl_swapbe32(0X000000FF)
 alpha mask
#define AGL_BLUE   agl_swapbe32(0X0000FF00)
 blue color mask
#define AGL_GREEN   agl_swapbe32(0X00FF0000)
 green color mask
#define AGL_RED   agl_swapbe32(0XFF000000)
 red color mask

macros to point onto each channel into a pixel pointer

#define AGL_ALPHAVAL(p)   (((unsigned char *)(p))[3])
 point onto alpha value
#define AGL_BLUEVAL(p)   (((unsigned char *)(p))[2])
 point onto blue value
#define AGL_GREENVAL(p)   (((unsigned char *)(p))[1])
 point onto green value
#define AGL_REDVAL(p)   (((unsigned char *)(p))[0])
 point onto red value

specify the type of channel separation or combination to use

#define AGL_AVG   4
 specify an average ( average of RGB channel ie luminance)
#define AGL_CMY   1
 specify a CMY (Cyan, Magenta, Yellow) combination or separation
#define AGL_HLS   3
 specify an HLS (Hue, Lightness, Saturation) combination or separation
#define AGL_HSV   2
 specify an HSV (Hue, Saturation, Value) combination or separation
#define AGL_RGB   0
 specify a RGB (Red, Green, Blue) combination or separation

video mode options

#define AGL_FULLSCREEN   1
 full screen mode

special alpha values

#define AGL_OPAQUE   0XFF
 set alpha opaque
#define AGL_TRANSPARENT   0X00
 set alpha transparent

transformation types for pixtranscat and pixtransalpha

#define PIX_ID   0
 no transformation
#define PIX_ROT180   6
 operate a 180 degree rotation
#define PIX_ROT270   7
 operate a -90 degree rotation
#define PIX_ROT90   5
 operate a 90 degree rotation
#define PIX_SYM0   1
 operate a vertical mirror
#define PIX_SYM135   4
 operate a 135 degree diagonal mirror
#define PIX_SYM45   2
 operate a 45 degree diagonal mirror
#define PIX_SYM90   3
 operate an horizontal mirror

zone flags known

#define ZONE_CONTAINER   2
 defines that the zone contain an image of the sub elements. this could accelerate overlaped zone drawing
#define ZONE_OVERLAPED   1
 defines that the zone sub elements could be overlapped. the sub zones are classified from bottom to top
#define ZONE_TILED   0
 defines that the zone sub elements are tiled. they are no overlap calculation

Defines

#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
#define agl_pixcat(psrc, pdst, psrcrect, pdstrect, pos)   agl_pixtranscat(psrc, pdst, psrcrect, pdstrect, pos, PIX_ID)
 copy one zone into another
#define AGL_RGBA2LONG(value)   agl_swapbe32(value)
 transcode a long color to a long value
#define AGL_SETALPHA(value)   (agl_swapbe32(value) & AGL_ALPHA)
 set alpha
#define AGL_SETBLUE(value)   (agl_swapbe32(value << 8) & AGL_BLUE)
 set blue color
#define AGL_SETGREEN(value)   (agl_swapbe32(value << 16) & AGL_GREEN)
 set green color
#define AGL_SETRED(value)   (agl_swapbe32(value<<24) & AGL_RED)
 set red color
#define AGL_VALRGBA2LONG(red, green, blue, alpha)   AGL_RGBA2LONG(((red)<<24)|((green)<<16)|((blue)<<8)|(alpha))
 tree colors and alpha to a raw value

Functions

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
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


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_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

#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


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 29 Sep 2004 for, adgali 0.2.4 written by Stephane APIOU, © 2001 Generated by Doxygen 1.3.8 ,