Exemplo n.º 1
0
        public void RoundedRectangle(Rectangle rectangle, Size cornerRadius)
        {
            endOpenFigure();

            using (var geometry = new RoundedRectangleGeometry(_factory,
                new RoundedRectangle
                {
                    RadiusX = cornerRadius.Width.import(),
                    RadiusY = cornerRadius.Height.import(),
                    Rect = Import.Rectangle(rectangle)
                }))
            {
                geometry.Simplify(SimplificationOption, _sink);
            }
        }
Exemplo n.º 2
0
 public TextSize(double width, double height)
 {
     Size = new Size(width, height);
 }
Exemplo n.º 3
0
        public void RoundedRectangle(Rectangle rectangle, Size cornerRadius)
        {
            if (Filling)
            {
                // adjust corner radius if we do stroke afterwards.

                var filledCornerRadiusX = Stroking
                    ? Math.Max(0, cornerRadius.Width - _state.StrokeWeight/2)
                    : cornerRadius.Width;

                var filledCornerRadiusY = Stroking
                    ? Math.Max(0, cornerRadius.Height - _state.StrokeWeight / 2)
                    : cornerRadius.Height;

                var roundedRect = new RoundedRectangle
                {
                    Rect = fillRect(rectangle),
                    RadiusX = filledCornerRadiusX.import(),
                    RadiusY = filledCornerRadiusY.import()
                };

                _target.FillRoundedRectangle(roundedRect, _fillBrush.Brush);
            }

            if (Stroking)
            {
                var roundedRect = new RoundedRectangle
                {
                    Rect = strokeAlignedRect(rectangle),
                    RadiusX = cornerRadius.Width.import(),
                    RadiusY = cornerRadius.Height.import()
                };

                _target.DrawRoundedRectangle(roundedRect, _strokeBrush.Brush, StrokeWeight);
            }
        }
Exemplo n.º 4
0
 public void RoundedRectangle(Rectangle rectangle, Size cornerRadius)
 {
     _figures.RoundedRectangle(rectangle, cornerRadius);
 }
 public void RoundedRectangle(Rectangle rectangle, Size cornerRadius)
 {
     _target.RoundedRectangle(pixelAlign(rectangle), cornerRadius);
 }
 public void RoundedRectangle(Rectangle rectangle, Size cornerRadius)
 {
     _tracker.trackAlignedRect(rectangle);
 }
Exemplo n.º 7
0
 public void RoundedRectangle(Rectangle rectangle, Size cornerRadius)
 {
     record(t => t.RoundedRectangle(rectangle, cornerRadius));
 }