Skip to content

Commit

Permalink
PlatformGraphics: Don't follow J2ME-Loader on drawLine()
Browse files Browse the repository at this point in the history
We don't need those size checks, in fact, it introduced a small
regression where every line had a break on at least one of its
points.
  • Loading branch information
AShiningRay committed Oct 13, 2024
1 parent 2a2f756 commit dcc0c8b
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/org/recompile/mobile/PlatformGraphics.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,7 @@ public void drawRGB(int[] rgbData, int offset, int scanlength, int x, int y, int
}


public void drawLine(int x1, int y1, int x2, int y2)
{
if (x2 >= x1) { x2++; }
else { x1++; }

if (y2 >= y1) { y2++; }
else { y1++; }

gc.drawLine(x1, y1, x2, y2);
}
public void drawLine(int x1, int y1, int x2, int y2) { gc.drawLine(x1, y1, x2, y2); }

public void drawRect(int x, int y, int width, int height)
{
Expand Down

0 comments on commit dcc0c8b

Please sign in to comment.