Poll: Do you _MapTriangle?
You do not have permission to vote in this poll.
I only use _MapTriangle because it is in the RotoZoom method.
25.00%
2 25.00%
I primarily use the 2D version (for applications other than RotoZoom).
37.50%
3 37.50%
I primarily use the 3D version for making true 3D programs and games. (Mastergy, should select this answer).
0%
0 0%
I don't use this method but I like to answer surveys.
37.50%
3 37.50%
Total 8 vote(s) 100%
* You voted for this item. [Show Results]

Do you _MAPTRIANGLE?
#11
If you have a 100x100 image, you can treat it like a 1000x100 image and draw it 10 times with one command... or two commands since you need two triangles. I checked the wiki to see if the feature was described, and I think a comment about achieving a  "tiling effect" was the only reference to it.

I mainly use it for scrolling backgrounds, but here's an example of how it works:

Code: (Select All)
scr = _NewImage(1000, 600, 32)

Screen scr


'DRAW SINGLE SMALL TILE

'---------------------

img = _NewImage(40, 100, 32)

_Dest img

Line (0, 0)-(20, 50), _RGB32(128, 0, 0), BF
Line (21, 0)-(40, 50), _RGB32(255, 0, 0), BF
Line (21, 51)-(40, 100), _RGB32(128, 0, 0), BF
Line (0, 51)-(20, 100), _RGB32(255, 0, 0), BF

'----------------------


'FILL ENTIRE SCREEN WITH MAPTRIANGLE

_MapTriangle (0, 0)-(1000, 0)-(0, 600), img To(0, 0)-(1000, 0)-(0, 600), scr
_MapTriangle (0, 600)-(1000, 600)-(1000, 0), img To(0, 600)-(1000, 600)-(1000, 0), scr
Reply


Messages In This Thread
Do you _MAPTRIANGLE? - by dbox - 03-20-2023, 10:30 PM
RE: Do you _MAPTRIANGLE? - by bplus - 03-20-2023, 11:30 PM
RE: Do you _MAPTRIANGLE? - by dbox - 03-21-2023, 12:46 AM
RE: Do you _MAPTRIANGLE? - by James D Jarvis - 03-21-2023, 01:29 PM
RE: Do you _MAPTRIANGLE? - by dbox - 03-21-2023, 06:32 PM
RE: Do you _MAPTRIANGLE? - by dbox - 03-21-2023, 04:45 PM
RE: Do you _MAPTRIANGLE? - by James D Jarvis - 03-22-2023, 06:10 PM
RE: Do you _MAPTRIANGLE? - by Gets - 03-23-2023, 06:34 PM
RE: Do you _MAPTRIANGLE? - by dbox - 03-24-2023, 12:44 PM
RE: Do you _MAPTRIANGLE? - by mnrvovrfc - 03-24-2023, 04:27 AM
RE: Do you _MAPTRIANGLE? - by Gets - 03-25-2023, 05:56 PM
RE: Do you _MAPTRIANGLE? - by Petr - 03-25-2023, 06:30 PM
RE: Do you _MAPTRIANGLE? - by Petr - 03-25-2023, 06:44 PM
RE: Do you _MAPTRIANGLE? - by dbox - 03-25-2023, 06:55 PM
RE: Do you _MAPTRIANGLE? - by bplus - 03-25-2023, 07:57 PM
RE: Do you _MAPTRIANGLE? - by dbox - 03-27-2023, 01:56 PM
RE: Do you _MAPTRIANGLE? - by Petr - 03-27-2023, 04:45 PM



Users browsing this thread: 1 Guest(s)