040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Copyright © 2004 Keith Packard
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Permission to use, copy, modify, distribute, and sell this software and its
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * documentation for any purpose is hereby granted without fee, provided that
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * the above copyright notice appear in all copies and that both that
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * copyright notice and this permission notice appear in supporting
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * documentation, and that the name of Keith Packard not be used in
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * advertising or publicity pertaining to distribution of the software without
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * specific, written prior permission. Keith Packard makes no
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * representations about the suitability of this software for any purpose. It
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * is provided "as is" without express or implied warranty.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * PERFORMANCE OF THIS SOFTWARE.
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define N_Y_FRAC(n) ((n) == 1 ? 1 : (1 << ((n)/2)) - 1)
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define STEP_Y_BIG(n) (xFixed1 - (N_Y_FRAC(n) - 1) * STEP_Y_SMALL(n))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define Y_FRAC_LAST(n) (Y_FRAC_FIRST(n) + (N_Y_FRAC(n) - 1) * STEP_Y_SMALL(n))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define STEP_X_BIG(n) (xFixed1 - (N_X_FRAC(n) - 1) * STEP_X_SMALL(n))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define X_FRAC_LAST(n) (X_FRAC_FIRST(n) + (N_X_FRAC(n) - 1) * STEP_X_SMALL(n))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#define RenderSamplesX(x,n) ((n) == 1 ? 0 : (xFixedFrac (x) + X_FRAC_FIRST(n)) / STEP_X_SMALL(n))
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * An edge structure. This represents a single polygon edge
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * and can be quickly stepped across small or large gaps in the
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * sample grid
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Step across a small sample grid gap
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync if (edge->e > 0) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync * Step across a large sample grid gap
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync if (edge->e > 0) \
040abec2534dadc53ebc8fa378ef03f4feecb7dbvboxsync#endif /* _RENDEREDGE_H_ */