生成圖片和文本特效的J2ME類庫 - J2ME ARMY KNIFE

jopen 12年前發布 | 19K 次閱讀 J2ME Java開發

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++;

}

項目主頁:http://www.baiduhome.net/lib/view/home/1341194697684

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!