生成图片和文本特效的J2ME类库 - J2ME ARMY KNIFE
jopen
12年前
J2ME ARMY KNIFE是目前唯一一个能够快速生成图片和文本特效的J2ME类库。易于使用,只需要几行代码就能够生成你所需要的图片。
// Declare variables int step = 0; Image result = null; ImageTransformationOverlayMask overlay; // Initialize the mask overlay effect overlay = new ImageTransformationOverlayMask(); // Set the image to use as a mask overlay.setMaskImage(maskImage); while (true) { // Set offsets (to create the scroll effect) overlay.setVerticalOffset(step); overlay.setHorizontalOffset(step); // Process the source image result = overlay.process(sourceImage); // Draw the result on screen g.drawImage ( result, 0, 0, Graphics.TOP | Graphics.LEFT ); // Increment the step step++; }