| File | Line |
|---|
| org/microemu/device/swt/SwtMutableImage.java | 91 |
| org/microemu/device/swt/SwtImmutableImage.java | 58 |
}
public void getRGB(int[] argb, int offset, int scanlength, int x, int y, int width, int height)
{
if (width <= 0 || height <= 0) {
return;
}
if (x < 0 || y < 0 || x + width > getWidth() || y + height > getHeight()) {
throw new IllegalArgumentException("Specified area exceeds bounds of image");
}
if ((scanlength < 0 ? -scanlength : scanlength) < width) {
throw new IllegalArgumentException("abs value of scanlength is less than width");
}
if (argb == null) {
throw new NullPointerException("null rgbData");
}
if (offset < 0 || offset + width > argb.length) {
throw new ArrayIndexOutOfBoundsException();
}
if (scanlength < 0) {
if (offset + scanlength*(height-1) < 0) {
throw new ArrayIndexOutOfBoundsException();
}
} else {
if (offset + scanlength*(height-1) + width > argb.length) {
throw new ArrayIndexOutOfBoundsException();
}
}
ImageData imageData = img.getImageData();
for (int i = 0; i < height; i++) {
imageData.getPixels(x, y + i, width, argb, offset + i * scanlength);
}
}
} |
| File | Line |
|---|
| org/microemu/device/swt/GrayImageFilter.java | 48 |
| org/microemu/device/swt/RGBImageFilter.java | 40 |
backgroundColor = SwtDeviceComponent.getColor(new RGB(
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getBackgroundColor().getRed(),
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getBackgroundColor().getGreen(),
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getBackgroundColor().getBlue()));
foregroundColor = SwtDeviceComponent.getColor(new RGB(
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getForegroundColor().getRed(),
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getForegroundColor().getGreen(),
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getForegroundColor().getBlue()));
Rr = foregroundColor.getRed() - backgroundColor.getRed(); |
| File | Line |
|---|
| org/microemu/device/swt/GrayImageFilter.java | 48 |
| org/microemu/device/swt/BWImageFilter.java | 49 |
backgroundColor = SwtDeviceComponent.getColor(new RGB(
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getBackgroundColor().getRed(),
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getBackgroundColor().getGreen(),
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getBackgroundColor().getBlue()));
foregroundColor = SwtDeviceComponent.getColor(new RGB(
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getForegroundColor().getRed(),
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getForegroundColor().getGreen(),
((SwtDeviceDisplay) DeviceFactory.getDevice().getDeviceDisplay()).getForegroundColor().getBlue())); |
| File | Line |
|---|
| org/microemu/device/swt/SwtSystemFont.java | 42 |
| org/microemu/device/swt/SwtTrueTypeFont.java | 43 |
this.style = style.toLowerCase();
this.size = size;
this.antialiasing = antialiasing;
this.initialized = false;
}
public void setAntialiasing(boolean antialiasing) {
if (this.antialiasing != antialiasing) {
this.antialiasing = antialiasing;
initialized = false;
}
}
public Font getFont() {
checkInitialized();
return font;
}
private synchronized void checkInitialized() {
if (!initialized) {
int swtStyle = 0;
if (style.indexOf("plain") != -1) {
swtStyle |= SWT.NORMAL;
}
if (style.indexOf("bold") != -1) {
swtStyle |= SWT.BOLD;
}
if (style.indexOf("italic") != -1) {
swtStyle |= SWT.ITALIC;
}
if (style.indexOf("underlined") != -1) {
// TODO underlined style not implemented
} |
| File | Line |
|---|
| org/microemu/app/ui/swt/SwtDeviceComponent.java | 147 |
| org/microemu/app/ui/swt/SwtDeviceComponent.java | 210 |
public void mouseUp(MouseEvent e)
{
if (MIDletBridge.getCurrentMIDlet() == null) {
return;
}
Device device = DeviceFactory.getDevice();
org.microemu.device.impl.Rectangle rect = ((SwtDeviceDisplay) device.getDeviceDisplay()).getDisplayRectangle();
SwtInputMethod inputMethod = (SwtInputMethod) device.getInputMethod();
boolean fullScreenMode = device.getDeviceDisplay().isFullScreenMode();
if (rect.x <= e.x && (rect.x + rect.width) > e.x
&& rect.y <= e.y && (rect.y + rect.height) > e.y) {
if (device.hasPointerEvents()) {
if (!fullScreenMode) { |
| File | Line |
|---|
| org/microemu/app/ui/swt/SwtDeviceComponent.java | 153 |
| org/microemu/app/ui/swt/SwtDeviceComponent.java | 285 |
Device device = DeviceFactory.getDevice();
org.microemu.device.impl.Rectangle rect = ((SwtDeviceDisplay) device.getDeviceDisplay()).getDisplayRectangle();
SwtInputMethod inputMethod = (SwtInputMethod) device.getInputMethod();
boolean fullScreenMode = device.getDeviceDisplay().isFullScreenMode();
if (rect.x <= e.x && (rect.x + rect.width) > e.x
&& rect.y <= e.y && (rect.y + rect.height) > e.y) {
if (device.hasPointerMotionEvents()) { |