Game Development Reference
In-Depth Information
1.5.1.1Top
result.Top() = m_to.Top();
AligningtotopisastraightforwardcaseinwhichweassigntheTopcoordinatetothemov-
ing rectangle.
1.5.1.2Bottom
result.Top() = m_to.Bottom() - m_from.Height();
To align to the bottom of a rectangle, we set the top of our floating rectangle to the bottom
of the fixed rectangle minus the height of the floating rectangle.
Search WWH ::




Custom Search