From 35274a963bd6763b5732dde9efbdf2b5dd6c6a48 Mon Sep 17 00:00:00 2001 From: Lycano Date: Wed, 22 Apr 2026 11:05:14 +0200 Subject: [PATCH] JavaDoc --- src/ecoparasite/svg/SVGFactory.java | 41 ++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/src/ecoparasite/svg/SVGFactory.java b/src/ecoparasite/svg/SVGFactory.java index 9076133..4e9cf9e 100644 --- a/src/ecoparasite/svg/SVGFactory.java +++ b/src/ecoparasite/svg/SVGFactory.java @@ -76,13 +76,9 @@ public class SVGFactory { } - public static HashMap< String ,HashSet> PointAXES(HashSet h){ + public static HashMap< String ,HashSet> PointAXES(HashSet h){ - //Définition initial - HashSet x = new HashSet<>(); - HashSet y = new HashSet<>(); - HashSet offset = new HashSet<>(); - HashMap< String, HashSet > map = new HashMap<>(); + HashMap< String, HashSet > map = new HashMap<>(); //Définition des min et max double max_x = Double.MIN_VALUE; @@ -120,11 +116,38 @@ public class SVGFactory { double nicemin_y = roundMin(min_y,step_y); double nicemax_y = roundMax(max_y,step_y); - HashSet axe_x = new HashSet<>(); - HashSet axe_y = new HashSet<>(); + // Compléter un Hashset de Double pour X et pour Y et Offset X et Y. TODO + HashSet axeX = new HashSet<>(); + HashSet axeY = new HashSet<>(); + HashSet OffsetX = new HashSet<>(); + HashSet OffsetY = new HashSet<>(); + Double ix = nicemin_x; + while ( ix <= nicemax_x ) { + axeX.add(ix); + ix+=step_x; + }; + map.put("AxeX", axeX); - return null; + Double iy = nicemin_y; + while ( iy <= nicemax_y ) { + axeY.add(iy); + iy+=step_y; + } + map.put("AxeY",axeY); + + double offsetX = min_x - nicemin_x; + double offsetY = min_y - nicemin_y; + + HashSet offsetXHash = new HashSet<>(); + offsetXHash.add(offsetX); + HashSet offsetYHash = new HashSet<>(); + offsetYHash.add(offsetY); + + map.put("OffsetX", offsetXHash); + map.put("OffsetY", offsetYHash); + + return map; } /**