Back to index

lightning-sunbird  0.9+nobinonly
fbtrap.c File Reference
#include "pixman-xserver-compat.h"

Go to the source code of this file.


void fbRasterizeTrapezoid (PicturePtr pPicture, const xTrapezoid *trap, int x_off, int y_off)

Function Documentation

void fbRasterizeTrapezoid ( PicturePtr  pPicture,
const xTrapezoid trap,
int  x_off,
int  y_off 

Definition at line 95 of file fbtrap.c.

    FbBits    *buf;
    int              bpp;
    int              width;
    int              stride;
    int              height;
    int              pxoff, pyoff;

    xFixed    x_off_fixed;
    xFixed    y_off_fixed;
    RenderEdge       l, r;
    xFixed    t, b;
    fbGetDrawable (pPicture->pDrawable, buf, stride, bpp, pxoff, pyoff);

    width = pPicture->pDrawable->width;
    height = pPicture->pDrawable->height;
    x_off += pxoff;
    y_off += pyoff;
    x_off_fixed = IntToxFixed(x_off);
    y_off_fixed = IntToxFixed(y_off);
    t = trap->top + y_off_fixed;
    if (t < 0)
       t = 0;
    t = RenderSampleCeilY (t, bpp);

    b = trap->bottom + y_off_fixed;
    if (xFixedToInt (b) >= height)
       b = IntToxFixed (height) - 1;
    b = RenderSampleFloorY (b, bpp);
    if (b >= t)
       /* initialize edge walkers */
       RenderLineFixedEdgeInit (&l, bpp, t, &trap->left, x_off, y_off);
       RenderLineFixedEdgeInit (&r, bpp, t, &trap->right, x_off, y_off);
       fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);

Here is the call graph for this function:

Here is the caller graph for this function: