/*
* Copyright © 1998 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, 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 Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD 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.
*/
/*
* This file defines functions for drawing some primitives using
* underlying datatypes instead of masks
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifdef BITSMUL
#else
#endif
#ifdef BITSSTORE
#else
#endif
#ifdef BITSRROP
#else
#endif
#ifdef BITSUNIT
#define USE_SOLID
#else
#endif
/*
* Define the following before including this file:
*
* BRESSOLID name of function for drawing a solid segment
* BRESDASH name of function for drawing a dashed segment
* DOTS name of function for drawing dots
* ARC name of function for drawing a solid arc
* BITS type of underlying unit
*/
#ifdef BRESSOLID
void
int dashOffset,
int signdx,
{
int dstBpp;
bits =
if (signdy < 0)
bitsStride = -bitsStride;
}
else {
}
while (len--) {
e += e1;
if (e >= 0) {
e += e3;
}
}
}
#endif
#ifdef BRESDASH
void
int dashOffset,
int signdx,
{
int dstBpp;
int dashlen;
bits =
if (signdy < 0)
bitsStride = -bitsStride;
}
else {
}
if (doOdd) {
if (!even)
goto doubleOdd;
for (;;) {
while (dashlen--) {
if ((e += e1) >= 0) {
e += e3;
}
}
if (!len)
break;
while (dashlen--) {
if ((e += e1) >= 0) {
e += e3;
}
}
if (!len)
break;
}
}
else {
if (!even)
goto onOffOdd;
for (;;) {
while (dashlen--) {
if ((e += e1) >= 0) {
e += e3;
}
}
if (!len)
break;
while (dashlen--) {
if ((e += e1) >= 0) {
e += e3;
}
}
if (!len)
break;
}
}
}
#endif
#ifdef DOTS
void
int dstBpp,
{
if (and == 0) {
while (npt--) {
}
}
}
else {
while (npt--) {
}
}
}
}
#endif
#ifdef ARC
void
{
int x;
int y, a, b, d, mask;
MIARCSETUP();
yoffset = y ? bitsStride : 0;
dyoffset = 0;
if (andBits == 0) {
if (mask & 2)
if (mask & 8)
}
else {
if (mask & 2)
if (mask & 8)
}
}
}
while (1) {
if (andBits == 0) {
}
else {
}
if (a < 0)
break;
if (andBits == 0) {
}
else {
}
xoffset += bitsStride;
);
}
x = info.w;
}
else if (do360) {
);
if (andBits == 0) {
}
else {
}
, yoffset += bitsStride;
);
}
}
else {
);
}
if (andBits == 0) {
if (mask & 1)
if (mask & 2)
if (mask & 4)
if (mask & 8)
}
else {
if (mask & 1)
if (mask & 2)
if (mask & 4)
if (mask & 8)
}
}
, yoffset += bitsStride;
);
}
}
if (andBits == 0) {
if (mask & 1)
if (mask & 4)
if (mask & 2)
if (mask & 8)
}
}
else {
if (mask & 1)
if (mask & 4)
if (mask & 2)
if (mask & 8)
}
}
}
#endif
#ifdef GLYPH
#if BITMAP_BIT_ORDER == LSBFirst
#define WRITE_ADDR1(n) (n)
#define WRITE_ADDR2(n) (n)
#define WRITE_ADDR4(n) (n)
#else
#define WRITE_ADDR4(n) ((n))
#endif
#ifdef BITS2
#else
#endif
#ifdef BITS4
#else
#endif
void
{
int lshift;
int n;
int shift;
dstLine += x & ~3;
shift = x & 3;
while (height--) {
n = lshift;
while (bits) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
case 11:
break;
case 12:
break;
case 13:
break;
case 14:
break;
case 15:
break;
}
n = 4;
dst += 4;
}
}
}
#endif
#ifdef POLYLINE
void
{
int dstStride;
int dstBpp;
int dashoffset = 0;
int octant;
if (mode == CoordModePrevious)
bitsBase =
npt--;
npt--;
for (;;) {
if (!npt) {
return;
}
npt--;
}
else {
for (;;) {
octant);
}
e = -len;
e1 <<= 1;
e3 = e << 1;
if (and == 0) {
while (len--) {
e += e1;
if (e >= 0) {
e += e3;
}
}
}
else {
while (len--) {
e += e1;
if (e >= 0) {
e += e3;
}
}
}
if (!npt) {
}
return;
}
--npt;
break;
}
}
}
}
#endif
#ifdef POLYSEGMENT
void
{
int dstStride;
int dstBpp;
int dashoffset = 0;
int octant;
bitsBase =
while (nseg--) {
!capNotLast, &dashoffset);
}
else {
octant);
#if MUL != 1
#endif
) {
int nmiddle;
if (stepmajor < 0) {
if (capNotLast)
x1++;
}
else {
if (!capNotLast)
x2++;
}
if (startmask) {
startmask));
dstLine++;
}
if (!andBits)
while (nmiddle--)
else
while (nmiddle--) {
dstLine++;
}
if (endmask)
endmask));
}
else {
}
e = -len;
e1 <<= 1;
e3 = e << 1;
if (!capNotLast)
len++;
if (and == 0) {
while (len--) {
e += e1;
if (e >= 0) {
e += e3;
}
}
}
else {
while (len--) {
e += e1;
if (e >= 0) {
e += e3;
}
}
}
}
}
}
}
#endif