MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


mediaLib Library Functions       mlibGraphicsDrawTriangle(3MLIB)



NAME
     mlibGraphicsDrawTriangle,      mlibGraphicsDrawTriangle8,
     mlibGraphicsDrawTriangle32, mlibGraphicsDrawTriangleX8,
     mlibGraphicsDrawTriangleX32,
     mlibGraphicsDrawTriangleA8,
     mlibGraphicsDrawTriangleA32,
     mlibGraphicsDrawTriangleB8,
     mlibGraphicsDrawTriangleB32,
     mlibGraphicsDrawTriangleG8,
     mlibGraphicsDrawTriangleG32,
     mlibGraphicsDrawTriangleZ8,
     mlibGraphicsDrawTriangleZ32,
     mlibGraphicsDrawTriangleAB8,
     mlibGraphicsDrawTriangleAB32,
     mlibGraphicsDrawTriangleABG8,
     mlibGraphicsDrawTriangleABG32,
     mlibGraphicsDrawTriangleABGZ8,
     mlibGraphicsDrawTriangleABGZ32,
     mlibGraphicsDrawTriangleABZ8,
     mlibGraphicsDrawTriangleABZ32,
     mlibGraphicsDrawTriangleAG8,
     mlibGraphicsDrawTriangleAG32,
     mlibGraphicsDrawTriangleAGZ8,
     mlibGraphicsDrawTriangleAGZ32,
     mlibGraphicsDrawTriangleAZ8,
     mlibGraphicsDrawTriangleAZ32,
     mlibGraphicsDrawTriangleBG8,
     mlibGraphicsDrawTriangleBG32,
     mlibGraphicsDrawTriangleBGZ8,
     mlibGraphicsDrawTriangleBGZ32,
     mlibGraphicsDrawTriangleBZ8,
     mlibGraphicsDrawTriangleBZ32,
     mlibGraphicsDrawTriangleGZ8,
     mlibGraphicsDrawTriangleGZ32 - draw triangle

SYNOPSIS
     cc [ flag... ] file... -lmlib [ library... ]
     #include 

     mlibstatus mlibGraphicsDrawTriangle8(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c);


     mlibstatus mlibGraphicsDrawTriangle32(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c);


     mlibstatus mlibGraphicsDrawTriangleX8(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c, mlibs32 c2);



SunOS 5.11           Last change: 2 Mar 2007                    1






