Commit f246105e authored by Petri Hintukainen's avatar Petri Hintukainen

Fix polygon-based BD-J graphics primitives

Fixes #7
parent 8b4869ca
Pipeline #4988 passed with stage
in 2 minutes and 43 seconds
......@@ -670,7 +670,7 @@ abstract class BDGraphicsBase extends DVBGraphics implements ConstrainableGraphi
drawPoint(xPoints[0], yPoints[0], foreground.getRGB());
} else {
for (int i = 0; i < (nPoints - 1); i++)
drawLine(xPoints[i], xPoints[i], xPoints[i + 1], xPoints[i + 1]);
drawLine(xPoints[i], yPoints[i], xPoints[i + 1], yPoints[i + 1]);
}
}
......@@ -680,9 +680,9 @@ abstract class BDGraphicsBase extends DVBGraphics implements ConstrainableGraphi
drawPoint(xPoints[0], yPoints[0], foreground.getRGB());
} else {
for (int i = 0; i < (nPoints - 1); i++)
drawLine(xPoints[i], xPoints[i], xPoints[i + 1], xPoints[i + 1]);
drawLine(xPoints[i], yPoints[i], xPoints[i + 1], yPoints[i + 1]);
if (nPoints > 2)
drawLine(xPoints[0], xPoints[0], xPoints[nPoints - 1], xPoints[nPoints - 1]);
drawLine(xPoints[0], yPoints[0], xPoints[nPoints - 1], yPoints[nPoints - 1]);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment