mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
simplify the tile painting code
This commit is contained in:
@@ -242,16 +242,9 @@ final class PaintersHelper implements Painter.Listener {
|
||||
UIUtil.drawImage(g, scaled, x, y, null);
|
||||
}
|
||||
else if (fillType == FillType.TILE) {
|
||||
int x = i.left;
|
||||
int y = i.top;
|
||||
while (w > 0 && x < cw) {
|
||||
while (h > 0 && y < ch) {
|
||||
for (int x = i.left; x < cw; x+=w)
|
||||
for (int y = i.top; y < ch; y+=h)
|
||||
UIUtil.drawImage(g, scaled, x, y, null);
|
||||
y += h;
|
||||
}
|
||||
y = 0;
|
||||
x += w;
|
||||
}
|
||||
}
|
||||
cfg.restore();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user