public void DrawAsDir(float scale = 1f) { var circleShape = new CircleShapeHandle(); circleShape.Radius = 7 * scale; circleShape.FillColor = Color.Transparent; circleShape.OutlineThickness = 1 * scale; circleShape.OutlineColor = Color.Magenta; circleShape.Position = _transform.TransformPoint(0, 0); EnvironmentAPI.Draw.Circle(circleShape); var rectShape = new RectShapeHandle(); rectShape.Size = new Vector2f(2f * scale, 15 * scale); rectShape.Position = _transform.TransformPoint(0f, 0); rectShape.Rotation = GlobalRot; rectShape.FillColor = Color.Transparent; rectShape.OutlineThickness = 1 * scale; rectShape.OutlineColor = Color.Magenta; EnvironmentAPI.Draw.Rect(rectShape); rectShape.Size = new Vector2f(2f * scale, 12 * scale); rectShape.Position = _transform.TransformPoint(0f, 0f); rectShape.Rotation = GlobalRot - 90; rectShape.FillColor = Color.Transparent; rectShape.OutlineThickness = 1 * scale; rectShape.OutlineColor = Color.Magenta; EnvironmentAPI.Draw.Rect(rectShape); }
public void Circle(CircleShapeHandle handle) { if (_circleShape == null) { _circleShape = new CircleShape(); } _circleShape.Radius = handle.Radius; _circleShape.FillColor = handle.FillColor; _circleShape.OutlineThickness = handle.OutlineThickness; _circleShape.OutlineColor = handle.OutlineColor; _circleShape.Position = handle.Position; _circleShape.Draw(_win, RenderStates.Default); }
public void DrawShapeAt(CircleShapeHandle shape, Vec2 pivot) { shape.Position = _transform.TransformPoint(Vec2.New(0, 0)); EnvironmentAPI.Draw.Circle(shape); }