*) 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); ymageToolPrint.print(bannerPicture, 285, 52, 0, "SPEED: " + addTrailingBlanks(nppm + " PAGES/MINUTE", exprlength), -1);
if (logo != null) { 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("")) { if (!bordercolor.equals("")) {
@ -425,13 +427,6 @@ public class plasmaGrafics {
return true; 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] //[MN]
private static String addBlanksAndDots(long input, int length) { private static String addBlanksAndDots(long input, int length) {
return addBlanksAndDots(input + "", length); return addBlanksAndDots(input + "", length);

@ -279,9 +279,12 @@ public class ymageMatrix /*implements Cloneable*/ {
int heightTgt = image.getHeight(); int heightTgt = image.getHeight();
int widthTgt = image.getWidth(); int widthTgt = image.getWidth();
for (int i = y; i < heightSrc && i < heightTgt - y; i++) { for (int i = 0; i < heightSrc; i++) {
for (int j = x; j < widthSrc && j < widthTgt - x; j++) { for (int j = 0; j < widthSrc; j++) {
image.setRGB(j, i, bitmap.getRGB(j, i)); // 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