コード例 #1
0
        public virtual void Write(Shape aShape, Point aPosition, int aChannel)
        {
            // write paths or mid-cricle

            var circle = new SvgCircle();

            var radius = aShape.Radius - aShape.Width / 2;

            circle.Fill = SvgPaintServer.None;
            circle.CenterX = new SvgUnit(SvgUnitType.Millimeter, aPosition.X);
            circle.Radius = new SvgUnit(SvgUnitType.Millimeter, radius);

            if (aChannel == 0)
            {
                circle.CenterY = new SvgUnit(SvgUnitType.Millimeter, aPosition.Y - aShape.Radius - 1);
            }
            else
            {
                circle.CenterY = new SvgUnit(SvgUnitType.Millimeter, aPosition.Y + aShape.Radius + 1);
            }

            circle.Stroke = new SvgColourServer(System.Drawing.Color.Black);
            circle.StrokeWidth = new SvgUnit(SvgUnitType.Millimeter, aShape.Width);

            iGroup.Children.Add(circle);
        }
コード例 #2
0
        public override void Write(Shape aShape, Point aPosition, int aChannel)
        {
            if (aShape.Width == iWidth && aShape.Depth == iDepth)
            {
                // write paths for the outer circle

                var circle = new SvgCircle();

                circle.Fill = SvgPaintServer.None;
                circle.CenterX = new SvgUnit(SvgUnitType.Millimeter, aPosition.X);
                circle.Radius = new SvgUnit(SvgUnitType.Millimeter, aShape.Radius);

                if (aChannel == 0)
                {
                    circle.CenterY = new SvgUnit(SvgUnitType.Millimeter, aPosition.Y - aShape.Radius - 1);
                }
                else
                {
                    circle.CenterY = new SvgUnit(SvgUnitType.Millimeter, aPosition.Y + aShape.Radius + 1);
                }

                iGroup.Children.Add(circle);
            }
        }