lerpTo method

  1. @override
IGuiShape lerpTo(
  1. IGuiShape shape,
  2. double t
)
override

Linearly interpolate from this shape to other shape by an extrapolation factor t.

Implementation

@override
IGuiShape lerpTo(IGuiShape shape, double t) {
  if (shape is GuiShapeCustom) {
    return GuiShapeCustom(
        points: _lerp(points, shape.points, t),
        rotate: GeoAngle(
            radian: lerpDouble(rotate.radian, shape.rotate.radian, t)),
        clockwise: clockwise,
        boxFit: boxFit,
        cornerRadius: lerpDouble(cornerRadius, shape.cornerRadius, t)!);
  } else {
    return GuiShapeCustom(
        points: points,
        rotate: rotate,
        clockwise: clockwise,
        boxFit: boxFit,
        cornerRadius: cornerRadius);
  }
}