CameraZoomClamping

public enum CameraZoomClamping : CGFloat

The CameraZoomClamping enumeration denotes the camera zoom rounding factor. Clamps the zoom value to the nearest whole pixel value in order to alleviate cracks appearing in between individual tiles.

Properties

  • none: do not clamp camera zoom.
  • half: clamp zoom to the nearest half-pixel.
  • third: clamp zoom to the nearest third of a pixel.
  • quarter: clamp zoom to the nearest quarter of a pixel.
  • tenth: clamp zoom to the nearest 1/10 of a pixel.

Extensions

  • Returns an array of all camera zoom modes.

    Declaration

    Swift

    public static func allModes() -> [CameraZoomClamping]

    Return Value

    current camera zoom modes.

  • Returns the next camera clamping mode.

    Declaration

    Swift

    public func next() -> CameraZoomClamping

    Return Value

    next camera zoom clamping mode.

  • The minimum possible value for a given zoom clamping level.

    Declaration

    Swift

    public var minimum: CGFloat { get }