Forum Archive

Bug in image_quad

Hvmhvm227

There seems to be a bug in image_quad regarding the 'from parameters'. I'm using this to draw part of an image as a poor mans substitute for a clipping function. Anyway, I found that when drawing an image using

image_quad(name, 0, 0, w, 0, 0, h, w, h, 0, 0, w, 0, 0, h, w, h)

a small portion of the image is not drawn at the top and at the right side, causing the image to be slightly zoomed. To compensate I needed to add a delta value (that seems to depend on the image size) to from_x2, from_y3, from_x4 and from_y4. (In my case the same delta for all 4 because I'm drawing squares)

Hvmhvm227

Got it. Forgot that I wasn't drawing the images full size :-(