*) Logo is in the middle of free space now.

*) Fixed bugs in insertBitmap()


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4245 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 17 years ago
parent 72698fcd36
commit ee8a177c26

@ -403,7 +403,9 @@ public class plasmaGrafics {
ymageToolPrint.print(bannerPicture, 285, 52, 0, "SPEED: " + addTrailingBlanks(nppm + " PAGES/MINUTE", exprlength), -1);
if (logo != null) {
bannerPicture.insertBitmap(logo, 2, 2);
int x = (int)(100/2 - logo.getWidth()/2);
int y = (int)(height/2 - logo.getHeight()/2);
bannerPicture.insertBitmap(logo, x, y);
}
if (!bordercolor.equals("")) {
@ -425,13 +427,6 @@ public class plasmaGrafics {
return true;
}
//[MN]
/* quoted method because it is not used anywhere (and creates a warning in eclipse)
private static String addBlanksAndDots(int input, int length) {
return addBlanksAndDots(input + "", length);
}
*/
//[MN]
private static String addBlanksAndDots(long input, int length) {
return addBlanksAndDots(input + "", length);

@ -279,9 +279,12 @@ public class ymageMatrix /*implements Cloneable*/ {
int heightTgt = image.getHeight();
int widthTgt = image.getWidth();
for (int i = y; i < heightSrc && i < heightTgt - y; i++) {
for (int j = x; j < widthSrc && j < widthTgt - x; j++) {
image.setRGB(j, i, bitmap.getRGB(j, i));
for (int i = 0; i < heightSrc; i++) {
for (int j = 0; j < widthSrc; j++) {
// pixel in legal area?
if (j+x >= 0 && i+y >= 0 && i+y < heightTgt && j+x < widthTgt) {
image.setRGB(j+x, i+y, bitmap.getRGB(j, i));
}
}
}
}

Loading…
Cancel
Save