Merge branch 'master' of https://github.com/mozilla/j2me.js into per-thread-timeline
|
@ -19,6 +19,7 @@ main.html
|
|||
config/build.js
|
||||
manifest.webapp
|
||||
index.js
|
||||
style/main.css
|
||||
|
||||
# These are generated by the Java pre-processor. They're generated from
|
||||
# their *.jpp equivalents. Keep them up-to-date when you add *.jpp files!
|
||||
|
|
9
Makefile
|
@ -6,6 +6,7 @@ RELEASE ?= 0
|
|||
VERSION ?=$(shell date +%s)
|
||||
PROFILE ?= 0
|
||||
BENCHMARK ?= 0
|
||||
CONSOLE ?= 1
|
||||
VERBOSE ?= 0
|
||||
|
||||
# Sensor support
|
||||
|
@ -37,7 +38,6 @@ ifeq ($(VERBOSE),1)
|
|||
endif
|
||||
|
||||
MAIN_JS_SRCS = \
|
||||
libs/console.js \
|
||||
polyfill/canvas-toblob.js \
|
||||
polyfill/fromcodepoint.js \
|
||||
polyfill/codepointat.js \
|
||||
|
@ -97,6 +97,10 @@ ifeq ($(BENCHMARK),1)
|
|||
MAIN_JS_SRCS += benchmark.js libs/ttest.js
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE),1)
|
||||
MAIN_JS_SRCS += libs/console.js
|
||||
endif
|
||||
|
||||
# Add main.js last, as it depends on some of the other scripts.
|
||||
MAIN_JS_SRCS += main.js
|
||||
|
||||
|
@ -104,7 +108,7 @@ MAIN_JS_SRCS += main.js
|
|||
# If the configuration has changed, we update the checksum file to let the files
|
||||
# which depend on it to regenerate.
|
||||
|
||||
CHECKSUM := "$(RELEASE)$(PROFILE)$(BENCHMARK)$(JSR_256)$(JSR_082)$(JSR_179)"
|
||||
CHECKSUM := "$(RELEASE)$(PROFILE)$(BENCHMARK)$(CONSOLE)$(JSR_256)$(JSR_082)$(JSR_179)"
|
||||
OLD_CHECKSUM := "$(shell [ -f .checksum ] && cat .checksum)"
|
||||
$(shell [ $(CHECKSUM) != $(OLD_CHECKSUM) ] && echo $(CHECKSUM) > .checksum)
|
||||
|
||||
|
@ -113,6 +117,7 @@ PREPROCESS = python tools/preprocess-1.1.0/lib/preprocess.py -s \
|
|||
-D RELEASE=$(call toBool,$(RELEASE)) \
|
||||
-D PROFILE=$(PROFILE) \
|
||||
-D BENCHMARK=$(call toBool,$(BENCHMARK)) \
|
||||
-D CONSOLE=$(call toBool,$(CONSOLE)) \
|
||||
-D JSR_256=$(JSR_256) \
|
||||
-D JSR_179=$(JSR_179) \
|
||||
-D VERSION=$(VERSION)
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
package benchmark;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.IOException;
|
||||
import javax.microedition.io.Connector;
|
||||
import javax.microedition.io.file.FileConnection;
|
||||
import com.nokia.mid.s40.io.LocalMessageProtocolMessage;
|
||||
import com.nokia.mid.s40.io.LocalMessageProtocolConnection;
|
||||
import com.nokia.mid.s40.codec.DataEncoder;
|
||||
import com.nokia.mid.s40.codec.DataDecoder;
|
||||
import gnu.testlet.TestUtils;
|
||||
import org.mozilla.MemorySampler;
|
||||
import com.sun.cldchi.jvm.JVM;
|
||||
|
||||
public class ImageProcessingBench {
|
||||
LocalMessageProtocolConnection client;
|
||||
|
||||
String scaleImage() throws IOException {
|
||||
DataEncoder dataEncoder = new DataEncoder("Conv-BEB");
|
||||
dataEncoder.putStart(14, "event");
|
||||
dataEncoder.put(13, "name", "Scale");
|
||||
dataEncoder.put(2, "trans_id", 42);
|
||||
dataEncoder.put(11, "filename", "test.jpg");
|
||||
dataEncoder.putStart(15, "limits");
|
||||
dataEncoder.put(5, "max_hres", 100);
|
||||
dataEncoder.put(5, "max_vres", 100);
|
||||
dataEncoder.putEnd(15, "limits");
|
||||
dataEncoder.put(10, "aspect", "FullImage");
|
||||
dataEncoder.put(2, "quality", 80);
|
||||
dataEncoder.putEnd(14, "event");
|
||||
byte[] sendData = dataEncoder.getData();
|
||||
client.send(sendData, 0, sendData.length);
|
||||
|
||||
LocalMessageProtocolMessage msg = client.newMessage(null);
|
||||
client.receive(msg);
|
||||
byte[] clientData = msg.getData();
|
||||
|
||||
DataDecoder dataDecoder = new DataDecoder("Conv-BEB", clientData, 0, clientData.length);
|
||||
dataDecoder.getStart(14);
|
||||
dataDecoder.getString(13);
|
||||
dataDecoder.getInteger(2);
|
||||
dataDecoder.getString(10);
|
||||
return "file:////" + dataDecoder.getString(11);
|
||||
}
|
||||
|
||||
void runBenchmark() {
|
||||
try {
|
||||
long start, time = 0;
|
||||
|
||||
client = (LocalMessageProtocolConnection)Connector.open("localmsg://nokia.image-processing");
|
||||
|
||||
DataEncoder dataEncoder = new DataEncoder("Conv-BEB");
|
||||
dataEncoder.putStart(14, "event");
|
||||
dataEncoder.put(13, "name", "Common");
|
||||
dataEncoder.putStart(14, "message");
|
||||
dataEncoder.put(13, "name", "ProtocolVersion");
|
||||
dataEncoder.put(10, "version", "1.[0-10]");
|
||||
dataEncoder.putEnd(14, "message");
|
||||
dataEncoder.putEnd(14, "event");
|
||||
byte[] sendData = dataEncoder.getData();
|
||||
client.send(sendData, 0, sendData.length);
|
||||
|
||||
LocalMessageProtocolMessage msg = client.newMessage(null);
|
||||
client.receive(msg);
|
||||
|
||||
FileConnection originalImage = (FileConnection)Connector.open("file:////test.jpg", Connector.READ_WRITE);
|
||||
if (!originalImage.exists()) {
|
||||
originalImage.create();
|
||||
}
|
||||
OutputStream os = originalImage.openDataOutputStream();
|
||||
InputStream is = getClass().getResourceAsStream("/org/mozilla/io/test.jpg");
|
||||
os.write(TestUtils.read(is));
|
||||
os.close();
|
||||
|
||||
MemorySampler.sampleMemory("Memory before nokia.image-processing benchmark");
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
start = JVM.monotonicTimeMillis();
|
||||
String path = scaleImage();
|
||||
time += JVM.monotonicTimeMillis() - start;
|
||||
|
||||
FileConnection file = (FileConnection)Connector.open(path);
|
||||
file.delete();
|
||||
file.close();
|
||||
}
|
||||
System.out.println("scaleImage: " + time);
|
||||
MemorySampler.sampleMemory("Memory after nokia.image-processing benchmark");
|
||||
|
||||
originalImage.delete();
|
||||
originalImage.close();
|
||||
|
||||
client.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String args[]) {
|
||||
ImageProcessingBench bench = new ImageProcessingBench();
|
||||
bench.runBenchmark();
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@ public class SystemOutBench {
|
|||
for (int j = 0; j < 100; j++) {
|
||||
System.out.print(j % 10);
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
time = JVM.monotonicTimeMillis() - start;
|
||||
System.out.println();
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
* autosize
|
||||
* fontSize
|
||||
* language
|
||||
* forceRuntimeCompilation
|
||||
*
|
||||
* Keep this list up-to-date!
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module J2ME {
|
||||
declare var util;
|
||||
declare var util, config;
|
||||
declare var Promise;
|
||||
|
||||
import BytecodeStream = Bytecode.BytecodeStream;
|
||||
|
@ -243,9 +243,10 @@ module J2ME {
|
|||
// for synthetic method frames which have bad max_local counts.
|
||||
|
||||
// Inline heuristics that trigger JIT compilation here.
|
||||
if (enableRuntimeCompilation &&
|
||||
mi.state < MethodState.Compiled && // Give up if we're at this state.
|
||||
mi.stats.backwardsBranchCount + mi.stats.interpreterCallCount > 10) {
|
||||
if ((enableRuntimeCompilation &&
|
||||
mi.state < MethodState.Compiled && // Give up if we're at this state.
|
||||
mi.stats.backwardsBranchCount + mi.stats.interpreterCallCount > 10) ||
|
||||
config.forceRuntimeCompilation) {
|
||||
compileAndLinkMethod(mi);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,10 @@ classes.jar: $(SRCS) $(JPP_DESTS) $(EXTRA)
|
|||
$(foreach dir,$(SRC_DIRS),cp -a $(dir)/. build-src/;)
|
||||
find ./build-src -name *.java > build-srcs.txt
|
||||
javac -cp build-src -g:none -source 1.3 -target 1.3 -bootclasspath "" -extdirs "" -d ./build @build-srcs.txt > /dev/null
|
||||
java -jar ../build_tools/soot-trunk.jar -j2me -process-dir build -no-output-source-file-attribute -no-output-inner-classes-attribute -force-overwrite -include-all 2>&1 > /dev/null
|
||||
cp -a sootOutput/. build/
|
||||
# TODO: Re-enable Soot optimizations once tests with baseline JIT enabled
|
||||
# for all methods pass.
|
||||
#java -jar ../build_tools/soot-trunk.jar -j2me -process-dir build -no-output-source-file-attribute -no-output-inner-classes-attribute -force-overwrite -include-all 2>&1 > /dev/null
|
||||
#cp -a sootOutput/. build/
|
||||
cd build && jar cf0 ../classes.jar *
|
||||
jar uf0 classes.jar $(EXTRA)
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ module J2ME {
|
|||
"com/sun/javame/sensor/NativeChannel.doMeasureData.(II)[B": YieldReason.Root,
|
||||
"com/sun/midp/links/LinkPortal.getLinkCount0.()I": YieldReason.Root,
|
||||
"com/sun/midp/links/Link.receive0.(Lcom/sun/midp/links/LinkMessage;Lcom/sun/midp/links/Link;)V": YieldReason.Root,
|
||||
"com/nokia/mid/impl/jms/core/Launcher.handleContent.(Ljava/lang/String;)V": YieldReason.Root,
|
||||
"com/sun/midp/util/isolate/InterIsolateMutex.lock0.(I)V": YieldReason.Root,
|
||||
"com/sun/midp/events/NativeEventMonitor.waitForNativeEvent.(Lcom/sun/midp/events/NativeEvent;)I": YieldReason.Root,
|
||||
"com/sun/midp/io/j2me/push/ConnectionRegistry.poll0.(J)I": YieldReason.Root,
|
||||
|
|
|
@ -12,10 +12,6 @@ if (typeof console === "undefined") {
|
|||
}
|
||||
}
|
||||
|
||||
console.print = function (c) {
|
||||
putstr(String.fromCharCode(c));
|
||||
};
|
||||
|
||||
console.info = function (c) {
|
||||
putstr(String.fromCharCode(c));
|
||||
};
|
||||
|
@ -125,6 +121,11 @@ try {
|
|||
// load("bld/program.jar.js");
|
||||
// load("bld/tests.jar.js");
|
||||
|
||||
// Define this down here so it overrides the version defined by native.js.
|
||||
console.print = function (c) {
|
||||
putstr(String.fromCharCode(c));
|
||||
};
|
||||
|
||||
var dump = putstr;
|
||||
|
||||
CLASSES.addSourceDirectory("java/cldc1.1.1");
|
||||
|
|
|
@ -166,33 +166,18 @@
|
|||
* WebConsole: The standard console.log() and friends.
|
||||
*/
|
||||
function WebConsole() {
|
||||
this.buffer = "";
|
||||
}
|
||||
|
||||
WebConsole.prototype = {
|
||||
flush: function() {
|
||||
if (this.buffer.length) {
|
||||
var temp = this.buffer;
|
||||
this.buffer = "";
|
||||
console.info(temp);
|
||||
}
|
||||
},
|
||||
|
||||
push: function(item) {
|
||||
if (item.matchesCurrentFilters()) {
|
||||
this.flush(); // Preserve order w/r/t console.print().
|
||||
if (consoleBuffer.length) {
|
||||
// Preserve order w/r/t console.print().
|
||||
flushConsoleBuffer();
|
||||
}
|
||||
windowConsole[item.levelName].apply(windowConsole, [item.message]);
|
||||
}
|
||||
},
|
||||
|
||||
/** Print one character to the output (buffered). */
|
||||
print: function(ch) {
|
||||
if (ch === 10) {
|
||||
this.flush();
|
||||
} else {
|
||||
this.buffer += String.fromCharCode(ch);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -299,12 +284,9 @@
|
|||
terminal: typeof Terminal === "undefined" ? new WebConsole() : new TerminalConsole("#consoleContainer")
|
||||
};
|
||||
|
||||
var print = CONSOLES.web.print.bind(CONSOLES.web);
|
||||
|
||||
// If we're only printing to the web console, then use the original console
|
||||
// object, so that file/line number references show up correctly in it.
|
||||
if (ENABLED_CONSOLE_TYPES.length === 1 && ENABLED_CONSOLE_TYPES[0] === "web") {
|
||||
windowConsole.print = print;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -345,15 +327,12 @@
|
|||
});
|
||||
};
|
||||
|
||||
window.console = {
|
||||
trace: logAtLevel.bind(null, "trace"),
|
||||
log: logAtLevel.bind(null, "log"),
|
||||
info: logAtLevel.bind(null, "info"),
|
||||
warn: logAtLevel.bind(null, "warn"),
|
||||
error: logAtLevel.bind(null, "error"),
|
||||
print: print,
|
||||
profile: typeof console !== "undefined" && console.profile ? console.profile.bind(console) : null,
|
||||
profileEnd: typeof console !== "undefined" && console.profileEnd ? console.profileEnd.bind(console) : null,
|
||||
};
|
||||
window.console = Object.create(windowConsole, {
|
||||
trace: { value: logAtLevel.bind(null, "trace") },
|
||||
log: { value: logAtLevel.bind(null, "log") },
|
||||
info: { value: logAtLevel.bind(null, "info") },
|
||||
warn: { value: logAtLevel.bind(null, "warn") },
|
||||
error: { value: logAtLevel.bind(null, "error") },
|
||||
});
|
||||
|
||||
})();
|
||||
|
|
|
@ -434,6 +434,11 @@ var fs = (function() {
|
|||
var openedFiles = new Map();
|
||||
var lastId = 2;
|
||||
|
||||
function getBlob(path) {
|
||||
var record = store.getItem(normalizePath(path));
|
||||
return record ? record.data : null;
|
||||
}
|
||||
|
||||
function open(path, cb) {
|
||||
path = normalizePath(path);
|
||||
if (DEBUG_FS) { console.log("fs open " + path); }
|
||||
|
@ -919,5 +924,6 @@ var fs = (function() {
|
|||
exportStore: exportStore,
|
||||
importStore: importStore,
|
||||
createUniqueFile: createUniqueFile,
|
||||
getBlob: getBlob,
|
||||
};
|
||||
})();
|
||||
|
|
19
main.html.in
|
@ -56,8 +56,9 @@
|
|||
|
||||
<body>
|
||||
<div id="pageContainer">
|
||||
<pre id="consoleContainer">
|
||||
</pre>
|
||||
<!-- #if CONSOLE == "true" -->
|
||||
<pre id="consoleContainer"></pre>
|
||||
<!-- #endif -->
|
||||
<div id="profilerContainer">
|
||||
<div id="profilerToolbar">
|
||||
<div class="toolbarLabel">Profiler <span id="profilerMessage" class="toolbarMessage">6 Seconds</span></div>
|
||||
|
@ -75,8 +76,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- The raw console is used for unit tests, so it's not visible by default: -->
|
||||
<pre id="raw-console" style="display: none"></pre>
|
||||
<!-- #if CONSOLE == "true" -->
|
||||
<!-- The raw console is used for unit tests, so it's not visible by default: -->
|
||||
<pre id="raw-console" style="display: none"></pre>
|
||||
<!-- #endif -->
|
||||
|
||||
<div id="display-container">
|
||||
<div id="display">
|
||||
|
@ -206,9 +209,11 @@
|
|||
<option value="4">Log Level: Error
|
||||
<option value="5">Log Level: Silent
|
||||
</select>
|
||||
<input id="console-filter-input" type="text" placeholder="Filter Console Output" value="">
|
||||
<button id="console-clear">Clear console</button>
|
||||
<button id="console-save">Save console</button>
|
||||
<!-- #if CONSOLE == "true" -->
|
||||
<input id="console-filter-input" type="text" placeholder="Filter Console Output" value="">
|
||||
<button id="console-clear">Clear console</button>
|
||||
<button id="console-save">Save console</button>
|
||||
<!-- #endif -->
|
||||
<label><input type="checkbox" id="perfWriter">Perf</label>
|
||||
</section>
|
||||
<section>
|
||||
|
|
181
midp/gfx.js
|
@ -245,22 +245,9 @@ var currentlyFocusedTextEditor;
|
|||
Native["javax/microedition/lcdui/ImageDataFactory.createImmutableImageDataRegion.(Ljavax/microedition/lcdui/ImageData;Ljavax/microedition/lcdui/ImageData;IIIIIZ)V"] =
|
||||
function(dataDest, dataSource, x, y, width, height, transform, isMutable) {
|
||||
var context = initImageData(dataDest, width, height);
|
||||
|
||||
if (transform === TRANS_MIRROR || transform === TRANS_MIRROR_ROT180) {
|
||||
context.scale(-1, 1);
|
||||
} else if (transform === TRANS_MIRROR_ROT90 || transform === TRANS_MIRROR_ROT270) {
|
||||
context.scale(1, -1);
|
||||
} else if (transform === TRANS_ROT90 || transform === TRANS_MIRROR_ROT90) {
|
||||
context.rotate(Math.PI / 2);
|
||||
} else if (transform === TRANS_ROT180 || transform === TRANS_MIRROR_ROT180) {
|
||||
context.rotate(Math.PI);
|
||||
} else if (transform === TRANS_ROT270 || transform === TRANS_MIRROR_ROT270) {
|
||||
context.rotate(1.5 * Math.PI);
|
||||
if (!renderRegion(context, dataSource.context.canvas, x, y, width, height, transform, 0, 0, TOP|LEFT)) {
|
||||
throw $.newIllegalArgumentException();
|
||||
}
|
||||
|
||||
var imgdata = dataSource.context.getImageData(x, y, width, height);
|
||||
context.putImageData(imgdata, 0, 0);
|
||||
|
||||
dataDest.isMutable = isMutable;
|
||||
};
|
||||
|
||||
|
@ -425,22 +412,6 @@ var currentlyFocusedTextEditor;
|
|||
var BOTTOM = 32;
|
||||
var BASELINE = 64;
|
||||
|
||||
function withAnchor(g, c, anchor, x, y, w, h) {
|
||||
if (anchor & RIGHT) {
|
||||
x -= w;
|
||||
} else if (anchor & HCENTER) {
|
||||
x -= (w >>> 1) | 0;
|
||||
}
|
||||
|
||||
if (anchor & BOTTOM) {
|
||||
y -= h;
|
||||
} else if (anchor & VCENTER) {
|
||||
y -= (h >>> 1) | 0;
|
||||
}
|
||||
|
||||
return [x, y];
|
||||
}
|
||||
|
||||
function measureWidth(c, str) {
|
||||
return c.measureText(str).width | 0;
|
||||
}
|
||||
|
@ -798,29 +769,15 @@ var currentlyFocusedTextEditor;
|
|||
};
|
||||
|
||||
Native["javax/microedition/lcdui/Graphics.render.(Ljavax/microedition/lcdui/Image;III)Z"] = function(image, x, y, anchor) {
|
||||
return renderImage(this, image, x, y, anchor);
|
||||
return renderRegion(this.context2D, image.imageData.context.canvas, 0, 0, image.width, image.height, TRANS_NONE, x, y, anchor);
|
||||
};
|
||||
|
||||
function renderImage(g, image, x, y, anchor) {
|
||||
var texture = image.imageData.context.canvas;
|
||||
|
||||
var c = g.context2D;
|
||||
|
||||
var pair = withAnchor(g, c, anchor, x, y, texture.width, texture.height);
|
||||
x = pair[0];
|
||||
y = pair[1];
|
||||
|
||||
c.drawImage(texture, x, y);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Native["javax/microedition/lcdui/Graphics.drawRegion.(Ljavax/microedition/lcdui/Image;IIIIIIII)V"] = function(src, x_src, y_src, width, height, transform, x_dest, y_dest, anchor) {
|
||||
if (!src) {
|
||||
throw $.newNullPointerException("src image is null");
|
||||
}
|
||||
|
||||
if (!renderRegion(this, src, x_src, y_src, width, height,
|
||||
if (!renderRegion(this.context2D, src.imageData.context.canvas, x_src, y_src, width, height,
|
||||
transform, x_dest, y_dest, anchor)) {
|
||||
throw $.newIllegalArgumentException();
|
||||
}
|
||||
|
@ -831,7 +788,7 @@ var currentlyFocusedTextEditor;
|
|||
throw $.newNullPointerException("image is null");
|
||||
}
|
||||
|
||||
if (!renderImage(this, image, x, y, anchor)) {
|
||||
if (!renderRegion(this.context2D, image.imageData.context.canvas, 0, 0, image.imageData.width, image.imageData.height, TRANS_NONE, x, y, anchor)) {
|
||||
throw $.newIllegalArgumentException();
|
||||
}
|
||||
};
|
||||
|
@ -1178,38 +1135,114 @@ var currentlyFocusedTextEditor;
|
|||
var TRANS_ROT270 = 6;
|
||||
var TRANS_MIRROR_ROT90 = 7;
|
||||
|
||||
function renderRegion(g, image, sx, sy, sw, sh, transform, x, y, anchor) {
|
||||
var imgData = image.imageData,
|
||||
texture = imgData.context.canvas;
|
||||
|
||||
var c = g.context2D;
|
||||
if (transform !== TRANS_NONE) {
|
||||
c.save();
|
||||
function renderRegion(dstContext, srcCanvas, sx, sy, sw, sh, transform, absX, absY, anchor) {
|
||||
var w, h;
|
||||
switch (transform) {
|
||||
case TRANS_NONE:
|
||||
case TRANS_ROT180:
|
||||
case TRANS_MIRROR:
|
||||
case TRANS_MIRROR_ROT180:
|
||||
w = sw;
|
||||
h = sh;
|
||||
break;
|
||||
case TRANS_ROT90:
|
||||
case TRANS_ROT270:
|
||||
case TRANS_MIRROR_ROT90:
|
||||
case TRANS_MIRROR_ROT270:
|
||||
w = sh;
|
||||
h = sw;
|
||||
break;
|
||||
}
|
||||
|
||||
var pair = withAnchor(g, c, anchor, x, y, sw, sh);
|
||||
x = pair[0];
|
||||
y = pair[1];
|
||||
|
||||
if (transform === TRANS_MIRROR || transform === TRANS_MIRROR_ROT180) {
|
||||
c.scale(-1, 1);
|
||||
} else if (transform === TRANS_MIRROR_ROT90 || transform === TRANS_MIRROR_ROT270) {
|
||||
c.scale(1, -1);
|
||||
} else if (transform === TRANS_ROT90 || transform === TRANS_MIRROR_ROT90) {
|
||||
c.rotate(Math.PI / 2);
|
||||
} else if (transform === TRANS_ROT180 || transform === TRANS_MIRROR_ROT180) {
|
||||
c.rotate(Math.PI);
|
||||
} else if (transform === TRANS_ROT270 || transform === TRANS_MIRROR_ROT270) {
|
||||
c.rotate(1.5 * Math.PI);
|
||||
// Make `absX` and `absY` the top-left coordinates where we will
|
||||
// place the image in absolute coordinates
|
||||
if (0 != (anchor & HCENTER)) {
|
||||
absX -= ((w >>> 1) | 0);
|
||||
} else if (0 != (anchor & RIGHT)) {
|
||||
absX -= w;
|
||||
}
|
||||
if (0 != (anchor & VCENTER)) {
|
||||
absY -= ((h >>> 1) | 0);
|
||||
} else if (0 != (anchor & BOTTOM)) {
|
||||
absY -= h;
|
||||
}
|
||||
|
||||
c.drawImage(texture, sx, sy, sw, sh, x, y, sw, sh);
|
||||
|
||||
if (transform !== TRANS_NONE) {
|
||||
c.restore();
|
||||
var x, y;
|
||||
switch (transform) {
|
||||
case TRANS_NONE:
|
||||
x = absX;
|
||||
y = absY;
|
||||
break;
|
||||
case TRANS_ROT90:
|
||||
dstContext.rotate(Math.PI / 2);
|
||||
x = absY;
|
||||
y = -absX - w;
|
||||
break;
|
||||
case TRANS_ROT180:
|
||||
dstContext.rotate(Math.PI);
|
||||
x = -absX - w;
|
||||
y = -absY - h;
|
||||
break;
|
||||
case TRANS_ROT270:
|
||||
dstContext.rotate(Math.PI * 1.5);
|
||||
x = -absY - h;
|
||||
y = absX;
|
||||
break;
|
||||
case TRANS_MIRROR:
|
||||
dstContext.scale(-1, 1);
|
||||
x = -absX - w;
|
||||
y = absY;
|
||||
break;
|
||||
case TRANS_MIRROR_ROT90:
|
||||
dstContext.rotate(Math.PI / 2);
|
||||
dstContext.scale(-1, 1);
|
||||
x = -absY - h;
|
||||
y = -absX - w;
|
||||
break;
|
||||
case TRANS_MIRROR_ROT180:
|
||||
dstContext.scale(1, -1);
|
||||
x = absX;
|
||||
y = -absY - h;
|
||||
break;
|
||||
case TRANS_MIRROR_ROT270:
|
||||
dstContext.rotate(Math.PI * 1.5);
|
||||
dstContext.scale(-1, 1);
|
||||
x = absY;
|
||||
y = absX;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
dstContext.drawImage(srcCanvas, sx, sy, sw, sh, x, y, sw, sh);
|
||||
|
||||
switch (transform) {
|
||||
case TRANS_NONE:
|
||||
break;
|
||||
case TRANS_ROT90:
|
||||
dstContext.rotate(Math.PI * 1.5);
|
||||
break;
|
||||
case TRANS_ROT180:
|
||||
dstContext.rotate(Math.PI);
|
||||
break;
|
||||
case TRANS_ROT270:
|
||||
dstContext.rotate(Math.PI / 2);
|
||||
break;
|
||||
case TRANS_MIRROR:
|
||||
dstContext.scale(-1, 1);
|
||||
break;
|
||||
case TRANS_MIRROR_ROT90:
|
||||
dstContext.scale(-1, 1);
|
||||
dstContext.rotate(Math.PI * 1.5);
|
||||
break;
|
||||
case TRANS_MIRROR_ROT180:
|
||||
dstContext.scale(1, -1);
|
||||
break;
|
||||
case TRANS_MIRROR_ROT270:
|
||||
dstContext.scale(-1, 1);
|
||||
dstContext.rotate(Math.PI / 2);
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
};
|
||||
|
||||
Native["javax/microedition/lcdui/Graphics.drawLine.(IIII)V"] = function(x1, y1, x2, y2) {
|
||||
|
|
157
midp/localmsg.js
|
@ -762,101 +762,94 @@ NokiaImageProcessingLocalMsgConnection.prototype.sendMessageToServer = function(
|
|||
return;
|
||||
}
|
||||
|
||||
fs.open("/" + fileName, (function(fd) {
|
||||
var img = null;
|
||||
var imgData = fs.getBlob("/" + fileName);
|
||||
var img = new Image();
|
||||
img.src = URL.createObjectURL(imgData);
|
||||
|
||||
function _cleanupImg() {
|
||||
if (img) {
|
||||
URL.revokeObjectURL(img.src);
|
||||
img.src = '';
|
||||
img = null;
|
||||
}
|
||||
function _cleanupImg() {
|
||||
if (img) {
|
||||
URL.revokeObjectURL(img.src);
|
||||
img.src = '';
|
||||
img = null;
|
||||
}
|
||||
}
|
||||
|
||||
var _sendBackScaledImage = function(blob) {
|
||||
_cleanupImg();
|
||||
|
||||
var ext = "";
|
||||
var extIndex = fileName.lastIndexOf(".");
|
||||
if (extIndex != -1) {
|
||||
ext = fileName.substr(extIndex);
|
||||
}
|
||||
|
||||
var _sendBackScaledImage = function(blob) {
|
||||
_cleanupImg();
|
||||
var uniqueFileName = fs.createUniqueFile("/Private/nokiaimageprocessing", "image" + ext, blob);
|
||||
var encoder = new DataEncoder();
|
||||
|
||||
var ext = "";
|
||||
var extIndex = fileName.lastIndexOf(".");
|
||||
if (extIndex != -1) {
|
||||
ext = fileName.substr(extIndex);
|
||||
}
|
||||
encoder.putStart(DataType.STRUCT, "event");
|
||||
encoder.put(DataType.METHOD, "name", "Scale");
|
||||
encoder.put(DataType.BYTE, "trans_id", trans_id);
|
||||
encoder.put(DataType.STRING, "result", "Complete"); // Name unknown
|
||||
encoder.put(DataType.WSTRING, "filename", "Private/nokiaimageprocessing/" + uniqueFileName); // Name unknown
|
||||
encoder.putEnd(DataType.STRUCT, "event");
|
||||
|
||||
var uniqueFileName = fs.createUniqueFile("/Private/nokiaimageprocessing", "image" + ext, blob);
|
||||
var encoder = new DataEncoder();
|
||||
var data = new TextEncoder().encode(encoder.getData());
|
||||
this.sendMessageToClient({
|
||||
data: data,
|
||||
length: data.length,
|
||||
offset: 0,
|
||||
});
|
||||
}.bind(this);
|
||||
|
||||
encoder.putStart(DataType.STRUCT, "event");
|
||||
encoder.put(DataType.METHOD, "name", "Scale");
|
||||
encoder.put(DataType.BYTE, "trans_id", trans_id);
|
||||
encoder.put(DataType.STRING, "result", "Complete"); // Name unknown
|
||||
encoder.put(DataType.WSTRING, "filename", "Private/nokiaimageprocessing/" + uniqueFileName); // Name unknown
|
||||
encoder.putEnd(DataType.STRUCT, "event");
|
||||
img.onload = (function() {
|
||||
// If the image size is less than the given max_kb, and height/width
|
||||
// are less than max_hres/max_wres, send the original image immediately
|
||||
// without any scaling.
|
||||
if (max_kb > 0 && (max_kb * 1024) >= imgData.size &&
|
||||
(max_hres <= 0 || img.naturalHeight <= max_vres) &&
|
||||
(max_vres <= 0 || img.naturalWidth <= max_hres)) {
|
||||
_sendBackScaledImage(imgData);
|
||||
return;
|
||||
}
|
||||
|
||||
var data = new TextEncoder().encode(encoder.getData());
|
||||
this.sendMessageToClient({
|
||||
data: data,
|
||||
length: data.length,
|
||||
offset: 0,
|
||||
function _imageToBlob(aCanvas, aImage, aHeight, aWidth, aQuality) {
|
||||
aCanvas.width = aWidth;
|
||||
aCanvas.height = aHeight;
|
||||
var ctx = aCanvas.getContext("2d");
|
||||
ctx.drawImage(aImage, 0, 0, aWidth, aHeight);
|
||||
|
||||
return new Promise(function(resolve, reject) {
|
||||
aCanvas.toBlob(resolve, "image/jpeg", aQuality / 100);
|
||||
});
|
||||
}.bind(this);
|
||||
}
|
||||
|
||||
var imgData = fs.read(fd);
|
||||
var fileSize = fs.getsize(fd);
|
||||
fs.close(fd);
|
||||
var canvas = document.createElement("canvas");
|
||||
if (max_kb <= 0) {
|
||||
_imageToBlob(canvas, img, Math.min(img.naturalHeight, max_vres),
|
||||
Math.min(img.naturalWidth, max_hres), quality).then(_sendBackScaledImage);
|
||||
return;
|
||||
}
|
||||
|
||||
img = new Image();
|
||||
img.src = URL.createObjectURL(new Blob([ imgData ]));
|
||||
_imageToBlob(canvas, img, img.naturalHeight,
|
||||
img.naturalWidth, quality).then(function(blob) {
|
||||
var imgSizeInKb = blob.size / 1024;
|
||||
|
||||
img.onload = (function() {
|
||||
// If the image size is less than the given max_kb, and height/width
|
||||
// are less than max_hres/max_wres, send the original image immediately
|
||||
// without any scaling.
|
||||
if (max_kb > 0 && (max_kb * 1024) >= fileSize &&
|
||||
(max_hres <= 0 || img.naturalHeight <= max_vres) &&
|
||||
(max_vres <= 0 || img.naturalWidth <= max_hres)) {
|
||||
_sendBackScaledImage(new Blob([ imgData ]));
|
||||
return;
|
||||
}
|
||||
// Roughly recalc max_vres and max_hres based on the max_kb and the real resolution.
|
||||
var ratio = Math.sqrt(max_kb / imgSizeInKb);
|
||||
max_hres = Math.min(img.naturalWidth * ratio,
|
||||
max_hres <= 0 ? img.naturalWidth : max_hres);
|
||||
max_vres = Math.min(img.naturalHeight * ratio,
|
||||
max_vres <=0 ? img.naturalHeight : max_vres);
|
||||
|
||||
function _imageToBlob(aCanvas, aImage, aHeight, aWidth, aQuality) {
|
||||
aCanvas.width = aWidth;
|
||||
aCanvas.height = aHeight;
|
||||
var ctx = aCanvas.getContext("2d");
|
||||
ctx.drawImage(aImage, 0, 0, aWidth, aHeight);
|
||||
return _imageToBlob(canvas, img, Math.min(img.naturalHeight, max_vres),
|
||||
Math.min(img.naturalWidth, max_hres), quality);
|
||||
}).then(_sendBackScaledImage);
|
||||
}).bind(this);
|
||||
|
||||
return new Promise(function(resolve, reject) {
|
||||
aCanvas.toBlob(resolve, "image/jpeg", aQuality / 100);
|
||||
});
|
||||
}
|
||||
|
||||
var canvas = document.createElement("canvas");
|
||||
if (max_kb <= 0) {
|
||||
_imageToBlob(canvas, img, Math.min(img.naturalHeight, max_vres),
|
||||
Math.min(img.naturalWidth, max_hres), quality).then(_sendBackScaledImage);
|
||||
return;
|
||||
}
|
||||
|
||||
_imageToBlob(canvas, img, img.naturalHeight,
|
||||
img.naturalWidth, quality).then(function(blob) {
|
||||
var imgSizeInKb = blob.size / 1024;
|
||||
|
||||
// Roughly recalc max_vres and max_hres based on the max_kb and the real resolution.
|
||||
var ratio = Math.sqrt(max_kb / imgSizeInKb);
|
||||
max_hres = Math.min(img.naturalWidth * ratio,
|
||||
max_hres <= 0 ? img.naturalWidth : max_hres);
|
||||
max_vres = Math.min(img.naturalHeight * ratio,
|
||||
max_vres <=0 ? img.naturalHeight : max_vres);
|
||||
|
||||
return _imageToBlob(canvas, img, Math.min(img.naturalHeight, max_vres),
|
||||
Math.min(img.naturalWidth, max_hres), quality);
|
||||
}).then(_sendBackScaledImage);
|
||||
}).bind(this);
|
||||
|
||||
img.onerror = function(e) {
|
||||
console.error("Error in decoding image");
|
||||
_cleanupImg();
|
||||
};
|
||||
}).bind(this));
|
||||
img.onerror = function(e) {
|
||||
console.error("Error in decoding image");
|
||||
_cleanupImg();
|
||||
};
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -227,8 +227,6 @@ function AudioPlayer(playerContainer) {
|
|||
}
|
||||
}.bind(this));
|
||||
|
||||
/* @type HTMLAudioElement */
|
||||
this.audio = new Audio();
|
||||
this.paused = true;
|
||||
this.loaded = false;
|
||||
this.volume = 100;
|
||||
|
@ -357,11 +355,7 @@ ImagePlayer.prototype.realize = function() {
|
|||
};
|
||||
|
||||
if (this.url.startsWith("file")) {
|
||||
fs.open(this.url.substring(7), (function(fd) {
|
||||
var imgData = fs.read(fd);
|
||||
fs.close(fd);
|
||||
this.image.src = URL.createObjectURL(new Blob([ imgData ]));
|
||||
}).bind(this));
|
||||
this.image.src = URL.createObjectURL(fs.getBlob(this.url.substring(7)));
|
||||
} else {
|
||||
this.image.src = this.url;
|
||||
}
|
||||
|
@ -448,12 +442,8 @@ VideoPlayer.prototype.realize = function() {
|
|||
};
|
||||
|
||||
if (this.playerContainer.url.startsWith("file")) {
|
||||
fs.open(this.playerContainer.url.substring(7), (function(fd) {
|
||||
var videoData = fs.read(fd);
|
||||
fs.close(fd);
|
||||
this.video.src = URL.createObjectURL(new Blob([ videoData ]),
|
||||
{ type: this.playerContainer.contentType });
|
||||
}).bind(this));
|
||||
this.video.src = URL.createObjectURL(fs.getBlob(this.playerContainer.url.substring(7)),
|
||||
{ type: this.playerContainer.contentType });
|
||||
} else {
|
||||
this.video.src = this.playerContainer.url;
|
||||
}
|
||||
|
|
|
@ -1170,6 +1170,8 @@ var MIDP = (function() {
|
|||
|
||||
addUnimplementedNative("com/sun/j2me/content/RegistryStore.register0.(ILjava/lang/String;Lcom/sun/j2me/content/ContentHandlerRegData;)Z", 0);
|
||||
|
||||
addUnimplementedNative("com/sun/j2me/content/RegistryStore.getHandler0.(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;", null);
|
||||
|
||||
Native["com/sun/j2me/content/AppProxy.isInSvmMode.()Z"] = function() {
|
||||
// We are in MVM mode (multiple MIDlets running concurrently)
|
||||
return 0;
|
||||
|
|
82
native.js
|
@ -559,6 +559,24 @@ Native["java/lang/Thread.activeCount.()I"] = function() {
|
|||
return $.ctx.runtime.threadCount;
|
||||
};
|
||||
|
||||
var consoleBuffer = "";
|
||||
|
||||
function flushConsoleBuffer() {
|
||||
if (consoleBuffer.length) {
|
||||
var temp = consoleBuffer;
|
||||
consoleBuffer = "";
|
||||
console.info(temp);
|
||||
}
|
||||
}
|
||||
|
||||
console.print = function(ch) {
|
||||
if (ch === 10) {
|
||||
flushConsoleBuffer();
|
||||
} else {
|
||||
consoleBuffer += String.fromCharCode(ch);
|
||||
}
|
||||
};
|
||||
|
||||
Native["com/sun/cldchi/io/ConsoleOutputStream.write.(I)V"] = function(ch) {
|
||||
console.print(ch);
|
||||
};
|
||||
|
@ -859,48 +877,38 @@ Native["com/nokia/mid/impl/jms/core/Launcher.handleContent.(Ljava/lang/String;)V
|
|||
throw $.newException("File not supported: " + fileName);
|
||||
}
|
||||
|
||||
var ctx = $.ctx;
|
||||
asyncImpl("V", new Promise(function(resolve, reject) {
|
||||
// `fileName` is supposed to be a full path, but we don't support
|
||||
// partition, e.g. `C:` or `E:` etc, so the `fileName` we got here
|
||||
// is something like: `Photos/sampleImage.jpg`, we need to prepend
|
||||
// the root dir to make sure it's valid.
|
||||
fileName = "/" + fileName;
|
||||
fs.open(fileName, function(fd) {
|
||||
if (fd == -1) {
|
||||
ctx.setAsCurrentContext();
|
||||
console.error("File not found: " + fileName);
|
||||
reject($.newException("File not found: " + fileName));
|
||||
return;
|
||||
}
|
||||
// `fileName` is supposed to be a full path, but we don't support
|
||||
// partition, e.g. `C:` or `E:` etc, so the `fileName` we got here
|
||||
// is something like: `Photos/sampleImage.jpg`, we need to prepend
|
||||
// the root dir to make sure it's valid.
|
||||
var imgData = fs.getBlob("/" + fileName);
|
||||
if (!imgData) {
|
||||
console.error("File not found: " + fileName);
|
||||
throw $.newException("File not found: " + fileName);
|
||||
}
|
||||
|
||||
var maskId = "image-launcher";
|
||||
var mask = document.getElementById(maskId);
|
||||
var maskId = "image-launcher";
|
||||
var mask = document.getElementById(maskId);
|
||||
|
||||
function _revokeImageURL() {
|
||||
URL.revokeObjectURL(/url\((.+)\)/ig.exec(mask.style.backgroundImage)[1]);
|
||||
}
|
||||
function _revokeImageURL() {
|
||||
URL.revokeObjectURL(/url\((.+)\)/ig.exec(mask.style.backgroundImage)[1]);
|
||||
}
|
||||
|
||||
if (mask) {
|
||||
_revokeImageURL();
|
||||
} else {
|
||||
mask = document.createElement("div");
|
||||
mask.id = maskId;
|
||||
mask.onclick = mask.ontouchstart = function() {
|
||||
_revokeImageURL();
|
||||
mask.parentNode.removeChild(mask);
|
||||
};
|
||||
if (mask) {
|
||||
_revokeImageURL();
|
||||
} else {
|
||||
mask = document.createElement("div");
|
||||
mask.id = maskId;
|
||||
mask.onclick = mask.ontouchstart = function() {
|
||||
_revokeImageURL();
|
||||
mask.parentNode.removeChild(mask);
|
||||
};
|
||||
|
||||
document.getElementById("main").appendChild(mask);
|
||||
}
|
||||
document.getElementById("main").appendChild(mask);
|
||||
}
|
||||
|
||||
mask.style.backgroundImage = "url(" +
|
||||
URL.createObjectURL(new Blob([fs.read(fd)])) + ")";
|
||||
|
||||
fs.close(fd);
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
mask.style.backgroundImage = "url(" +
|
||||
URL.createObjectURL(imgData) + ")";
|
||||
};
|
||||
|
||||
function addUnimplementedNative(signature, returnValue) {
|
||||
|
|
|
@ -356,6 +356,7 @@ form[role="dialog"][data-type="confirm"].lcdui-alert section {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* #if CONSOLE == "true" */
|
||||
#consoleContainer {
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
|
@ -373,6 +374,7 @@ form[role="dialog"][data-type="confirm"].lcdui-alert section {
|
|||
top: 0;
|
||||
bottom: 512px;
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
#profilerContainer {
|
||||
display: none;
|
|
@ -49,12 +49,12 @@ javax/microedition/media/test.webm: gfx/images/red.png
|
|||
ffmpeg -loop 1 -i gfx/images/red.png -t 10 javax/microedition/media/test.webm
|
||||
|
||||
Testlets.java: $(SRCS) $(JASMIN_SRCS) Makefile
|
||||
echo "public class Testlets {" > $@
|
||||
echo " static String[] list = {" >> $@
|
||||
grep "implements Testlet" $(SRCS) | sed -e "s/^.\///" -e "s/\.java.*//" -e "s/\(.*\)/\"\1\",/" >> $@
|
||||
grep "implements gnu/testlet/Testlet" `find . -name "*.j"` | sed -e "s/^.\///" -e "s/\.j.*//" -e "s/\(.*\)/\"\1\",/" >> $@
|
||||
echo " null};" >> $@
|
||||
echo "};" >> $@
|
||||
@echo "public class Testlets {" > $@
|
||||
@echo " static String[] list = {" >> $@
|
||||
@grep "implements Testlet" $(SRCS) | sed -e "s/^.\///" -e "s/\.java.*//" -e "s/\(.*\)/\"\1\",/" >> $@
|
||||
@grep "implements gnu/testlet/Testlet" `find . -name "*.j"` | sed -e "s/^.\///" -e "s/\.j.*//" -e "s/\(.*\)/\"\1\",/" >> $@
|
||||
@echo " null};" >> $@
|
||||
@echo "};" >> $@
|
||||
|
||||
tests.jar: $(SRCS) $(JASMIN_SRCS) Testlets.java
|
||||
rm -rf build
|
||||
|
|
|
@ -34,7 +34,6 @@ var gfxTests = [
|
|||
{ name: "gfx/AlertTwoCommandsTest", maxDifferentLinux: 1403, maxDifferentMac: 2186 },
|
||||
{ name: "gfx/CanvasTest", maxDifferentLinux: 0, maxDifferentMac: 0 },
|
||||
{ name: "gfx/CanvasWithHeaderTest", maxDifferentLinux: 823, maxDifferentMac: 1351 },
|
||||
{ name: "gfx/DrawRegionTest", maxDifferentLinux: 0, maxDifferentMac: 0 },
|
||||
{ name: "gfx/ImageRenderingTest", maxDifferentLinux: 0, maxDifferentMac: 0 },
|
||||
{ name: "gfx/FillRectTest", maxDifferentLinux: 0, maxDifferentMac: 0 },
|
||||
{ name: "gfx/DrawAndFillRoundRectTest", maxDifferentLinux: 243, maxDifferentMac: 1592 },
|
||||
|
@ -82,6 +81,78 @@ var gfxTests = [
|
|||
{ name: "gfx/VideoPlayerTest", maxDifferentLinux: 0, maxDifferentMac: 0 },
|
||||
{ name: "gfx/ImageCapture", maxDifferentLinux: 0, maxDifferentMac: 0 },
|
||||
{ name: "gfx/CameraTest", maxDifferentLinux: 0, maxDifferentMac: 0 },
|
||||
{ name: "gfx/DrawRegionTransMirrorAnchorBottomHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorAnchorBottomLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorAnchorBottomRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorAnchorTopHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorAnchorTopLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorAnchorTopRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorAnchorVCenterHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorAnchorVCenterLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorAnchorVCenterRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot180AnchorBottomHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot180AnchorBottomLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot180AnchorBottomRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot180AnchorTopHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot180AnchorTopLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot180AnchorTopRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot180AnchorVCenterHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot180AnchorVCenterLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot180AnchorVCenterRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot270AnchorBottomHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot270AnchorBottomLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot270AnchorBottomRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot270AnchorTopHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot270AnchorTopLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot270AnchorTopRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot270AnchorVCenterHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot270AnchorVCenterLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot270AnchorVCenterRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot90AnchorBottomHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot90AnchorBottomLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot90AnchorBottomRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot90AnchorTopHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot90AnchorTopLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot90AnchorTopRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot90AnchorVCenterHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot90AnchorVCenterLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransMirrorRot90AnchorVCenterRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransNoneAnchorBottomHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransNoneAnchorBottomLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransNoneAnchorBottomRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransNoneAnchorTopHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransNoneAnchorTopLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransNoneAnchorTopRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransNoneAnchorVCenterHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransNoneAnchorVCenterLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransNoneAnchorVCenterRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot180AnchorBottomHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot180AnchorBottomLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot180AnchorBottomRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot180AnchorTopHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot180AnchorTopLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot180AnchorTopRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot180AnchorVCenterHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot180AnchorVCenterLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot180AnchorVCenterRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot270AnchorBottomHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot270AnchorBottomLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot270AnchorBottomRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot270AnchorTopHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot270AnchorTopLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot270AnchorTopRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot270AnchorVCenterHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot270AnchorVCenterLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot270AnchorVCenterRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot90AnchorBottomHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot90AnchorBottomLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot90AnchorBottomRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot90AnchorTopHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot90AnchorTopLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot90AnchorTopRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot90AnchorVCenterHCenter", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot90AnchorVCenterLeft", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
{ name: "gfx/DrawRegionTransRot90AnchorVCenterRight", maxDifferentLinux: 164, maxDifferentMac: 164 },
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -106,7 +177,7 @@ function syncFS() {
|
|||
});
|
||||
}
|
||||
|
||||
casper.test.begin("unit tests", 20 + gfxTests.length, function(test) {
|
||||
casper.test.begin("unit tests", 21 + gfxTests.length, function(test) {
|
||||
casper.start("data:text/plain,start");
|
||||
|
||||
casper.page.onLongRunningScript = function(message) {
|
||||
|
@ -157,6 +228,11 @@ casper.test.begin("unit tests", 20 + gfxTests.length, function(test) {
|
|||
.thenOpen("http://localhost:8000/index.html?logConsole=web,page&logLevel=log")
|
||||
.withFrame(0, basicUnitTests);
|
||||
|
||||
// Run the same unit tests again with baseline JIT enabled for all methods.
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?logConsole=web,page&logLevel=log&forceRuntimeCompilation=1")
|
||||
.withFrame(0, basicUnitTests);
|
||||
|
||||
casper
|
||||
.thenOpen("http://localhost:8000/index.html?main=tests/isolate/TestIsolate&logLevel=info&logConsole=web,page,raw")
|
||||
.withFrame(0, function() {
|
||||
|
|
Двоичные данные
tests/gfx/DrawRegionTest.png
До Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorAnchorBottomHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorAnchorBottomHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorAnchorBottomLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorAnchorBottomLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorAnchorBottomRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorAnchorBottomRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorAnchorTopHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorAnchorTopHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorAnchorTopLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorAnchorTopLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorAnchorTopRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorAnchorTopRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorAnchorVCenterHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorAnchorVCenterHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorAnchorVCenterLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorAnchorVCenterLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorAnchorVCenterRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorAnchorVCenterRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot180AnchorBottomHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT180, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot180AnchorBottomHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot180AnchorBottomLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT180, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot180AnchorBottomLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.5 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot180AnchorBottomRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT180, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot180AnchorBottomRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot180AnchorTopHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT180, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot180AnchorTopHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot180AnchorTopLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT180, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot180AnchorTopLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.5 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot180AnchorTopRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT180, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot180AnchorTopRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot180AnchorVCenterHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT180, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot180AnchorVCenterHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot180AnchorVCenterLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT180, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot180AnchorVCenterLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.5 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot180AnchorVCenterRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT180, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot180AnchorVCenterRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot270AnchorBottomHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT270, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot270AnchorBottomHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot270AnchorBottomLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT270, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot270AnchorBottomLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot270AnchorBottomRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT270, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot270AnchorBottomRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot270AnchorTopHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT270, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot270AnchorTopHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot270AnchorTopLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT270, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot270AnchorTopLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot270AnchorTopRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT270, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot270AnchorTopRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot270AnchorVCenterHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT270, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot270AnchorVCenterHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot270AnchorVCenterLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT270, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot270AnchorVCenterLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot270AnchorVCenterRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT270, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot270AnchorVCenterRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot90AnchorBottomHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT90, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot90AnchorBottomHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot90AnchorBottomLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT90, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot90AnchorBottomLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot90AnchorBottomRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT90, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot90AnchorBottomRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot90AnchorTopHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT90, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot90AnchorTopHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot90AnchorTopLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT90, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot90AnchorTopLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot90AnchorTopRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT90, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot90AnchorTopRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot90AnchorVCenterHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT90, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot90AnchorVCenterHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot90AnchorVCenterLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT90, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot90AnchorVCenterLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransMirrorRot90AnchorVCenterRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_MIRROR_ROT90, getWidth() / 2, getHeight() / 2, Graphics.VCENTER | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransMirrorRot90AnchorVCenterRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransNoneAnchorBottomHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_NONE, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransNoneAnchorBottomHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransNoneAnchorBottomLeft extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_NONE, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransNoneAnchorBottomLeft() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.5 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransNoneAnchorBottomRight extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_NONE, getWidth() / 2, getHeight() / 2, Graphics.BOTTOM | Graphics.RIGHT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransNoneAnchorBottomRight() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,44 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
import javax.microedition.lcdui.game.Sprite;
|
||||
|
||||
public class DrawRegionTransNoneAnchorTopHCenter extends MIDlet {
|
||||
private Display display;
|
||||
|
||||
class TestCanvas extends Canvas {
|
||||
protected void paint(Graphics screenG) {
|
||||
Image image;
|
||||
try {
|
||||
image = Image.createImage("/gfx/images/colorRects.png");
|
||||
} catch (java.io.IOException e) {
|
||||
System.out.println("FAIL - " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
screenG.setColor(255, 255, 255);
|
||||
screenG.fillRect(0, 0, getWidth(), getHeight());
|
||||
|
||||
screenG.drawRegion(image, 10, 15, 70, 95, Sprite.TRANS_NONE, getWidth() / 2, getHeight() / 2, Graphics.TOP | Graphics.HCENTER);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawRegionTransNoneAnchorTopHCenter() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
test.setFullScreenMode(true);
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|