Ejemplo n.º 1
0
    protected override void DrawLine(Rect from, Rect to, Color lineColor, float width)
    {
        Vector2 pointStart = from.max - new Vector2(0, from.height * 0.5f);
        Vector2 pointEnd   = to.min + new Vector2(0, to.height * 0.5f);

        Vector2 center = new Vector2(pointStart.x, pointEnd.y);

        GraphRenderHelper.DrawLine(lineColor, width, pointStart, center, pointEnd);
    }
Ejemplo n.º 2
0
    protected override void DrawLine(Rect from, Rect to, Color lineColor, float width)
    {
        Vector2 pointStart = from.max - new Vector2(0, from.height * 0.5f);
        Vector2 pointEnd   = to.min + new Vector2(0, to.height * 0.5f);

        Vector2 point1 = pointStart + new Vector2(10, 0);
        Vector2 point2 = new Vector2(point1.x, pointEnd.y);

        GraphRenderHelper.DrawLine(lineColor, width, pointStart, point1, point2, pointEnd);
        GraphRenderHelper.DrawArrow(lineColor, 1, point2 - pointEnd, pointEnd);
    }