calculateScaleRotate method
dynamic
calculateScaleRotate({
- required double editorScaleFactor,
- required ProImageEditorConfigs configs,
- required ScaleUpdateDetails detail,
- required Layer activeLayer,
- required Size editorSize,
- required EdgeInsets screenPaddingHelper,
- required bool configEnabledHitVibration,
Calculates scaling and rotation of a layer based on user interactions.
Implementation
calculateScaleRotate({
required double editorScaleFactor,
required ProImageEditorConfigs configs,
required ScaleUpdateDetails detail,
required Layer activeLayer,
required Size editorSize,
required EdgeInsets screenPaddingHelper,
required bool configEnabledHitVibration,
}) {
_activeScale = true;
activeLayer.scale = baseScaleFactor * detail.scale;
_setMinMaxScaleFactor(configs, activeLayer);
activeLayer.rotation = baseAngleFactor + detail.rotation;
if (editorScaleFactor == 1) {
checkRotationLine(
activeLayer: activeLayer,
editorSize: editorSize,
configEnabledHitVibration: configEnabledHitVibration,
);
}
scaleDebounce(() => _activeScale = false);
}