[Main]
Name=MakeScrRect
Type=Function
Subtype=ROM Call
Header Files=graph.h
Definition=SCR_RECT *MakeScrRect (short x0, short y0, short x1, short y1, SCR_RECT *s);
MinAMS=2.00
See Also=wingraph.h/SetWinClip, wingraph.h/MakeWinRect

[ROM Call]
Index=$42D

[Description]
Puts four coordinates into a <A HREF="$$LINK(graph.h/SCR_RECT)">SCR_RECT</A> and returns a pointer to it.

[Explanation]
MakeScrRect is used to create a <A HREF="$$LINK(graph.h/SCR_RECT)">SCR_RECT</A> from four screen coordinates.
<BR><BR>
For example, it can be used to convert a <A HREF="$$LINK(wingraph.h/WIN_RECT)">WIN_RECT</A> to a <A HREF="$$LINK(graph.h/SCR_RECT)">SCR_RECT</A> like this
(<I>s</I> is a <A HREF="$$LINK(graph.h/SCR_RECT)">SCR_RECT</A>, and <I>rect</I> is a <A HREF="$$LINK(wingraph.h/WIN_RECT)">WIN_RECT</A>):
<PRE>MakeScrRect (rect.x0, rect.y0, rect.x1, rect.y1, &s);
</PRE>
In GNU C (like TIGCC is), it is generally faster to use this cast constructors instead of calling MakeScrRect:
<PRE>s = (SCR_RECT){{x0, y0, x1, y1}};
</PRE>
