Solution Tactilis Posted Friday at 05:52 PM Solution Share Posted Friday at 05:52 PM 23 minutes ago, RickGotTaken said: I assumed it would be the same as including the left and right of the canvas How could it be the same? 23 minutes ago, RickGotTaken said: Am I just supposed to measure the amount of pixels from the leftmost object to the rightmost object? You need to take account of the canvas width. X_max - X_min now becomes the width of your canvas. The total number of gaps is the number of gaps between the N objects plus one at each end. So that's N + 1 So the calculation is now simply: N = number of objects Spacing = ( width_of_canvas - (width_of_object_1 + width_of_object_2 + ... width_of_object_N) ) / (N + 1) Space out your objects thus: |---gap---object_1---gap---object_2---gap--- ... object_N---gap---| The vertical lines represent the edges of your canvas. Quote Link to comment Share on other sites More sharing options...
RickGotTaken Posted Friday at 08:43 PM Author Share Posted Friday at 08:43 PM 2 hours ago, Tactilis said: How could it be the same? You need to take account of the canvas width. X_max - X_min now becomes the width of your canvas. The total number of gaps is the number of gaps between the N objects plus one at each end. So that's N + 1 So the calculation is now simply: N = number of objects Spacing = ( width_of_canvas - (width_of_object_1 + width_of_object_2 + ... width_of_object_N) ) / (N + 1) Space out your objects thus: |---gap---object_1---gap---object_2---gap--- ... object_N---gap---| The vertical lines represent the edges of your canvas. Thanks for all your help! I've marked this as the solution. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.