예제 #1
0
        private IntNode PenDrawTo(List <IntNode> input)
        {
            var new_pos = new Vector2(input[0].Value, input[1].Value);

            var line = _factory.Create(GraphicsType.Line) as Line;

            line.Colour = _fillColour;

            line.Position1 = _pen_position;
            line.Position2 = new_pos;

            line.DrawOnCanvas(GraphicsCanvas);

            _pen_position = new_pos;

            return(null);
        }
예제 #2
0
        public void OnDrop(DropInfo dropInfo)
        {
            Point position = dropInfo.DropPosition;

            GraphicsVM gvm = dropInfo.Data as GraphicsVM;

            GraphicsBase graphics = GraphicsFactory.Create(position, gvm.Type);

            DrawableLayer.DrawVisual(graphics);
        }