# Orientation

``````@objc(PESDKOrientation)
public enum Orientation : Int``````
``extension Orientation: CustomStringConvertible``

Represents the orientation of an image and has the same meaning as the corresponding EXIF value.

• ``` normal ```

Row 0 is at the top, column 0 is on the left.

#### Declaration

Swift

``case normal = 1``
• ``` flipX ```

Row 0 is at the top, column 0 is on the right.

#### Declaration

Swift

``case flipX``
• ``` rotate180 ```

Row 0 is at the bottom, column 0 is on the right.

#### Declaration

Swift

``case rotate180``
• ``` flipY ```

Row 0 is at the bottom, column 0 is on the left.

#### Declaration

Swift

``case flipY``
• ``` transverse ```

Row 0 is on the left, column 0 is at the top.

#### Declaration

Swift

``case transverse``
• ``` rotate90 ```

Row 0 is on the right, column 0 is at the top.

#### Declaration

Swift

``case rotate90``
• ``` transpose ```

Row 0 is on the right, column 0 is at the bottom.

#### Declaration

Swift

``case transpose``
• ``` rotate270 ```

Row 0 is on the left, column 0 is at the bottom.

#### Declaration

Swift

``case rotate270``
• ``` exifValue ```

The corresponding EXIF value converted as `Int32`.

#### Declaration

Swift

``public var exifValue: Int32 { get }``
• ``` init(imageOrientation:) ```

Creates an `Orientation` that corresponds to the given `UIImageOrientation`.

#### Declaration

Swift

``public init(imageOrientation: UIImage.Orientation)``

#### Parameters

 ``` imageOrientation ``` A `UIImageOrientation`.

#### Return Value

A corresponding orientation.

• ``` concatenating(_:) ```

Creates an orientation constructed by combining two existing orientations.

#### Declaration

Swift

``public func concatenating(_ o2: Orientation) -> Orientation``

#### Parameters

 ``` o2 ``` The orientation to concatenate to this orientation.

#### Return Value

A new orientation.

• ``` orientation(between:) ```

Creates a new orientation that is between two other orientations.

#### Declaration

Swift

``public func orientation(between o2: Orientation) -> Orientation``

#### Parameters

 ``` o2 ``` The second orientation.

#### Return Value

A new orientation.

• ``` inversed ```

The inverse orientation of the receiver.

#### Declaration

Swift

``public var inversed: Orientation { get }``
• ``` transform(with:) ```

Creates a `CGAffineTransform` for an object of the given size that represents the receiver’s orientation.

#### Declaration

Swift

``public func transform(with size: CGSize) -> CGAffineTransform``

#### Parameters

 ``` size ``` The size of the object. This is needed to calulcate the correct translations.

#### Return Value

A `CGAffineTransform`.

• ``` isMirrored ```

Whether the orientation represents a mirrored orientation.

#### Declaration

Swift

``public var isMirrored: Bool { get }``
• ``` calculateOrientationParameters() ```

Calculate the components that make the current orientation.

#### Declaration

Swift

``public func calculateOrientationParameters() -> (angle: Int, flippedHorizontally: Bool, flippedVertically: Bool)``

#### Return Value

The angle and flipped states.

• ``` init(angle:flippedHorizontally:flippedVertically:) ```

Calculates the Orientation for the given values.

#### Declaration

Swift

``init?(angle: Int, flippedHorizontally: Bool, flippedVertically: Bool)``

#### Return Value

An orientation or nil, if the values didn’t match a valid configuration.
{"ft_lang_label":"__label__en","ft_lang_prob":0.6259556,"math_prob":0.75508356,"size":2671,"snap":"2020-10-2020-16","text_gpt3_token_len":614,"char_repetition_ratio":0.24634421,"word_repetition_ratio":0.29396984,"special_character_ratio":0.20404343,"punctuation_ratio":0.13378684,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95256823,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-03-28T23:34:47Z\",\"WARC-Record-ID\":\"<urn:uuid:6398f00b-e57f-4c92-8e36-b00c08731371>\",\"Content-Length\":\"118468\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a82e40d7-a87c-4e1d-b502-6fcb0f49e99d>\",\"WARC-Concurrent-To\":\"<urn:uuid:5e2df873-d02e-42ff-af4e-398e1cdd776e>\",\"WARC-IP-Address\":\"185.199.110.153\",\"WARC-Target-URI\":\"https://docs.videoeditorsdk.com/apidocs/ios/v10_8/Enums/Orientation.html\",\"WARC-Payload-Digest\":\"sha1:N5YOR4KKFNW5VH46DU4ROCNGUWLWRUSY\",\"WARC-Block-Digest\":\"sha1:RIHXKAFV7CPYCPKDQJT2PNX2MQOSRHFK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585370493121.36_warc_CC-MAIN-20200328225036-20200329015036-00346.warc.gz\"}"}