Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bb0fcef
Graphics.useMatrixTranslation: route g.translate through impl matrix
shai-almog May 16, 2026
78ab733
Graphics matrix mode: drop shadow accumulator, fix bypass-Graphics ca…
shai-almog May 16, 2026
6731497
Graphics matrix mode: restore shadow + preserve framework translate a…
shai-almog May 16, 2026
2777670
Graphics matrix mode: matrix is the single source of truth, callsites…
shai-almog May 16, 2026
dedb269
Use short names: import Transform, drop com.codename1.ui.Graphics. FQN
shai-almog May 16, 2026
07dbb5f
Graphics matrix mode: route setTransform(null) through impl.resetAffine
shai-almog May 16, 2026
fec80d2
Graphics matrix mode: keep userTransform null to prevent stale-state …
shai-almog May 16, 2026
9e87346
Android: AsyncGraphics.translateMatrix must queue an op like scale/ro…
shai-almog May 17, 2026
7aba905
Graphics matrix mode: conjugate user setTransform around framework an…
shai-almog May 17, 2026
1d050c3
Graphics matrix mode: subtract framework anchor from peer clearRect c…
shai-almog May 17, 2026
1a19634
Graphics matrix mode: framework anchor accessor + revert snapshot-res…
shai-almog May 17, 2026
6622726
Revert "Graphics matrix mode: framework anchor accessor + revert snap…
shai-almog May 17, 2026
59d872a
Revert Graphics matrix mode to known-good state (commit 7af87077f)
shai-almog May 17, 2026
3323cdf
Graphics matrix mode: framework-anchor accessor + setTransform conjug…
shai-almog May 17, 2026
9a4277c
Android matrix mode: peer screen position + 2 goldens
shai-almog May 17, 2026
bdf9ee7
JS port: reset canvas transform at drain start (matrix-mode title fix)
shai-almog May 17, 2026
3858a63
JS port: BufferedGraphics override for translateMatrix
shai-almog May 17, 2026
4eb1ef3
JS port goldens: promote matrix-mode renderings (17 + 1 new)
shai-almog May 17, 2026
fab590c
iOS Metal: save/restore currentTransform on mutable side-trip + 5 gol…
shai-almog May 18, 2026
ec99622
iOS Metal: targeted mutable-image drain in gausianBlurImage
shai-almog May 18, 2026
ac4de5f
Re-trigger CI to repopulate iOS port cache
shai-almog May 18, 2026
7984086
iOS Metal goldens: use CI-runner actuals (1179x2556)
shai-almog May 18, 2026
c5f6d2b
iOS GL goldens: matrix-mode renderings + 1 new
shai-almog May 18, 2026
1caa528
Fix matrixFrameworkTranslateX legacy-mode regression + revert iOS GL …
shai-almog May 19, 2026
679f583
JS golden: graphics-inscribed-triangle-grid CI actual on rebased branch
shai-almog May 19, 2026
c653299
Probe: log polygon clip + next 6 ops on iOS GL stencil path
shai-almog May 19, 2026
b1e6a72
Probe: rename CN1DBG -> CN1SS:DBG so run-ios-ui-tests.sh log filter f…
shai-almog May 19, 2026
b9fd77f
Probe: dump full polygon vertices + GL state at FillRect.exec
shai-almog May 19, 2026
75b8bbc
Probe: read actual stencil byte at panel 1 vs panel 2 polygon center
shai-almog May 19, 2026
0c162b9
Probe: replace GL_STENCIL_INDEX read (not in ES2) with framebuffer state
shai-almog May 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,19 @@ public void paintDirty() {
continue;
}
paintQueueTemp[iter] = null;
wrapper.translate(-wrapper.getTranslateX(), -wrapper.getTranslateY());
// Reset wrapper graphics to a clean state before painting
// the next queued animation. matrixFrameworkTranslateX
// returns the right anchor (xTranslate in legacy mode,
// matrixFrameworkX in matrix mode) so the translate-based
// reset brings the wrapper to identity in both modes.
// resetAffine() then clears any leftover user
// scale/rotate; in matrix mode it also re-applies the
// framework anchor it had just zeroed, but since we
// already translate(-tx, -ty)'d to zero it stays at
// identity for the upcoming paintComponent.
int wtx = wrapper.matrixFrameworkTranslateX();
int wty = wrapper.matrixFrameworkTranslateY();
wrapper.translate(-wtx, -wty);
wrapper.resetAffine();
wrapper.setClip(0, 0, dwidth, dheight);
if (ani instanceof Component) {
Expand Down
23 changes: 18 additions & 5 deletions CodenameOne/src/com/codename1/maps/MapComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.codename1.ui.Graphics;
import com.codename1.ui.Image;
import com.codename1.ui.ImageFactory;
import com.codename1.ui.Transform;
import com.codename1.ui.events.ActionEvent;
import com.codename1.ui.events.ActionListener;
import com.codename1.ui.geom.Dimension;
Expand Down Expand Up @@ -269,11 +270,23 @@ public void paintBackground(Graphics g) {
tx = -tx * (float) (scaleX - getWidth()) / sx;
float ty = (float) zoomCenterY / (float) getHeight();
ty = -ty * (float) (scaleY - getHeight()) / sy;
g.translate((int) tx, (int) ty);
g.scale(sx, sy);
paintmap(g);
g.resetAffine();
g.translate(-(int) tx, -(int) ty);
if (Graphics.useMatrixTranslation) {
// Matrix mode: resetAffine wipes the impl matrix to
// identity, which destroys the framework painting-chain
// translates the matrix carries. Use save/restore the
// impl matrix around the scale + user-translate instead.
Transform savedMatrix = g.getTransform();
g.translate((int) tx, (int) ty);
g.scale(sx, sy);
paintmap(g);
g.setTransform(savedMatrix);
} else {
g.translate((int) tx, (int) ty);
g.scale(sx, sy);
paintmap(g);
g.resetAffine();
g.translate(-(int) tx, -(int) ty);
}
} else {
g.translate(-translateX, -translateY);
paintmap(g);
Expand Down
14 changes: 8 additions & 6 deletions CodenameOne/src/com/codename1/ui/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -3031,9 +3031,12 @@ void internalPaintImpl(Graphics g, boolean paintIntersects) {
public void paintIntersectingComponentsAbove(Graphics g) {
Container parent = getParent();
Component component = this;
int tx = g.getTranslateX();
int ty = g.getTranslateY();

// Snapshot-reset translate -- matrixFrameworkTranslateX returns
// xTranslate in legacy mode and the matrixFrameworkX shadow in
// matrix mode so the parent walk below paints each ancestor at
// its screen-absolute position.
int tx = g.matrixFrameworkTranslateX();
int ty = g.matrixFrameworkTranslateY();
g.translate(-tx, -ty);
int x1 = getAbsoluteX() + getScrollX();
int y1 = getAbsoluteY() + getScrollY();
Expand All @@ -3056,7 +3059,6 @@ public void paintIntersectingComponentsAbove(Graphics g) {
parent = parent.getParent();
}
g.translate(tx, ty);

}

/// Paints the UI for the scrollbars on the component, this will be invoked only
Expand Down Expand Up @@ -3344,8 +3346,8 @@ private void drawPainters(Graphics g, Component par, Component c,
paintBackgroundImpl(tg);
putClientProperty("$FLAT", i);
}
int tx = g.getTranslateX();
int ty = g.getTranslateY();
int tx = g.matrixFrameworkTranslateX();
int ty = g.matrixFrameworkTranslateY();
g.translate(-tx + absX, -ty + absY);
g.drawImage(i, 0, 0);
g.translate(tx - absX, ty - absY);
Expand Down
8 changes: 6 additions & 2 deletions CodenameOne/src/com/codename1/ui/Container.java
Original file line number Diff line number Diff line change
Expand Up @@ -2186,8 +2186,12 @@ public void paint(Graphics g) {
paintElevatedPane(g);
}

int tx = g.getTranslateX();
int ty = g.getTranslateY();
// Snapshot-reset translate so glass/tensile draw at screen-
// absolute coords. matrixFrameworkTranslateX returns the right
// anchor for both modes (legacy: xTranslate; matrix mode:
// matrixFrameworkX shadow).
int tx = g.matrixFrameworkTranslateX();
int ty = g.matrixFrameworkTranslateY();
g.translate(-tx, -ty);
if (sidemenuBarTranslation > 0) {
g.translate(sidemenuBarTranslation, 0);
Expand Down
8 changes: 4 additions & 4 deletions CodenameOne/src/com/codename1/ui/FontImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -7796,8 +7796,8 @@ protected void drawImage(Graphics g, Object nativeGraphics, int x, int y) {
g.concatenateAlpha(fgAlpha);
}
if (rotated != 0) {
int tX = g.getTranslateX();
int tY = g.getTranslateY();
int tX = g.matrixFrameworkTranslateX();
int tY = g.matrixFrameworkTranslateY();
g.translate(-tX, -tY);
g.rotate((float) Math.toRadians(rotated % 360), tX + x + width / 2, tY + y + height / 2);
g.drawString(text, tX + x + width / 2 - w / 2, tY + y + height / 2 - h / 2);
Expand Down Expand Up @@ -7837,8 +7837,8 @@ protected void drawImage(Graphics g, Object nativeGraphics, int x, int y, int w,
}
//int paddingPixels = Display.getInstance().convertToPixels(padding, true);
if (rotated != 0) {
int tX = g.getTranslateX();
int tY = g.getTranslateY();
int tX = g.matrixFrameworkTranslateX();
int tY = g.matrixFrameworkTranslateY();
g.translate(-tX, -tY);
g.rotate((float) Math.toRadians(rotated % 360), tX + x + w / 2, tY + y + h / 2);
g.drawString(text, tX + x + w / 2 - ww / 2, tY + y);
Expand Down
9 changes: 7 additions & 2 deletions CodenameOne/src/com/codename1/ui/Form.java
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,13 @@ void paintGlassImpl(Graphics g) {
return;
}
if (glassPane != null) {
int tx = g.getTranslateX();
int ty = g.getTranslateY();
// matrixFrameworkTranslateX returns xTranslate in legacy mode
// and the matrixFrameworkX shadow in matrix mode; the translate-
// based snapshot reset brings the impl matrix to identity in
// both modes so glassPane.paint draws at the form's screen
// coords via getBounds().
int tx = g.matrixFrameworkTranslateX();
int ty = g.matrixFrameworkTranslateY();
g.translate(-tx, -ty);
glassPane.paint(g, getBounds());
g.translate(tx, ty);
Expand Down
Loading
Loading