Annotation of 43BSD/contrib/X/libqvss/ddxdrawfill.c, revision 1.1.1.1

1.1       root        1: /************************************************************************/
                      2: /************************************************************************/
                      3: /*                                                                     */
                      4: /*      DDX FILL INTERFACE                                             */
                      5: /*                                                                     */
                      6: /*     written by : MATT CORKUM  09-25-85                              */
                      7: /*                                                                     */
                      8: /*                                                                     */
                      9: /*      The ddx fill interface code                                    */
                     10: /*                                                                     */
                     11: /*                                                                     */
                     12: /*     Modification History:                                           */
                     13: /*                                                                     */
                     14: /*     8511.04 (Carver) When filling with constant make sure to mask   */
                     15: /*                      srcpix to one bit.                             */
                     16: /*                                                                     */
                     17: /*     8509.30 (Corkum) Make the code work in a test environment.      */
                     18: /*                                                                     */
                     19: /*                                                                     */
                     20: /************************************************************************/
                     21: /************************************************************************/
                     22: 
                     23: #include "ddxqvss.h"
                     24: #include "qvss.h"
                     25: #include "extern.h"
                     26: #include "vstagbl.h"
                     27: 
                     28: extern BITMAP pbm;
                     29: 
                     30: 
                     31: 
                     32: /*ARGSUSED*/
                     33: DrawFilled (verts, vertcount, xbase, ybase, srcpix, tile, xoff, yoff,
                     34:            clips, clipcount, func, zmask)
                     35:        Vertex *verts;
                     36:        register PIXMAP *tile;
                     37:        int vertcount, xbase, ybase, srcpix, xoff, yoff, clipcount, zmask;
                     38:        register int func;
                     39:        CLIP *clips;
                     40: {
                     41: 
                     42:        long    error;                          /* error value to be returned*/
                     43:        short   *newvert;                       /* new vertex list           */
                     44:        int     newvertcnt;                     /* new vertex count          */
                     45:        int     src, src_type;                  /* source information        */
                     46: 
                     47:        if (!(zmask & 0x0001)) return;
                     48: 
                     49: 
                     50:        /* pre-process the specified path list ..... create another one 
                     51:           containing only absolute straight line drawing */
                     52: 
                     53:        /* for a fill operation the destination offsets are zero, however we
                     54:                call the pathlist converter routine to make an absolute,
                     55:                (pertaining to not relative), and straight line pathlist */
                     56: 
                     57:        error = path_list_converter( &verts, &vertcount, xbase, ybase, 
                     58:                                     &newvert, &newvertcnt );
                     59: 
                     60:        if ( error )
                     61: 
                     62:                return (error);  
                     63: 
                     64:        if ( tile == 0 )   /* if no halftone pattern exists then use the
                     65:                                constant source to perform the fill */
                     66: 
                     67:                {
                     68: 
                     69:                src_type = VSTA$K_SRC_CONST;
                     70: 
                     71:                error = fillhalf ( 
                     72:                                src_type, (srcpix & 1), 0, 0,  0, 0,  
                     73:                                (short *)pbm.data, pbm.width, pbm.height, 
                     74:                                0, 0, func, newvertcnt, newvert, clipcount, 
                     75:                                clips);
                     76: 
                     77:                }               
                     78:                
                     79:        else /* fill with a halftone */
                     80:        
                     81:                {
                     82: 
                     83:                register BITMAP *bm = (BITMAP *) tile->data;
                     84: 
                     85:                src_type  = VSTA$K_SRC_HT_BITMAP;
                     86: 
                     87:                error = fillhalf ( src_type, (short *)bm->data, 
                     88:                        bm->width, bm->height, xoff, yoff,
                     89:                        (short *)pbm.data, pbm.width, pbm.height, 
                     90:                        0, 0, func, newvertcnt, 
                     91:                        newvert, clipcount, clips);
                     92: 
                     93:                };
                     94: 
                     95: 
                     96: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.