Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
GameSource/FixGraf.c
#include "FixGraf.h" |
void FixRectToRect(fixRect *fr, Rect *r) |
{ |
r->top = FixToInt(fr->top); |
r->left = FixToInt(fr->left); |
r->bottom = FixToInt(fr->bottom); |
r->right = FixToInt(fr->right); |
} |
void RectToFixRect( Rect *r, fixRect *fr) |
{ |
fr->top = ff(r->top); |
fr->left = ff(r->left); |
fr->bottom = ff(r->bottom); |
fr->right = ff(r->right); |
} |
void PointToFixPoint( Point *p, fixPt *fp) |
{ |
fp->h = ff(p->h); |
fp->v = ff(p->v); |
} |
void FixPointToPoint( fixPt *fp, Point *p) |
{ |
p->h = FixToInt(fp->h); |
p->v = FixToInt(fp->v); |
} |
void OffsetFixRect(fixRect *fr, fixPt *fp) |
{ |
fr->top += fp->v; |
fr->left += fp->h; |
fr->bottom += fp->v; |
fr->right += fp->h; |
} |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14