Lines Matching defs:spans
85 int count; /* number of spans */
120 #define YMIN(spans) (spans->points[0].y)
121 #define YMAX(spans) (spans->points[spans->count-1].y)
128 Spans *spans;
135 spans = spanGroup->group;
136 for (i = spanGroup->count; i; i--, spans++) {
137 if (YMIN(spans) <= ymax && ymin <= YMAX(spans)) {
141 spansCount = spans->count;
142 spansPt = spans->points;
143 spansWid = spans->widths;
174 spans->count--;
192 newPt = reallocarray(spans->points,
193 spans->count + EXTRA,
197 spansPt = newPt + (spansPt - spans->points);
198 spans->points = newPt;
199 newwid = reallocarray(spans->widths,
200 spans->count + EXTRA,
204 spansWid = newwid + (spansWid - spans->widths);
205 spans->widths = newwid;
212 spans->count++;
231 miAppendSpans(SpanGroup * spanGroup, SpanGroup * otherGroup, Spans * spans)
236 spansCount = spans->count;
244 spanGroup->group[spanGroup->count] = *spans;
246 ymin = spans->points[0].y;
249 ymax = spans->points[spansCount - 1].y;
253 miSubtractSpans(otherGroup, spans);
257 free(spans->points);
258 free(spans->widths);
358 UniquifySpansX(Spans * spans, DDXPointRec * newPoints, int *newWidths)
366 /* Uniquify the spans, and stash them into newPoints and newWidths. Return the
367 number of unique spans. */
371 oldPoints = spans->points;
372 oldWidths = spans->widths;
378 for (i = spans->count - 1; i != 0; i--) {
412 Spans *spans;
415 spans = spanGroup->group + i;
416 free(spans->points);
417 free(spans->widths);
425 Spans *spans;
430 /* Outgoing spans for one big call to FillSpans */
440 spans = spanGroup->group;
442 (pDraw, pGC, spans->count, spans->points, spans->widths, TRUE);
443 free(spans->points);
444 free(spans->widths);
475 for (i = 0, spans = spanGroup->group;
476 i != spanGroup->count; i++, spans++) {
480 for (j = 0, points = spans->points, widths = spans->widths;
481 j != spans->count; j++, points++, widths++) {
515 } /* for j through spans */
516 count += spans->count;
517 free(spans->points);
518 spans->points = NULL;
519 free(spans->widths);
520 spans->widths = NULL;
570 InitSpans(Spans * spans, size_t nspans)
572 spans->points = xallocarray(nspans, sizeof(*spans->points));
573 if (!spans->points)
575 spans->widths = xallocarray(nspans, sizeof(*spans->widths));
576 if (!spans->widths) {
577 free(spans->points);
616 * spans-based polygon filler
620 fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans * spans,
632 (*pGC->ops->FillSpans) (pDrawable, pGC, spans->count, spans->points,
633 spans->widths, TRUE);
634 free(spans->widths);
635 free(spans->points);
642 AppendSpanGroup(pGC, pixel, spans, spanData);