生成圖片和文本特效的J2ME類庫 - J2ME ARMY KNIFE
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++;
}
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!