degradation photo au max pour meilleur perf + impact opacity %
This commit is contained in:
@@ -199,7 +199,16 @@ class _AnalysisScreenContentState extends State<_AnalysisScreenContent> {
|
||||
),
|
||||
if (_isCalibrating)
|
||||
TextButton(
|
||||
onPressed: () => setState(() => _isCalibrating = false),
|
||||
onPressed: () {
|
||||
// On fige la calibration courante dans le provider AVANT de
|
||||
// basculer en Plotting, pour que l'instance Plotting parte
|
||||
// d'un état figé et indépendant des rebuilds de calibration.
|
||||
_calibrationKey.currentState?.commitCalibration();
|
||||
setState(() {
|
||||
_isCalibrating = false;
|
||||
_isSelectingReferences = false;
|
||||
});
|
||||
},
|
||||
child: const Text(
|
||||
'TERMINER',
|
||||
style: TextStyle(
|
||||
|
||||
@@ -83,6 +83,16 @@ class TargetCalibrationState extends State<TargetCalibration> {
|
||||
_initRingRadii();
|
||||
}
|
||||
|
||||
/// Fige et propage la calibration courante vers le provider.
|
||||
///
|
||||
/// Appelée par l'écran d'analyse (via GlobalKey) juste avant de basculer
|
||||
/// dans l'instance de Plotting, pour garantir que l'état affiché en Plotting
|
||||
/// correspond exactement au dernier réglage validé, sans dépendre d'un
|
||||
/// éventuel rebuild intermédiaire.
|
||||
void commitCalibration() {
|
||||
_notifyChange();
|
||||
}
|
||||
|
||||
void _initRingRadii({bool forceRecalculate = false}) {
|
||||
// CORRECTION : Si on ne recalcule pas activement l'espacement linéaire, on préserve en priorité la structure d'origine
|
||||
if (!forceRecalculate && _originalRingRadii != null && _originalRingRadii!.length == _ringCount) {
|
||||
|
||||
@@ -211,8 +211,8 @@ class _TargetOverlayPainter extends CustomPainter {
|
||||
final prevMultiplier = i == 0
|
||||
? 0.0
|
||||
: (ringRadii != null && ringRadii!.length == ringCount)
|
||||
? ringRadii![i - 1]
|
||||
: i / ringCount;
|
||||
? ringRadii![i - 1]
|
||||
: i / ringCount;
|
||||
final zoneRadius = maxRadius * (currentMultiplier + prevMultiplier) / 2;
|
||||
final score = 10 - i;
|
||||
|
||||
@@ -292,16 +292,17 @@ class _TargetOverlayPainter extends CustomPainter {
|
||||
final strokeWidth = 3 / zoomScale;
|
||||
final fontSize = 10 / zoomScale;
|
||||
|
||||
// Draw outer circle (white outline for visibility)
|
||||
// Draw outer circle (white outline for visibility) — gardé OPAQUE pour
|
||||
// bien repérer le centre même quand le remplissage est transparent.
|
||||
final outlinePaint = Paint()
|
||||
..color = AppTheme.impactOutlineColor
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = strokeWidth;
|
||||
canvas.drawCircle(Offset(x, y), outerRadius, outlinePaint);
|
||||
|
||||
// Draw impact marker
|
||||
// Draw impact marker — TRANSPARENCE 50% pour voir l'impact réel derrière
|
||||
final impactPaint = Paint()
|
||||
..color = AppTheme.impactColor
|
||||
..color = AppTheme.impactColor.withValues(alpha: 0.5)
|
||||
..style = PaintingStyle.fill;
|
||||
canvas.drawCircle(Offset(x, y), innerRadius, impactPaint);
|
||||
|
||||
@@ -381,4 +382,4 @@ class _TargetOverlayPainter extends CustomPainter {
|
||||
zoomScale != oldDelegate.zoomScale ||
|
||||
showRings != oldDelegate.showRings;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user