lerpFrom method

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

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

Implementation

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