Context:
TrackConfiguration's transform property lets developers applying custom transformations on TrackItem while TrackConfiguration's contentMode is responsible for how the TrackItem's content is displayed on screen (aspectFit/aspectFill/custom).
Issue:
The CGAffineTransform stored in TrackConfiguration's transform property gets applied only after the contentMode transformations, so if a user transformation (e.g. rotation by 90 degrees) is set then .aspectFit and .aspectFill content modes won't work as expected:
Context:
TrackConfiguration
's transform property lets developers applying custom transformations onTrackItem
whileTrackConfiguration
'scontentMode
is responsible for how theTrackItem
's content is displayed on screen (aspectFit
/aspectFill
/custom
).Issue: The CGAffineTransform stored in
TrackConfiguration
'stransform
property gets applied only after the contentMode transformations, so if a user transformation (e.g. rotation by 90 degrees) is set then .aspectFit and .aspectFill content modes won't work as expected:https://github.com/VideoFlint/Cabbage/blob/e65b80fc04c026d14ca0a3a3ed0567d597233f86/Cabbage/Sources/Track/Configuration/TrackConfiguration.swift#L61-L84
Proposed solution: Move the user transform implementation just before the contentMode transformations.
Closes #57