Floating is the complement of cropping: to float an image, you copy the entire old one into a new larger image. Floating is useful when you want to rotate an image without losing its corners; the added lines and columns provide a place for the corners to go. The procedure below requires lox and hix, the number of columns that you want to add to the left and right side, and 1 oy and h iy, the number of lines that you want to add to the top and bottom.
PROCEDURE FLOAT (lox, hix, loy, hiy) xmax = lox + oldxmax + hix ymax = loy + oldymax + hiy REDIMENSION new (0 TO xmax, 0 TO ymax) FOR y = 0 to ymax FOR x = 0 TO xmax if x >= lox AND x < oldxmax - loy AND_
y >= loy AND y < oldymax - loy then new(x, y) = old(x - lox, y - loy) ELSE
NEXT y
Was this article helpful?
Through this ebook, you are going to learn what you will need to know all about the telescopes that can provide a fun and rewarding hobby for you and your family!
Post a comment