fix(plotting): afficher l'image brute dézoomée et corriger le TargetOverlay
This commit is contained in:
@@ -479,16 +479,8 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
|||||||
maxScale: 10.0,
|
maxScale: 10.0,
|
||||||
boundaryMargin: const EdgeInsets.all(double.infinity),
|
boundaryMargin: const EdgeInsets.all(double.infinity),
|
||||||
panEnabled: _movingShotId == null,
|
panEnabled: _movingShotId == null,
|
||||||
child: Transform(
|
// CORRECTIF : Le widget Transform forçant le zoom/décalage initial a été supprimé d'ici.
|
||||||
transform: Matrix4.identity()
|
// L'image s'affiche maintenant de manière brute et entière, à plat.
|
||||||
..setTranslationRaw(
|
|
||||||
widget.cropOffset?.dx ?? 0.0,
|
|
||||||
widget.cropOffset?.dy ?? 0.0,
|
|
||||||
0.0,
|
|
||||||
)
|
|
||||||
..scale(1.0, 1.0)
|
|
||||||
..rotateZ((provider.cropRotation) * (math.pi / 180)),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onDoubleTapDown: (TapDownDetails details) {
|
onDoubleTapDown: (TapDownDetails details) {
|
||||||
final RenderBox? box =
|
final RenderBox? box =
|
||||||
@@ -597,7 +589,6 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
/// d'impacts et la sélection d'impacts existants.
|
/// d'impacts et la sélection d'impacts existants.
|
||||||
library;
|
library;
|
||||||
|
|
||||||
|
import 'dart:math' as math;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../../../core/theme/app_theme.dart';
|
import '../../../core/theme/app_theme.dart';
|
||||||
import '../../../data/models/shot.dart';
|
import '../../../data/models/shot.dart';
|
||||||
@@ -260,7 +261,10 @@ class _TargetOverlayPainter extends CustomPainter {
|
|||||||
void _drawGroupingCircle(Canvas canvas, Size size) {
|
void _drawGroupingCircle(Canvas canvas, Size size) {
|
||||||
final centerX = groupingCenterX! * size.width;
|
final centerX = groupingCenterX! * size.width;
|
||||||
final centerY = groupingCenterY! * size.height;
|
final centerY = groupingCenterY! * size.height;
|
||||||
final diameter = groupingDiameter! * size.width.clamp(0, size.height);
|
|
||||||
|
// CORRECTIF : Utilisation de math.min pour éviter les écrasements d'aspect ratio asymétriques
|
||||||
|
final minDim = math.min(size.width, size.height);
|
||||||
|
final diameter = groupingDiameter! * minDim;
|
||||||
|
|
||||||
// Draw filled circle
|
// Draw filled circle
|
||||||
final fillPaint = Paint()
|
final fillPaint = Paint()
|
||||||
|
|||||||
Reference in New Issue
Block a user