static void processLine(DrawHandler* hnd, jint x0, jint y0, jint x1, jint y1) { LineUtils_ProcessLine(DHND(hnd)->pRasInfo, DHND(hnd)->pixel, DHND(hnd)->pPrim->funcs.drawline, DHND(hnd)->pPrim, DHND(hnd)->pCompInfo, x0, y0, x1, y1, 0); }
static void ProcessPoly(SurfaceDataRasInfo *pRasInfo, DrawLineFunc *pLine, NativePrimitive *pPrim, CompositeInfo *pCompInfo, jint pixel, jint transX, jint transY, jint *xPointsPtr, jint *yPointsPtr, jint *nPointsPtr, jint numPolys, jboolean close) { int i; for (i = 0; i < numPolys; i++) { jint numPts = nPointsPtr[i]; if (numPts > 1) { jint x0, y0, x1, y1; jboolean empty = JNI_TRUE; x0 = x1 = transX + *xPointsPtr++; y0 = y1 = transY + *yPointsPtr++; while (--numPts > 0) { jint x2 = transX + *xPointsPtr++; jint y2 = transY + *yPointsPtr++; empty = (empty && x1 == x2 && y1 == y2); LineUtils_ProcessLine(pRasInfo, pixel, pLine, pPrim, pCompInfo, x1, y1, x2, y2, (numPts > 1 || close)); x1 = x2; y1 = y2; } if (close && (empty || x1 != x0 || y1 != y0)) { LineUtils_ProcessLine(pRasInfo, pixel, pLine, pPrim, pCompInfo, x1, y1, x0, y0, !empty); } } else if (numPts == 1) { xPointsPtr++; yPointsPtr++; } } }