ContentScaleAspect

    Window.swift:148
    enum ContentScaleAspect

    Cases

    • case ignore

      The aspect will be ignored. Scaling will simply stretch the content to fit the target size.

    • case keep

      The content’s aspect will be preserved. If the target size has different aspect from the base one, the image will be centered and black bars will appear on left and right sides.

    • case keepWidth

      The content can be expanded vertically. Scaling horizontally will result in keeping the width ratio and then black bars on left and right sides.

    • case keepHeight

      The content can be expanded horizontally. Scaling vertically will result in keeping the height ratio and then black bars on top and bottom sides.

    • case expand

      The content’s aspect will be preserved. If the target size has different aspect from the base one, the content will stay in the top-left corner and add an extra visible area in the stretched space.

    Other members in extension

    View members

    Hide members

    This section is hidden by default because it contains too many (124) members.

    Types

    Type members

    Instance members

    Show implementation details (1)

    Hide implementation details

    Citizens in SwiftGodot

    Conformances

    Type members

    Instance members

    Type features

    Instance features