Lines Matching refs:fRadii
40 memset(fRadii, 0, sizeof(fRadii)); in setOval()
44 fRadii[i].set(xRad, yRad); in setOval()
77 fRadii[i].set(xRad, yRad); in setRectXY()
138 fRadii[kUpperLeft_Corner].set(leftRad, topRad); in setNinePatch()
139 fRadii[kUpperRight_Corner].set(rightRad, topRad); in setNinePatch()
140 fRadii[kLowerRight_Corner].set(rightRad, bottomRad); in setNinePatch()
141 fRadii[kLowerLeft_Corner].set(leftRad, bottomRad); in setNinePatch()
186 memcpy(fRadii, radii, sizeof(fRadii)); in setRectRadii()
188 if (clamp_to_zero(fRadii)) { in setRectRadii()
209 memset(fRadii, 0, sizeof(fRadii)); in initializeRect()
245 scale = compute_min_scale(fRadii[0].fX, fRadii[1].fX, width, scale); in scaleRadii()
246 scale = compute_min_scale(fRadii[1].fY, fRadii[2].fY, height, scale); in scaleRadii()
247 scale = compute_min_scale(fRadii[2].fX, fRadii[3].fX, width, scale); in scaleRadii()
248 scale = compute_min_scale(fRadii[3].fY, fRadii[0].fY, height, scale); in scaleRadii()
250 flush_to_zero(fRadii[0].fX, fRadii[1].fX); in scaleRadii()
251 flush_to_zero(fRadii[1].fY, fRadii[2].fY); in scaleRadii()
252 flush_to_zero(fRadii[2].fX, fRadii[3].fX); in scaleRadii()
253 flush_to_zero(fRadii[3].fY, fRadii[0].fY); in scaleRadii()
256 SkScaleToSides::AdjustRadii(width, scale, &fRadii[0].fX, &fRadii[1].fX); in scaleRadii()
257 SkScaleToSides::AdjustRadii(height, scale, &fRadii[1].fY, &fRadii[2].fY); in scaleRadii()
258 SkScaleToSides::AdjustRadii(width, scale, &fRadii[2].fX, &fRadii[3].fX); in scaleRadii()
259 SkScaleToSides::AdjustRadii(height, scale, &fRadii[3].fY, &fRadii[0].fY); in scaleRadii()
263 clamp_to_zero(fRadii); in scaleRadii()
284 if (x < fRect.fLeft + fRadii[kUpperLeft_Corner].fX && in checkCornerContainment()
285 y < fRect.fTop + fRadii[kUpperLeft_Corner].fY) { in checkCornerContainment()
288 canonicalPt.set(x - (fRect.fLeft + fRadii[kUpperLeft_Corner].fX), in checkCornerContainment()
289 y - (fRect.fTop + fRadii[kUpperLeft_Corner].fY)); in checkCornerContainment()
291 } else if (x < fRect.fLeft + fRadii[kLowerLeft_Corner].fX && in checkCornerContainment()
292 y > fRect.fBottom - fRadii[kLowerLeft_Corner].fY) { in checkCornerContainment()
295 canonicalPt.set(x - (fRect.fLeft + fRadii[kLowerLeft_Corner].fX), in checkCornerContainment()
296 y - (fRect.fBottom - fRadii[kLowerLeft_Corner].fY)); in checkCornerContainment()
298 } else if (x > fRect.fRight - fRadii[kUpperRight_Corner].fX && in checkCornerContainment()
299 y < fRect.fTop + fRadii[kUpperRight_Corner].fY) { in checkCornerContainment()
302 canonicalPt.set(x - (fRect.fRight - fRadii[kUpperRight_Corner].fX), in checkCornerContainment()
303 y - (fRect.fTop + fRadii[kUpperRight_Corner].fY)); in checkCornerContainment()
305 } else if (x > fRect.fRight - fRadii[kLowerRight_Corner].fX && in checkCornerContainment()
306 y > fRect.fBottom - fRadii[kLowerRight_Corner].fY) { in checkCornerContainment()
309 canonicalPt.set(x - (fRect.fRight - fRadii[kLowerRight_Corner].fX), in checkCornerContainment()
310 y - (fRect.fBottom - fRadii[kLowerRight_Corner].fY)); in checkCornerContainment()
324 SkScalar dist = SkScalarSquare(canonicalPt.fX) * SkScalarSquare(fRadii[index].fY) + in checkCornerContainment()
325 SkScalarSquare(canonicalPt.fY) * SkScalarSquare(fRadii[index].fX); in checkCornerContainment()
326 return dist <= SkScalarSquare(fRadii[index].fX * fRadii[index].fY); in checkCornerContainment()
330 SkScalar simpleRadius = rr.fRadii[0].fX; in IsNearlySimpleCircular()
331 return SkScalarNearlyEqual(simpleRadius, rr.fRadii[0].fY, tolerance) && in IsNearlySimpleCircular()
332 SkScalarNearlyEqual(simpleRadius, rr.fRadii[1].fX, tolerance) && in IsNearlySimpleCircular()
333 SkScalarNearlyEqual(simpleRadius, rr.fRadii[1].fY, tolerance) && in IsNearlySimpleCircular()
334 SkScalarNearlyEqual(simpleRadius, rr.fRadii[2].fX, tolerance) && in IsNearlySimpleCircular()
335 SkScalarNearlyEqual(simpleRadius, rr.fRadii[2].fY, tolerance) && in IsNearlySimpleCircular()
336 SkScalarNearlyEqual(simpleRadius, rr.fRadii[3].fX, tolerance) && in IsNearlySimpleCircular()
337 SkScalarNearlyEqual(simpleRadius, rr.fRadii[3].fY, tolerance); in IsNearlySimpleCircular()
341 return SkScalarNearlyEqual(rr.fRadii[0].fX, rr.fRadii[0].fY, tolerance) && in AllCornersCircular()
342 SkScalarNearlyEqual(rr.fRadii[1].fX, rr.fRadii[1].fY, tolerance) && in AllCornersCircular()
343 SkScalarNearlyEqual(rr.fRadii[2].fX, rr.fRadii[2].fY, tolerance) && in AllCornersCircular()
344 SkScalarNearlyEqual(rr.fRadii[3].fX, rr.fRadii[3].fY, tolerance); in AllCornersCircular()
379 for (size_t i = 0; i < std::size(fRadii); ++i) { in computeType()
380 SkASSERT((fRadii[i] == SkVector{0, 0})); in computeType()
388 bool allCornersSquare = 0 == fRadii[0].fX || 0 == fRadii[0].fY; in computeType()
391 if (0 != fRadii[i].fX && 0 != fRadii[i].fY) { in computeType()
396 if (fRadii[i].fX != fRadii[i-1].fX || fRadii[i].fY != fRadii[i-1].fY) { in computeType()
408 if (fRadii[0].fX >= SkScalarHalf(fRect.width()) && in computeType()
409 fRadii[0].fY >= SkScalarHalf(fRect.height())) { in computeType()
418 if (radii_are_nine_patch(fRadii)) { in computeType()
475 dst->fRadii[i].fX = SkScalarHalf(newRect.width()); in transform()
476 dst->fRadii[i].fY = SkScalarHalf(newRect.height()); in transform()
500 dst->fRadii[i].fX = fRadii[src].fY; in transform()
501 dst->fRadii[i].fY = fRadii[src].fX; in transform()
505 dst->fRadii[i].fX = fRadii[i].fX; in transform()
506 dst->fRadii[i].fY = fRadii[i].fY; in transform()
522 dst->fRadii[i].fX *= xScale; in transform()
523 dst->fRadii[i].fY *= yScale; in transform()
531 swap(dst->fRadii[kUpperLeft_Corner], dst->fRadii[kLowerRight_Corner]); in transform()
532 swap(dst->fRadii[kUpperRight_Corner], dst->fRadii[kLowerLeft_Corner]); in transform()
535 swap(dst->fRadii[kUpperRight_Corner], dst->fRadii[kUpperLeft_Corner]); in transform()
536 swap(dst->fRadii[kLowerRight_Corner], dst->fRadii[kLowerLeft_Corner]); in transform()
540 swap(dst->fRadii[kUpperLeft_Corner], dst->fRadii[kLowerLeft_Corner]); in transform()
541 swap(dst->fRadii[kUpperRight_Corner], dst->fRadii[kLowerRight_Corner]); in transform()
544 if (!AreRectAndRadiiValid(dst->fRect, dst->fRadii)) { in transform()
569 memset(dst->fRadii, 0, sizeof(dst->fRadii)); in inset()
579 memcpy(radii, fRadii, sizeof(radii)); in inset()
613 this->setRectRadii(raw.fRect, raw.fRadii); in readFromMemory()
633 SkAppendScalar(&strX, fRadii[i].x(), asType); in dumpToString()
634 SkAppendScalar(&strY, fRadii[i].y(), asType); in dumpToString()
637 line.appendf(" /* %f %f */", fRadii[i].x(), fRadii[i].y()); in dumpToString()
658 if (!AreRectAndRadiiValid(fRect, fRadii)) { in isValid()
662 bool allRadiiZero = (0 == fRadii[0].fX && 0 == fRadii[0].fY); in isValid()
663 bool allCornersSquare = (0 == fRadii[0].fX || 0 == fRadii[0].fY); in isValid()
667 if (0 != fRadii[i].fX || 0 != fRadii[i].fY) { in isValid()
671 if (fRadii[i].fX != fRadii[i-1].fX || fRadii[i].fY != fRadii[i-1].fY) { in isValid()
675 if (0 != fRadii[i].fX && 0 != fRadii[i].fY) { in isValid()
679 bool patchesOfNine = radii_are_nine_patch(fRadii); in isValid()
702 if (!SkScalarNearlyEqual(fRadii[i].fX, SkRectPriv::HalfWidth(fRect)) || in isValid()
703 !SkScalarNearlyEqual(fRadii[i].fY, SkRectPriv::HalfHeight(fRect))) { in isValid()
898 if (!getIntersectionRadii(intersection.fRect, c, &intersection.fRadii[c])) { in ConservativeIntersect()
908 if (!SkRRect::AreRectAndRadiiValid(intersection.fRect, intersection.fRadii) || in ConservativeIntersect()