コード例 #1
0
        private void DrawVerticalGuide(DrawingContext dc, BasicStyleCache cache, GuidePoint point, double height)
        {
            var point0 = new GuidePoint(point.X, 0);
            var point1 = new GuidePoint(point.X, height);

            DrawGuideLine(dc, cache, point0, point1);
        }
コード例 #2
0
        private void DrawHorizontalGuide(DrawingContext dc, BasicStyleCache cache, GuidePoint point, double width)
        {
            var point0 = new GuidePoint(0, point.Y);
            var point1 = new GuidePoint(width, point.Y);

            DrawGuideLine(dc, cache, point0, point1);
        }
コード例 #3
0
        private BasicStyleCache FromCache(BasicStyle style)
        {
            BasicStyleCache value;

            if (_cache.TryGetValue(style, out value))
            {
                return(value);
            }
            value = new BasicStyleCache(style);
            _cache.Add(style, value);
            return(value);
        }
コード例 #4
0
 private void DrawGuideLine(DrawingContext dc, BasicStyleCache cache, GuidePoint point0, GuidePoint point1)
 {
     dc.DrawLine(cache.StrokePen, new Point(point0.X, point0.Y), new Point(point1.X, point1.Y));
 }
コード例 #5
0
 private void DrawGuidePoint(DrawingContext dc, BasicStyleCache cache, GuidePoint point, double radius)
 {
     FillEllipse(dc, cache.FillBrush, point, radius, radius);
 }