Ejemplo n.º 1
0
    public static RectangleModel StartNewRectangle(Vec <Coordinate> focusPosition,
                                                   GeometryStyleAsset.GeometryColor color)
    {
        var nextRectangle = new RectangleModel {
            P0 = focusPosition, Color = color
        };

        focusPosition.ForEach(c => c.AddAttachedGeometry(nextRectangle));
        return(nextRectangle);
    }
Ejemplo n.º 2
0
    public static LineModel StartNewLine(
        Vec <Coordinate> focusPosition)
    {
        var nextLine = new LineModel {
            P0 = focusPosition
        };

        focusPosition.ForEach(c => c.AddAttachedGeometry(nextLine));
        return(nextLine);
    }
Ejemplo n.º 3
0
    public static PointModel NewPoint(
        Vec <Coordinate> focusPosition)
    {
        var nextPoint = new PointModel {
            P0 = focusPosition, IsBaked = true
        };

        focusPosition.ForEach(c => c.AddAttachedGeometry(nextPoint));
        return(nextPoint);
    }
Ejemplo n.º 4
0
    public static Vec <Coordinate> UpdateCursorPosition(Vec <Coordinate> oldFocusPosition,
                                                        CoordinateSystem cs, KeyboardInput.Model keyboardInput)
    {
        oldFocusPosition?.ForEach(c =>
        {
            if (c.IsCurrentlyDrawn)
            {
                c.Delete();
            }
        });

        return(GetOrCreatePositionAtMousePosition(cs, cs.Anchor, true, keyboardInput));
    }
Ejemplo n.º 5
0
 public static void BakePosition(Vec <Coordinate> modelFocusPosition)
 {
     modelFocusPosition.ForEach(c => c.Bake());
 }