Daniel Mallett
Member
Below is a screen shot to demonstrate the problem.
https://drive.google.com/open?id=18vahtQ2gyKCYB84LxuFuHtAsWbH6YXJe
left_cut = (obj_grid.x_offset - mouse_x) / (obj_grid.x_scale * current_x_scale) - (original_width / 2) * -1; // Amount of pixels to trim from the left of shape
if left_cut < 0 then left_cut = 0; // Prevents invalid parts of texture page from being shown
right_cut = ((mouse_x - obj_grid.x_offset - obj_grid.x_max) / (obj_grid.x_scale * current_x_scale) - (original_width / 2) + original_width); // Amount of pixels to trim from the right of shape
if right_cut < 0 then right_cut = 0; // Prevents invalid parts of texture page from being shown
top_cut = (obj_grid.y_offset - mouse_y) / (obj_grid.y_scale * current_y_scale) - (original_height / 2) * -1; // Amount of pixels to trim from the top of shape
if top_cut < 0 then top_cut = 0; // Prevents invalid parts of texture page from being shown
bottom_cut = ((mouse_y - obj_grid.y_offset - obj_grid.y_max) / (obj_grid.y_scale * current_y_scale) - (original_width / 2) + original_width); // Amount of pixels to trim from the bottom of shape
if bottom_cut < 0 then bottom_cut = 0; // Prevents invalid parts of texture page from being shown
x = (mouse_x - current_width / 2) + left_cut * obj_grid.x_scale * current_x_scale; // Calculates X pos
y = (mouse_y - current_height / 2) + top_cut * obj_grid.y_scale * current_y_scale; // Calculates Y pos
I can't figure out why the left code draws parts of the texture page it should not be drawing. All of the other directions work. Have I made a simple mistake. If not can I manually edit the spacing on the texture page. I don't even know where the texture page is stored.
https://drive.google.com/open?id=18vahtQ2gyKCYB84LxuFuHtAsWbH6YXJe
left_cut = (obj_grid.x_offset - mouse_x) / (obj_grid.x_scale * current_x_scale) - (original_width / 2) * -1; // Amount of pixels to trim from the left of shape
if left_cut < 0 then left_cut = 0; // Prevents invalid parts of texture page from being shown
right_cut = ((mouse_x - obj_grid.x_offset - obj_grid.x_max) / (obj_grid.x_scale * current_x_scale) - (original_width / 2) + original_width); // Amount of pixels to trim from the right of shape
if right_cut < 0 then right_cut = 0; // Prevents invalid parts of texture page from being shown
top_cut = (obj_grid.y_offset - mouse_y) / (obj_grid.y_scale * current_y_scale) - (original_height / 2) * -1; // Amount of pixels to trim from the top of shape
if top_cut < 0 then top_cut = 0; // Prevents invalid parts of texture page from being shown
bottom_cut = ((mouse_y - obj_grid.y_offset - obj_grid.y_max) / (obj_grid.y_scale * current_y_scale) - (original_width / 2) + original_width); // Amount of pixels to trim from the bottom of shape
if bottom_cut < 0 then bottom_cut = 0; // Prevents invalid parts of texture page from being shown
x = (mouse_x - current_width / 2) + left_cut * obj_grid.x_scale * current_x_scale; // Calculates X pos
y = (mouse_y - current_height / 2) + top_cut * obj_grid.y_scale * current_y_scale; // Calculates Y pos
I can't figure out why the left code draws parts of the texture page it should not be drawing. All of the other directions work. Have I made a simple mistake. If not can I manually edit the spacing on the texture page. I don't even know where the texture page is stored.