home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
x
/
xibm.zip
/
ibm8514
/
brcGetSp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-09-20
|
2KB
|
75 lines
/*
* $Id: brcGetSp.c,v 1.1 1991/09/20 19:10:24 mtranle Exp $
*
* Copyright IBM Corporation 1987,1990
*
* All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of IBM not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
*
* IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*
*/
/*
* PRPQ 5799-PFF (C) COPYRIGHT IBM CORPORATION 1987,1990
* LICENSED MATERIALS - PROPERTY OF IBM
* REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
*/
#include "X.h"
#include "Xmd.h"
#include "region.h"
#include "gc.h"
#include "windowstr.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
#include "servermd.h"
#include "ibmTrace.h"
extern void ppcGetSpans() ;
void
ibm8514GetSpans( pDrawable, wMax, ppt, pwidth, nspans, pdstStart )
DrawablePtr pDrawable ;
int wMax ;
register DDXPointPtr ppt ;
int *pwidth ;
int nspans ;
unsigned long int *pdstStart ;
{
register unsigned long int *pdst ; /* where to put the bits */
register unsigned int width ;
if ( pDrawable->type != DRAWABLE_WINDOW )
{
ppcGetSpans( pDrawable, wMax, ppt, pwidth, nspans, pdstStart ) ;
return ;
}
/*******************************************************************/
/* read back the slices */
for ( pdst = pdstStart ; nspans-- ; ppt++, pwidth++ ) {
width = *pwidth ;
ibm8514ReadColorImage( ppt->x, ppt->y, width, 1, pdst,
( width + 3 ) & ~3 ) ;
pdst += ( width + 3 ) >> 2 ; /* width is in 32 bit words */
}
/*******************************************************************/
return ;
}