mediaLib Library Functions       mlibGraphicsDrawTriangle(3MLIB)



     mlibstatus mlibGraphicsDrawTriangleX32(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c, mlibs32 c2);


     mlibstatus mlibGraphicsDrawTriangleA8(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c);


     mlibstatus mlibGraphicsDrawTriangleA32(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c);


     mlibstatus mlibGraphicsDrawTriangleB8(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleB32(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleG8(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c1, mlibs32 c2, mlibs32 c3);


     mlibstatus mlibGraphicsDrawTriangleG32(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c1, mlibs32 c2, mlibs32 c3);


     mlibstatus mlibGraphicsDrawTriangleZ8(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2,
          mlibs16 x3, mlibs16 y3, mlibs16 z3, mlibs32 c);


     mlibstatus mlibGraphicsDrawTriangleZ32(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2,
          mlibs16 x3, mlibs16 y3, mlibs16 z3, mlibs32 c);


     mlibstatus mlibGraphicsDrawTriangleAB8(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c, mlibs32 a);





SunOS 5.11           Last change: 2 Mar 2007                    2






mediaLib Library Functions       mlibGraphicsDrawTriangle(3MLIB)



     mlibstatus mlibGraphicsDrawTriangleAB32(mlibimage *buffer,
          mlibs16 x1, mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3,
          mlibs16 y3, mlibs32 c, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleABG8(mlibimage *buffer,
          mlibs16 x1, mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3,
          mlibs16 y3, mlibs32 c1, mlibs32 c2, mlibs32 c3, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleABG32(mlibimage *buffer,
          mlibs16 x1, mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3,
          mlibs16 y3, mlibs32 c1, mlibs32 c2, mlibs32 c3, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleABGZ8(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c1,
          mlibs32 c2, mlibs32 c3, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleABGZ32(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c1,
          mlibs32 c2, mlibs32 c3, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleABZ8(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c,
          mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleABZ32(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c,
          mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleAG8(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c1,mlibs32 c2, mlibs32 c3);


     mlibstatus mlibGraphicsDrawTriangleAG32(mlibimage *buffer,
          mlibs16 x1, mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3,
          mlibs16 y3, mlibs32 c1, mlibs32 c2, mlibs32 c3);




SunOS 5.11           Last change: 2 Mar 2007                    3






mediaLib Library Functions       mlibGraphicsDrawTriangle(3MLIB)



     mlibstatus mlibGraphicsDrawTriangleAGZ8(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c1,
          mlibs32 c2, mlibs32 c3);


     mlibstatus mlibGraphicsDrawTriangleAGZ32(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c1,
          mlibs32 c2, mlibs32 c3);


     mlibstatus mlibGraphicsDrawTriangleAZ8(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2,
          mlibs16 x3, mlibs16 y3, mlibs16 z3, mlibs32 c);


     mlibstatus mlibGraphicsDrawTriangleAZ32(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c);


     mlibstatus mlibGraphicsDrawTriangleBG8(mlibimage *buffer, mlibs16 x1,
          mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3, mlibs16 y3,
          mlibs32 c1, mlibs32 c2, mlibs32 c3, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleBG32(mlibimage *buffer,
          mlibs16 x1, mlibs16 y1, mlibs16 x2, mlibs16 y2, mlibs16 x3,
          mlibs16 y3, mlibs32 c1, mlibs32 c2, mlibs32 c3, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleBGZ8(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c1,
          mlibs32 c2, mlibs32 c3, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleBGZ32(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c1,
          mlibs32 c2, mlibs32 c3, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleBZ8(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,



SunOS 5.11           Last change: 2 Mar 2007                    4






mediaLib Library Functions       mlibGraphicsDrawTriangle(3MLIB)



          mlibs16 x2, mlibs16 y2, mlibs16 z2,
          mlibs16 x3, mlibs16 y3, mlibs16 z3, mlibs32 c, mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleBZ32(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c,
          mlibs32 a);


     mlibstatus mlibGraphicsDrawTriangleGZ8(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2,
          mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c1, mlibs32 c2, mlibs32 c3);


     mlibstatus mlibGraphicsDrawTriangleGZ32(mlibimage *buffer,
          mlibimage *zbuffer, mlibs16 x1, mlibs16 y1, mlibs16 z1,
          mlibs16 x2, mlibs16 y2, mlibs16 z2, mlibs16 x3, mlibs16 y3,
          mlibs16 z3, mlibs32 c1,
          mlibs32 c2, mlibs32 c3);


DESCRIPTION
     Each of the mlibGraphicsDrawTriangle*() functions draws  a
     triangle with the vertices at (x1,y1), (x2,y2), and (x3,y3).


     Each of the mlibGraphicsDrawTriangleX*() functions  draws
     a triangle in Xor mode as follows:

           data[x,y] ^= c ^ c2



     Each of the mlibGraphicsDrawTriangleA*() functions  draws
     a triangle with antialiasing.


     Each of the mlibGraphicsDrawTriangleB*() functions  draws
     a triangle with alpha blending as follows:

           data[x,y] = (data[x,y] * (255 - a) ] c * a) / 255



     Each of the mlibGraphicsDrawTriangleG*() functions  draws
     a triangle with Gouraud shading.





SunOS 5.11           Last change: 2 Mar 2007                    5






mediaLib Library Functions       mlibGraphicsDrawTriangle(3MLIB)



     Each of the mlibGraphicsDrawTriangleZ*() functions  draws
     a triangle with Z buffering.


     Each of the other functions draws a triangle with a combina-
     tion  of  two  or more features like antialiasing (A), alpha
     blending (B), Gouraud shading (G), and Z buffering (Z).

PARAMETERS
     Each of the functions takes some of the following arguments:

     buffer     Pointer to the image into which the  function  is
                drawing.


     zbuffer    Pointer to the image that holds the Z buffer.


     x1         X coordinate of the first vertex.


     y1         Y coordinate of the first vertex.


     z1         Z coordinate of the first vertex.


     x2         X coordinate of the second vertex.


     y2         Y coordinate of the second vertex.


     z2         Z coordinate of the second vertex.


     x3         X coordinate of the third vertex.


     y3         Y coordinate of the third vertex.


     z3         Z coordinate of the third vertex.


     c          Color used in the drawing.


     c1         Color of the first vertex.






SunOS 5.11           Last change: 2 Mar 2007                    6






mediaLib Library Functions       mlibGraphicsDrawTriangle(3MLIB)



     c2         Color of the second vertex,  or  the  alternation
                color in Xor Mode.


     c3         Color of the third vertex.


     a          Alpha value for blending. 0 < a < 255.


RETURN VALUES
     Each of the functions returns  MLIBSUCES  if  successful.
     Otherwise it returns MLIBFAILURE.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     mlibGraphicsFillTriangle(3MLIB), attributes(5)
























SunOS 5.11           Last change: 2 Mar 2007                    7



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™