Lines Matching refs:line

40  * Info about the AA line we're rendering
48 GLfloat halfWidth; /* half of line width */
49 GLfloat xAdj, yAdj; /* X and Y adjustment for quad corners around line */
77 * Compute the equation of a plane used to interpolate line fragment data
79 * Input: (x0, y0) and (x1,y1) are the endpoints of the line.
84 * We take the endpoints of the line and compute a plane such that
85 * the cross product of the line vector and the plane normal is
326 typedef void (*plot_func)(struct gl_context *ctx, struct LineInfo *line,
332 * Draw an AA line segment (called many times per line when stippling)
336 struct LineInfo *line,
340 const GLfloat absDx = (line->dx < 0.0F) ? -line->dx : line->dx;
341 const GLfloat absDy = (line->dy < 0.0F) ? -line->dy : line->dy;
343 const GLfloat x0 = line->x0 + t0 * line->dx;
344 const GLfloat y0 = line->y0 + t0 * line->dy;
345 const GLfloat x1 = line->x0 + t1 * line->dx;
346 const GLfloat y1 = line->y0 + t1 * line->dy;
348 /* compute vertices of the line-aligned quadrilateral */
349 line->qx0 = x0 - line->yAdj;
350 line->qy0 = y0 + line->xAdj;
351 line->qx1 = x0 + line->yAdj;
352 line->qy1 = y0 - line->xAdj;
353 line->qx2 = x1 + line->yAdj;
354 line->qy2 = y1 - line->xAdj;
355 line->qx3 = x1 - line->yAdj;
356 line->qy3 = y1 + line->xAdj;
358 line->ex0 = line->qx1 - line->qx0;
359 line->ey0 = line->qy1 - line->qy0;
360 line->ex1 = line->qx2 - line->qx1;
361 line->ey1 = line->qy2 - line->qy1;
362 line->ex2 = line->qx3 - line->qx2;
363 line->ey2 = line->qy3 - line->qy2;
364 line->ex3 = line->qx0 - line->qx3;
365 line->ey3 = line->qy0 - line->qy3;
368 /* X-major line */
369 GLfloat dydx = line->dy / line->dx;
373 xLeft = x0 - line->halfWidth;
374 xRight = x1 + line->halfWidth;
375 if (line->dy >= 0.0) {
376 yBot = y0 - 3.0F * line->halfWidth;
377 yTop = y0 + line->halfWidth;
380 yBot = y0 - line->halfWidth;
381 yTop = y0 + 3.0F * line->halfWidth;
385 xLeft = x1 - line->halfWidth;
386 xRight = x0 + line->halfWidth;
387 if (line->dy <= 0.0) {
388 yBot = y1 - 3.0F * line->halfWidth;
389 yTop = y1 + line->halfWidth;
392 yBot = y1 - line->halfWidth;
393 yTop = y1 + 3.0F * line->halfWidth;
397 /* scan along the line, left-to-right */
405 /* scan across the line, bottom-to-top */
407 (*plot)(ctx, line, ix, iy);
414 /* Y-major line */
415 GLfloat dxdy = line->dx / line->dy;
419 yBot = y0 - line->halfWidth;
420 yTop = y1 + line->halfWidth;
421 if (line->dx >= 0.0) {
422 xLeft = x0 - 3.0F * line->halfWidth;
423 xRight = x0 + line->halfWidth;
426 xLeft = x0 - line->halfWidth;
427 xRight = x0 + 3.0F * line->halfWidth;
431 yBot = y1 - line->halfWidth;
432 yTop = y0 + line->halfWidth;
433 if (line->dx <= 0.0) {
434 xLeft = x1 - 3.0F * line->halfWidth;
435 xRight = x1 + line->halfWidth;
438 xLeft = x1 - line->halfWidth;
439 xRight = x1 + 3.0F * line->halfWidth;
443 /* scan along the line, bottom-to-top */
451 /* scan across the line, left-to-right */
453 (*plot)(ctx, line, ix, iy);