Lines Matching refs:line
42 * Info about the AA line we're rendering
50 GLfloat halfWidth; /* half of line width */
51 GLfloat xAdj, yAdj; /* X and Y adjustment for quad corners around line */
79 * Compute the equation of a plane used to interpolate line fragment data
81 * Input: (x0, y0) and (x1,y1) are the endpoints of the line.
86 * We take the endpoints of the line and compute a plane such that
87 * the cross product of the line vector and the plane normal is
328 typedef void (*plot_func)(struct gl_context *ctx, struct LineInfo *line,
334 * Draw an AA line segment (called many times per line when stippling)
338 struct LineInfo *line,
342 const GLfloat absDx = (line->dx < 0.0F) ? -line->dx : line->dx;
343 const GLfloat absDy = (line->dy < 0.0F) ? -line->dy : line->dy;
345 const GLfloat x0 = line->x0 + t0 * line->dx;
346 const GLfloat y0 = line->y0 + t0 * line->dy;
347 const GLfloat x1 = line->x0 + t1 * line->dx;
348 const GLfloat y1 = line->y0 + t1 * line->dy;
350 /* compute vertices of the line-aligned quadrilateral */
351 line->qx0 = x0 - line->yAdj;
352 line->qy0 = y0 + line->xAdj;
353 line->qx1 = x0 + line->yAdj;
354 line->qy1 = y0 - line->xAdj;
355 line->qx2 = x1 + line->yAdj;
356 line->qy2 = y1 - line->xAdj;
357 line->qx3 = x1 - line->yAdj;
358 line->qy3 = y1 + line->xAdj;
360 line->ex0 = line->qx1 - line->qx0;
361 line->ey0 = line->qy1 - line->qy0;
362 line->ex1 = line->qx2 - line->qx1;
363 line->ey1 = line->qy2 - line->qy1;
364 line->ex2 = line->qx3 - line->qx2;
365 line->ey2 = line->qy3 - line->qy2;
366 line->ex3 = line->qx0 - line->qx3;
367 line->ey3 = line->qy0 - line->qy3;
370 /* X-major line */
371 GLfloat dydx = line->dy / line->dx;
375 xLeft = x0 - line->halfWidth;
376 xRight = x1 + line->halfWidth;
377 if (line->dy >= 0.0F) {
378 yBot = y0 - 3.0F * line->halfWidth;
379 yTop = y0 + line->halfWidth;
382 yBot = y0 - line->halfWidth;
383 yTop = y0 + 3.0F * line->halfWidth;
387 xLeft = x1 - line->halfWidth;
388 xRight = x0 + line->halfWidth;
389 if (line->dy <= 0.0F) {
390 yBot = y1 - 3.0F * line->halfWidth;
391 yTop = y1 + line->halfWidth;
394 yBot = y1 - line->halfWidth;
395 yTop = y1 + 3.0F * line->halfWidth;
399 /* scan along the line, left-to-right */
407 /* scan across the line, bottom-to-top */
409 (*plot)(ctx, line, ix, iy);
416 /* Y-major line */
417 GLfloat dxdy = line->dx / line->dy;
421 yBot = y0 - line->halfWidth;
422 yTop = y1 + line->halfWidth;
423 if (line->dx >= 0.0F) {
424 xLeft = x0 - 3.0F * line->halfWidth;
425 xRight = x0 + line->halfWidth;
428 xLeft = x0 - line->halfWidth;
429 xRight = x0 + 3.0F * line->halfWidth;
433 yBot = y1 - line->halfWidth;
434 yTop = y0 + line->halfWidth;
435 if (line->dx <= 0.0F) {
436 xLeft = x1 - 3.0F * line->halfWidth;
437 xRight = x1 + line->halfWidth;
440 xLeft = x1 - line->halfWidth;
441 xRight = x1 + 3.0F * line->halfWidth;
445 /* scan along the line, bottom-to-top */
453 /* scan across the line, left-to-right */
455 (*plot)(ctx, line, ix, iy);