static public void DrawLine_DotRect(SpriteBatch spriteBatch, Vector2 vStart, Vector2 vEnd, Color color, int dotwitdh, int LineT, int padding) { if (m_LineTexture == null) { CreateLineTexture(spriteBatch.GraphicsDevice); } m_LIneColor = color; float angle = MathExt.AngleToDegrees(vStart, vEnd); float distance = Vector2.Distance(vStart, vEnd); Vector2 vTemp = vStart - MathExt.DistanceTo_range_angle(Vector2.Zero, padding, angle); for (int i = padding; i < distance; i += dotwitdh * 2) { vTemp += MathExt.DistanceTo_range_angle(Vector2.Zero, dotwitdh, angle) * 2; distanceY = LineT; Draw(spriteBatch, vTemp, MathExt.DistanceTo_range_angle(vTemp, dotwitdh, angle)); } }
static public void DrawLine_DotCircle(SpriteBatch spriteBatch, Vector2 vStart, Vector2 vEnd, Color color, int dotsize, int padding) { if (m_LineTexture == null) { CreateLineTexture(spriteBatch.GraphicsDevice); } float angle = MathExt.AngleToDegrees(vStart, vEnd); float distance = Vector2.Distance(vStart, vEnd); Vector2 vTemp = vStart - MathExt.DistanceTo_range_angle(Vector2.Zero, padding, angle); for (int i = padding; i < distance; i += dotsize * 2) { vTemp += MathExt.DistanceTo_range_angle(Vector2.Zero, dotsize, angle) * 2; DrawCircleAll(spriteBatch, vTemp, dotsize, color); } }