private void followAxis(Device device, float x0, float y0, float x1, float y1, int color, int stipplePattern)
{
Line line = GraphicViewManager.Instance.ResourceManager.SnapLines[1];
line.Pattern = stipplePattern;
float w = line.Width;
line.Width = 2.0f;
Cull cull = device.RenderState.CullMode;
bool alphaEnable = device.RenderState.AlphaBlendEnable;
device.RenderState.CullMode = Cull.None;
device.RenderState.AlphaBlendEnable = true;
device.RenderState.SourceBlend = Blend.BothSourceAlpha;
device.RenderState.DestinationBlend = Blend.DestinationColor;
line.Begin();
line.Draw(new Vector2[] { new Vector2(x0, y0), new Vector2(x1, y1) }, color);
line.End();
device.RenderState.AlphaBlendEnable = alphaEnable;
device.RenderState.CullMode = cull;
line.Width = w;
}