コード例 #1
0
        private void FillRound(Vector2Int32 point)
        {
            IEnumerable <Vector2Int32> area = Fill.FillEllipseCentered(point, new Vector2Int32(_wvm.Brush.Width / 2, _wvm.Brush.Height / 2));

            if (_wvm.Brush.IsOutline)
            {
                IEnumerable <Vector2Int32> interrior = Fill.FillEllipseCentered(point, new Vector2Int32(
                                                                                    _wvm.Brush.Width / 2 - _wvm.Brush.Outline * 2,
                                                                                    _wvm.Brush.Height / 2 - _wvm.Brush.Outline * 2));
                FillHollow(area, interrior);
            }
            else
            {
                FillSolid(area);
            }
        }
コード例 #2
0
        protected void FillRound(Vector2Int32 point)
        {
            var area = Fill.FillEllipseCentered(point, new Vector2Int32(_wvm.Brush.Width / 2, _wvm.Brush.Height / 2)).ToList();

            if (_wvm.Brush.IsOutline)
            {
                var interrior = Fill.FillEllipseCentered(point, new Vector2Int32(
                                                             _wvm.Brush.Width / 2 - _wvm.Brush.Outline * 2,
                                                             _wvm.Brush.Height / 2 - _wvm.Brush.Outline * 2)).ToList();
                FillHollow(area, interrior);
            }
            else
            {
                FillSolid(area);
            }
        }
コード例 #3
0
        private void DrawLineP2P(Vector2Int32 endPoint)
        {
            IEnumerable <Vector2Int32> area;

            foreach (Vector2Int32 point in Shape.DrawLineTool(_startPoint, _endPoint))
            {
                if (_wvm.Brush.Shape == BrushShape.Round)
                {
                    area = Fill.FillEllipseCentered(point, new Vector2Int32(_wvm.Brush.Width / 2, _wvm.Brush.Height / 2));
                    FillSolid(area);
                }
                else if (_wvm.Brush.Shape == BrushShape.Square)
                {
                    area = Fill.FillRectangleCentered(point, new Vector2Int32(_wvm.Brush.Width, _wvm.Brush.Height));
                    FillSolid(area);
                }
            }
        }