目次
前
次
左右反転
左右反転は、元画像からピクセルデータを取得し
表示位置を変えるだけで実現できます。
ピクセルデータが、位置(xs,ys)にあるとき、左右反転
すると1ラインの幅をxlastとすると
xd=xlast-1-xs
にします。
ソースコードは、以下となります。
(左右の画像の間に、縦に白線が入ります。)
--------------------------------------------------
title "reverse"
; set screen dimensions
screen 0,80*2+1,60
; constants
ylast = 60
xlast = 80
; get image
picload "tsignalr.bmp",1
gosub *reverse_image
stop
*reverse_image
for j,0,ylast,1
for i,0,xlast,1
; get informations of current position
pget i,j
; calculate location
x = xlast - 1 - i
y = j
; show
pset x+xlast+1,y
next
next
return
end
--------------------------------------------------
目次
前
次