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,
|
||||
boundaryMargin: const EdgeInsets.all(double.infinity),
|
||||
panEnabled: _movingShotId == null,
|
||||
child: Transform(
|
||||
transform: Matrix4.identity()
|
||||
..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,
|
||||
// CORRECTIF : Le widget Transform forçant le zoom/décalage initial a été supprimé d'ici.
|
||||
// L'image s'affiche maintenant de manière brute et entière, à plat.
|
||||
child: GestureDetector(
|
||||
onDoubleTapDown: (TapDownDetails details) {
|
||||
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.
|
||||
library;
|
||||
|
||||
import 'dart:math' as math;
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../core/theme/app_theme.dart';
|
||||
import '../../../data/models/shot.dart';
|
||||
@@ -260,7 +261,10 @@ class _TargetOverlayPainter extends CustomPainter {
|
||||
void _drawGroupingCircle(Canvas canvas, Size size) {
|
||||
final centerX = groupingCenterX! * size.width;
|
||||
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
|
||||
final fillPaint = Paint()
|
||||
|
||||
Reference in New Issue
Block a user