projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2002/10/04 02:09:25
[org.ibex.core.git]
/
src
/
org
/
xwt
/
XWF.java
diff --git
a/src/org/xwt/XWF.java
b/src/org/xwt/XWF.java
index
7b6f8e2
..
da6f57b
100644
(file)
--- a/
src/org/xwt/XWF.java
+++ b/
src/org/xwt/XWF.java
@@
-68,16
+68,20
@@
public class XWF {
Integer color = new Integer(argb | 0xFF000000);
Picture pg = (Picture)pictures.get(color);
if (pg == null) {
Integer color = new Integer(argb | 0xFF000000);
Picture pg = (Picture)pictures.get(color);
if (pg == null) {
+ int[] data2 = new int[data.length];
for(int i=0; i<data.length; i++)
for(int i=0; i<data.length; i++)
- data[i] = (data[i] & 0xFF000000) | (argb & 0x00FFFFFF);
- pg = Platform.createPicture(data, w, h);
+ data2[i] = (data[i] & 0xFF000000) | (argb & 0x00FFFFFF);
+ pg = Platform.createPicture(data2, w, h);
pictures.put(color, pg);
}
int left = x;
for(int i=0; i<text.length(); i++) {
int c = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".indexOf(text.charAt(i));
pictures.put(color, pg);
}
int left = x;
for(int i=0; i<text.length(); i++) {
int c = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".indexOf(text.charAt(i));
- if (c == -1 || metrics[c] == null) { left += metrics[64][4]; continue; }
+ if (c == -1 || metrics[c] == null) {
+ left += metrics[64] != null ? metrics[64][4] : 10;
+ continue;
+ }
buf.drawPicture(pg,
left,
y - (metrics[c][5] - metrics[c][2]),
buf.drawPicture(pg,
left,
y - (metrics[c][5] - metrics[c][2]),