The ShapeDrawingOrder controls whether all Shapes are drawn under or over other FlatRedBall-drawn objects (for example Sprites, Models, and Texts). Currently shape drawing order cannot be controlled by the shape's Z value; however, as of the June 2009 release of FlatRedBall, most shapes can be placed on layers which provides some control over ordering.
The ShapeDrawingOrder has two options:
UnderEverything
OverEverything (default)
Since the default for the ShapeManager's ShapeDrawingOrder is OverEverything, then all shape drawing will appear on top of other objects.
The following example adds a Sprite and a Line, then sets ShapeDrawingOrder to UnderEverything so that the added Line appears under the Sprite.
Add the following using statements:
Add the following to Initialize after initializing FlatRedBall: