xelf.scroll.lua for mdiapp1.00f
用法
最下層に32bpp元画像を置き、その1つ上のレイヤーに空きの32bppを用意して実行します。
機能
最下層が約半分縦と横にスクロールした画像がその1つ上のレイヤーに作成されます。
コメント
今後の改良でシームレステクスチャの継ぎ目確認になればよいのですけども。
-- スクロール for mdiapp 1.00f -- xelf.scroll.lua (C)2006-09-10 XELF mdi_undo_all() local layer = mdi_layer_active() local sourceImage = mdi_img_layer(0) local image = mdi_img_layer(1) local w, h = mdi_width(), mdi_height() local w2, h2 = math.floor(mdi_width()*0.5), math.floor(mdi_height()*0.5) local w3, h3 = w - w2, h - h2 mdi_img32_resize(image, w, h) mdi_img32_copy(image, sourceImage) mdi_img32_blt(image, 0, 0, sourceImage, w2, h2, w3, h3) mdi_img32_blt(image, w3, 0, sourceImage, 0, h2, w2, h3) mdi_img32_blt(image, 0, h3, sourceImage, w2, 0, w3, h2) mdi_img32_blt(image, w3, h3, sourceImage, 0, 0, w2, h2)