Contents

scale(x:y:anchor:)

Scales this shape without changing its bounding frame.

Declaration

func scale(x: CGFloat = 1, y: CGFloat = 1, anchor: UnitPoint = .center) -> ScaledShape<Self>

Parameters

  • x:

    The multiplication factor used to resize this shape along its x-axis.

  • y:

    The multiplication factor used to resize this shape along its y-axis.

Return Value

A scaled form of this shape.

Discussion

Both the x and y multiplication factors halve their respective dimension’s size when set to 0.5, maintain their existing size when set to 1, double their size when set to 2, and so forth.

See Also

Transforming a shape