Nathan Laing
Member
Greetings all,
I'm having trouble with 1 pixel transparent seams appearing when drawing sprites next to one another, flipped.
I've been trying as much as possible to use powers of two for image sizes, but it doesn't seem to make much difference.
If I draw them without any rotational displacement there is no issue. However, when rotating them with the code below, the result (depending on the image, and angle) is a 1 pixel transparent 'seam'.
Would someone have some advice please?
I'm having trouble with 1 pixel transparent seams appearing when drawing sprites next to one another, flipped.
Code:
draw_sprite_ext(test_sprite, 0, x, y, 1, 1, image_angle, c_white, 1);
draw_sprite_ext(test_sprite, 0, x, y, 1, -1, image_angle, c_white, 1); // flipped
If I draw them without any rotational displacement there is no issue. However, when rotating them with the code below, the result (depending on the image, and angle) is a 1 pixel transparent 'seam'.
Would someone have some advice please?
Code:
var X1 = x;
var Y1 = y;
var X2 = x + some_offset;
var Y2 = y + some_offset;
var tdist = point_distance (X1, Y1, X2, Y2);
var tdir = point_direction(X1, Y1, X2, Y2) + image_angle;
new_x = X1 + lengthdir_x(tdist, tdir);
new_y = Y1 + lengthdir_y(tdist, tdir);