/*  GadTools layout toolkit
**
**  Copyright © 1993-1994 by Olaf `Olsen' Barthel
**  Freely distributable.
*/

#include "gtlayout_global.h"

#ifdef DO_TAPEDECK_KIND
VOID __regargs
LTP_RenderArrow(struct RastPort *RPort,BOOLEAN LeftDirection,LONG Left,LONG Top,LONG Width,LONG Height)
{
	LONG i,Len,Start;

	if(LeftDirection)
	{
		for(i = 0 ; i < Width ; i++)
		{
			Len	= ((Height * (i + 1)) / Width) & ~1;

			if(Len < Height)
				Len++;

			Start	= Top + (Height - Len) / 2;

			Move(RPort,Left + i,Start);
			Draw(RPort,Left + i,Start + Len - 1);
		}
	}
	else
	{
		for(i = 0 ; i < Width ; i++)
		{
			Len	= ((Height * (i + 1)) / Width) & ~1;

			if(Len < Height)
				Len++;

			Start	= Top + (Height - Len) / 2;

			Move(RPort,Left + Width - 1 - i,Start);
			Draw(RPort,Left + Width - 1 - i,Start + Len - 1);
		}
	}
}
#endif	/* DO_TAPEDECK_KIND */
