Lines Matching defs:draw
359 DashDraw& draw = draws.push_back(args);
367 // This is also necessary when the stroke width is zero, to allow hairlines to draw.
384 // draw it separately here and adjust our start point accordingly
386 if (draw.fPhase > 0 && draw.fPhase < draw.fIntervals[0]) {
388 startPts[0] = draw.fPtsRot[0];
390 startPts[1].fX = std::min(startPts[0].fX + draw.fIntervals[0] - draw.fPhase,
391 draw.fPtsRot[1].fX);
396 startAdj = draw.fIntervals[0] + draw.fIntervals[1] - draw.fPhase;
400 // adjustments for start and end of bounding rect so we only draw dash intervals
402 startAdj += calc_start_adjustment(draw.fIntervals, draw.fPhase);
404 draw.fPtsRot[0].fX += startAdj;
405 draw.fPhase = 0;
408 SkScalar endAdj = calc_end_adjustment(draw.fIntervals, draw.fPtsRot, draw.fPhase,
410 draw.fPtsRot[1].fX -= endAdj;
411 if (draw.fPtsRot[0].fX >= draw.fPtsRot[1].fX) {
417 // draw it separately here and adjust our end point accordingly
422 if (0 == endAdj && endingInterval != draw.fIntervals[0]) {
424 endPts[1] = draw.fPtsRot[1];
432 endAdj = endingInterval + draw.fIntervals[1];
434 draw.fPtsRot[1].fX -= endAdj;
435 if (draw.fPtsRot[0].fX >= draw.fPtsRot[1].fX) {
441 if (draw.fPtsRot[0].fX == draw.fPtsRot[1].fX &&
445 // dashes that we want to draw. The only way they can be equal is if the on interval
447 // is handled as well). Thus if the on interval is zero then we need to draw a cap
448 // at this position if the stroke has caps. The spec says we only draw this point if
450 // end (but not the start), and if so we don't draw the cap.
455 draw.fPhase = 0;
459 SkScalar* devIntervals = draw.fIntervals;
460 devIntervals[0] = draw.fIntervals[0] * args.fParallelScale;
461 devIntervals[1] = draw.fIntervals[1] * args.fParallelScale;
462 SkScalar devPhase = draw.fPhase * args.fParallelScale;
499 // Reset the start rect to draw this single solid rect
502 draw.fPtsRot[0].fX -= hasStartRect ? startAdj : 0;
503 draw.fPtsRot[1].fX += hasEndRect ? endAdj : 0;
504 startRect.setBounds(draw.fPtsRot, 2);
511 args.fSrcRotInv.mapPoints(devicePts, draw.fPtsRot, 2);
531 args.fSrcRotInv.mapPoints(devicePts, draw.fPtsRot, 2);
532 draw.fLineLength = SkPoint::Distance(devicePts[0], devicePts[1]);
534 draw.fLineLength += 2.f * halfDevStroke;
537 bounds.setLTRB(draw.fPtsRot[0].fX, draw.fPtsRot[0].fY,
538 draw.fPtsRot[1].fX, draw.fPtsRot[1].fY);
552 draw.fStartOffset = startOffset;
553 draw.fDevBloatX = devBloatX;
554 draw.fPerpendicularScale = args.fPerpendicularScale;
555 draw.fStrokeWidth = strokeWidth;
556 draw.fHasStartRect = hasStartRect;
557 draw.fLineDone = lineDone;
558 draw.fHasEndRect = hasEndRect;
701 * This effect will draw a dotted line (defined as a dashed lined with round caps and no on
901 * This effect will draw a dashed line. The width of the dash is given by the strokeWidth and the