![]() |
Images along a line
3 Attachment(s)
I wanted to ask, how you could show images along a line. Letīs say my line starts from:
x: 2 y: 3 and ends at: x: 50 y: 36 I know how I could use it with a poly. PHP Code:
Attachment 54164 but how could I have, lets say a 16x16 pixel image, shown over and over on that line without stretching it? Examples below (done in Paint.NET) Attachment 54162 Attachment 54163 I thought I had seen such a script around but couldnīt find it anymore. Can anyone of you help me? |
You have to show the image multiple times with a loop.
|
Something like this should work...
Calculate the distance between the two positions and that will give you roughly how many images you need to draw if each image is one title in width and height (16x16). Calculate the delta x, y (final - initial) For image = 1; image <= images; image++ Show image at x + (delta x * (image / images)), y + (delta y * (image / images)) |
Quote:
PHP Code:
|
Quote:
|
Thanks guys for helping. I think I understood it now
Quote:
|
| All times are GMT +2. The time now is 03:07 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.