Browse Subversion Repository
Diff of /dvibrowser-1.2.0/trunk/dvicore/src/main/java/jp/sourceforge/dvibrowser/dvicore/render/IntRGBImage.java
Parent Directory
| Revision Log
| Patch
| 65 |
|
|
| 66 |
public void fill(int c) { |
public void fill(int c) { |
| 67 |
for (int i=0; i<buf.length; i++) |
for (int i=0; i<buf.length; i++) |
| 68 |
|
// buf[i] = 0xff000000 | c; |
| 69 |
buf[i] = c; |
buf[i] = c; |
| 70 |
} |
} |
| 71 |
|
|
| 129 |
} |
} |
| 130 |
} |
} |
| 131 |
|
|
| 132 |
private static int blend(int c1, int c2, final int alpha10) { |
private static int blendARGB(int c1, int c2, final int alpha10) { |
| 133 |
int r, g, b; |
int r, g, b; |
| 134 |
|
|
| 135 |
b = c1 & 0xff; |
b = c1 & 0xff; |
| 148 |
r += (alpha10 * ((c2 & 0xff) - r)) >>> 10; |
r += (alpha10 * ((c2 & 0xff) - r)) >>> 10; |
| 149 |
r &= 0xff; |
r &= 0xff; |
| 150 |
|
|
| 151 |
return (r << 16) | (g << 8) | b; |
return 0xff000000 | (r << 16) | (g << 8) | b; |
| 152 |
} |
} |
| 153 |
|
|
| 154 |
|
private static int blend(int c1, int c2, final int alpha10) { |
| 155 |
|
int r, g, b; |
| 156 |
|
|
| 157 |
|
b = c1 & 0xff; |
| 158 |
|
b += (alpha10 * ((c2 & 0xff) - b)) >>> 10; |
| 159 |
|
b &= 0xff; |
| 160 |
|
c1 >>>= 8; |
| 161 |
|
c2 >>>= 8; |
| 162 |
|
|
| 163 |
|
g = c1 & 0xff; |
| 164 |
|
g += (alpha10 * ((c2 & 0xff) - g)) >>> 10; |
| 165 |
|
g &= 0xff; |
| 166 |
|
c1 >>>= 8; |
| 167 |
|
c2 >>>= 8; |
| 168 |
|
|
| 169 |
|
r = c1 & 0xff; |
| 170 |
|
r += (alpha10 * ((c2 & 0xff) - r)) >>> 10; |
| 171 |
|
r &= 0xff; |
| 172 |
|
|
| 173 |
|
return (r << 16) | (g << 8) | b; |
| 174 |
|
} |
| 175 |
|
|
| 176 |
} |
} |
| 177 |
//BenchMark: dvidump: 535 samples in 19.174 sec. 27.902 samples/sec. 35.839 msec./sample. |
//BenchMark: dvidump: 535 samples in 19.174 sec. 27.902 samples/sec. 35.839 msec./sample. |
|
|
Legend:
| Removed from v.122 |
|
| changed lines |
| |
Added in v.123 |
|
|
| |