schema_version: 7.0
type: transition
identifier: affine
title: Transform
version: 8
copyright: Meltytech, LLC
creator: Charles Yates
contributor:
  - Dan Dennedy
license: LGPLv2.1
language: en
tags:
  - Video
parameters:
  - identifier: distort
    title: Ignore aspect ratio
    description: >
      Determines whether the image aspect ratio will be distorted while scaling
      to completely fill the rectangle.
    type: boolean
    default: 0
    mutable: yes
    widget: checkbox

  - identifier: fill
    title: Fill rectangle
    description: >
      Determines whether the image will be scaled up to fill the rectangle.
      Otherwise, if the B frame image fits within the rectangle, it will not
      be scaled. If 0, and the B frame image exceeds the rectangle, then it is
      scaled down to fit within the rectangle.
    type: boolean
    default: 1
    mutable: yes
    widget: checkbox

  - identifier: repeat_off
    title: Disable looping
    description: >
      When animating properties with keyframes, whether to repeat the animation
      after it reaches the last key frame.
    type: boolean
    default: 0
    mutable: yes
    widget: checkbox

  - identifier: mirror_off
    title: Disable ping-pong
    description: >
      When animating properties with keyframes and repeat_off=0, whether
      the animation alternates between reverses and forwards for each
      repetition.
    type: boolean
    default: 0
    mutable: yes
    widget: checkbox

  - identifier: cycle
    title: Period
    description: >
      The duration to use when interpreting key frames for animation.
      If 0, the default, the transition length is used.
      If in range (0, 1), a percentage of transition length; otherwise,
      the number of frames.
    type: float
    default: 0
    mutable: yes

  - identifier: keyed
    title: Key-framed
    description: Whether rotate, shear, and offset are key-framed or not.
    type: boolean
    default: 0
    mutable: yes
    widget: checkbox

  - identifier: ox
    title: Horizontal offset
    type: float
    minimum: 0
    default: 0
    mutable: yes
    animation: yes
    unit: pixels

  - identifier: oy
    title: Vertical offset
    type: float
    minimum: 0
    default: 0
    mutable: yes
    animation: yes
    unit: pixels

  - identifier: rotate_x
    title: Rotate on X axis
    description: >
      Animate rotation around the X axis. If keyed=0, the amount to rotate per
      frame.
    type: float
    unit: degrees
    default: 0
    mutable: yes

  - identifier: rotate_y
    title: Rotate on Y axis
    description: >
      Animate rotation around the Y axis. If keyed=0, the amount to rotate per
      frame.
    type: float
    unit: degrees
    default: 0
    mutable: yes

  - identifier: rotate_z
    title: Rotate on Z axis
    description: >
      Animate rotation around the Z axis. If keyed=0, the amount to rotate per
      frame.
    type: float
    unit: degrees
    default: 0
    mutable: yes

  - identifier: fix_rotate_x
    title: X axis rotation
    description: Fixed amount of rotation around the X axis.
    type: float
    unit: degrees
    default: 0
    mutable: yes
    animation: yes

  - identifier: fix_rotate_y
    title: Y axis rotation
    description: Fixed amount of rotation around the Y axis.
    type: float
    unit: degrees
    default: 0
    mutable: yes
    animation: yes

  - identifier: fix_rotate_z
    title: Z axis rotation
    description: Fixed amount of rotation around the Z axis.
    type: float
    unit: degrees
    default: 0
    mutable: yes
    animation: yes

  - identifier: shear_x
    title: Shear along X axis
    description: >
      Animate shear along the X axis. If keyed=0, the shear angle increment per
      frame.
    type: float
    unit: degrees
    default: 0
    mutable: yes

  - identifier: shear_y
    title: Shear along Y axis
    description: >
      Animate shear along the Y axis. If keyed=0, the shear angle increment per
      frame.
    type: float
    unit: degrees
    default: 0
    mutable: yes

  - identifier: shear_z
    title: Shear along Z axis
    description: >
      Animate shear along the Z axis. If keyed=0, the shear angle increment per
      frame.
    type: float
    unit: degrees
    default: 0
    mutable: yes

  - identifier: fix_shear_x
    title: X axis shear
    description: Fixed amount of shear along the X axis.
    type: float
    unit: degrees
    default: 0
    mutable: yes
    animation: yes

  - identifier: fix_shear_y
    title: Y axis shear
    description: Fixed amount of shear along the Y axis.
    type: float
    unit: degrees
    default: 0
    mutable: yes
    animation: yes

  - identifier: fix_shear_z
    title: Z axis shear
    description: Fixed amount of shear along the Z axis.
    type: float
    unit: degrees
    default: 0
    mutable: yes
    animation: yes

  - identifier: mirror
    title: Ping-pong
    description: >
      When animating properties with key frames, whether the animation should
      behave with a ping-pong effect once over the duration of the transition.
      It will run in the forward direction over the first half the transition
      and in the reverse direction over the second half.
    type: boolean

  - identifier: scale
    title: Scale
    description: >
      Whether to automatic upscale B frame image to ensure the rectangle
      is filled.
    type: boolean
    default: 0
    mutable: yes
    widget: checkbox

  - identifier: scale_x
    title: Horizontal scale
    description: A scale factor applied along the X axis.
    type: float
    default: 0
    mutable: yes
    animation: yes

  - identifier: scale_y
    title: Vertical scale
    description: A scale factor applied along the Y axis.
    type: float
    default: 0
    mutable: yes
    animation: yes

  - identifier: invert_scale
    title: Invert Scale
    description: >
      Whether to invert the scale_x and scale_y values. This is helpful to make
      animation interpolation sane because otherwise the scale values do not
      animate linearly.
    type: boolean
    default: 0
    mutable: yes
    widget: checkbox

  - identifier: b_alpha
    title: Affect alpha channel
    description: >
      Whether to use the B frame's alpha channel in transformations for the
      output, The affine filter sets this to 1 by default.
      Basically, this tells the blend function to use the Porter-Duff atop
      mode instead of the default over.
    type: boolean
    default: 0
    mutable: yes

  - identifier: halign
    title: Horizontal alignment
    description: >
      Set the horizontal alignment within the rectangle.
    type: string
    default: left
    values:
      - left
      - center
      - right
    mutable: yes
    widget: combo

  - identifier: valign
    title: Vertical alignment
    description: >
      Set the vertical alignment within the rectangle.
    type: string
    default: top
    values:
      - top
      - middle
      - bottom
    mutable: yes
    widget: combo

  - identifier: threads
    title: Thread count
    description: >
      Use 0 to use the slice count, which defaults to the number of detected
      CPUs. Otherwise, set the number of threads to use up to the slice count.
    minimum: 0
    default: 0

  - identifier: rect
    argument: yes
    title: Rectangle
    description: >
      This specifies the size and position of the image. The format of this is
      "X/Y:WxH[:opacity]" and can be animated with key frames.
      If you use percentages you must use them for
      every field in the above format. For example, you cannot mix and match
      usage of absolute coordinates and percentages for size and opacity.
    type: rect
    default: "0%/0%:100%x100%:100%"
    readonly: no
    mutable: yes
    animation: yes

  - identifier: b_scaled
    title: Do not use full resolution of B frame
    type: boolean
    default: 0
    mutable: yes
