Fix labeling
Build and Test j3270 / Build JAR & Run Tests (Java 21) (push) Successful in 49s
Build and Test j3270 / Build JAR & Run Tests (Java 11) (push) Successful in 1m33s
Build and Test j3270 / Build JAR & Run Tests (Java 17) (push) Successful in 1m35s

This commit is contained in:
2026-09-28 13:57:22 +00:00
parent fac6ac8bfb
commit cf0c0999bf
4 changed files with 14 additions and 37 deletions
@@ -31,8 +31,6 @@ package haus.nightmare.lib3270j.graphics;
* and clicking the visual menu emitted gy = 224 (missing the [187..200] menu bounding box).</li>
* <li><b>Failure Mode 3</b>: Intermediate raster buffering (e.g. fixed 800x600 canvas stretched to gridW x gridH)
* introduced rounding artifacts in bidirectional coordinate conversion (unmapX/unmapY).</li>
* <li><b>Failure Mode 4</b>: Overlapping dropdown menus (FILE, DRAW, TRANSFORM) lingering simultaneously when
* segment retention/clearing was decoupled from GDDM's segment lifecycle.</li>
* </ul>
*/
public class GddmCoordinateTransform {
@@ -444,34 +444,11 @@ public class GraphicsPlane implements PixelBuffer {
/**
* Total vertical presentation space units.
*
* <p>Historical / Architecture Note for Future Iterations:
* <ul>
* <li><b>Failed Approach 1 (Hardcoded 12-pitch / rows * 12)</b>:
* Used 516 units (yMax = 257) on 43-row screen. Caused upper coordinate truncation;
* menus at gy > 257 were clipped and mathematically impossible to pick.</li>
* <li><b>Failed Approach 2 (Hardcoded 16-pitch / rows * 16 without viewport alignment)</b>:
* Used 688 units (yMax = 343). Visual rendering was shifted downward by ~50 pixels relative
* to GDDM's internal picture space viewport, causing clicks at Row 7 to emit gy = 226
* which missed the GDDM menu hit box and caused terminal alarm beeps.</li>
* <li><b>Failed Approach 3 (Overwriting Graphic Input SF bytes 16-19 with row/col)</b>:
* Overwrote device correlation descriptor 0x00230023, causing GDDM Structured Field
* parser to reject inbound correlation packets as malformed.</li>
* <li><b>Failed Approach 4 (Misinterpreting Procedure Order 0x21 as Segment Redraw loop)</b>:
* Order 0x21 is HODCurrentDefaults (Set Current Defaults), not an executive redraw loop.
* Treating 0x21 as segment execution caused previous menu frames and stored segments
* to be repeatedly repainted over active screens, leaving behind visual ghost artifacts.</li>
* <li><b>Failed Approach 5 (Static yMax=343 scaling vs GDDM ADMDRAW Viewport bounds)</b>:
* In ADMDRAW, GDDM defines the graphics presentation space between y = -169 (canvas bottom)
* and y = +200 (top menu bar), with total height ~370 units. Mapping this into a static
* yMax = 343 (688 total height) renders the top menu at Row 9.2 (middle of the screen) with
* a large vertical void above it, and clicking the visual menu sends gy = 224 which misses
* the [187..200] menu bounding box. Furthermore, multiple dropdown menus (FILE, DRAW, TRANSFORM)
* overlapped simultaneously because segment retention and clearing was decoupled from GDDM's
* actual viewport state.</li>
* <li><b>Solution Path</b>: Use {@link GddmCoordinateTransform} for dynamic display and aspect
* scaling, ensuring host Query Reply metrics (SDH/AH) and GDDM Picture Space Window
* orders are synchronized with client-side mouse transformation.</li>
* </ul>
* <p>Calculated as {@code screenRows * charHeight} matching 3179G presentation
* space metrics. Dynamic display and aspect scaling relative to host picture
* space and viewport bounds are managed by {@link GddmCoordinateTransform}.
*
* @return Total presentation space height in units
*/
public int getTotalHeight() {
int rows = screenRows > 0 ? screenRows : 24;