예제 #1
0
파일: DrawStyle.cs 프로젝트: QAsQ/VIDA
        public object Clone()
        {
            DrawStyle ret = new DrawStyle();

            ret.initFromColor(Font, SkillFill, SkillEdge, ArrowLine, ArrowEdge, ArrowFill);
            return(ret);
        }
예제 #2
0
        private void drawSkill(PointF _center, Skill curr_skill, DrawStyle curr_style)
        {
            Point     center = Point.Round(_center);
            int       r = size_circle;
            int       stx = center.X - r, sty = center.Y - r;
            int       d    = r * 2;
            Rectangle rect = new Rectangle(stx, sty, d, d);

            if (curr_style.SkillEdge.IsEmpty == false)
            {
                Pen edgePen;
                edgePen       = new Pen(curr_style.SkillEdge);
                edgePen.Width = lineW;
                buffer.DrawEllipse(edgePen, rect);
            }
            if (curr_style.SkillFill.IsEmpty == false)
            {
                Brush fillBush = new SolidBrush(curr_style.SkillFill);
                buffer.FillEllipse(fillBush, rect);
            }
            Brush fontbush;

            fontbush = new SolidBrush(curr_style.Font);

            Point fontSize        = (Point)getNameSize(curr_skill.name);
            Point DrawStringPoint = center;

            Geom.scale(ref fontSize, 1, 2);
            DrawStringPoint -= (Size)fontSize;
            buffer.DrawString(curr_skill.name, font_name, fontbush, DrawStringPoint);
        }
예제 #3
0
파일: DependencyView.cs 프로젝트: QAsQ/VIDA
        private void drawSkill(PointF _center, Skill curr_skill, DrawStyle curr_style)
        {
            Point center = Point.Round(_center);
            int r = size_circle;
            int stx = center.X - r, sty = center.Y - r;
            int d = r * 2;
            Rectangle rect = new Rectangle(stx, sty, d, d);
            if (curr_style.SkillEdge.IsEmpty == false)
            {
                Pen edgePen;
                edgePen = new Pen(curr_style.SkillEdge);
                edgePen.Width = lineW;
                buffer.DrawEllipse(edgePen, rect);
            }
            if (curr_style.SkillFill.IsEmpty == false)
            {
                Brush fillBush = new SolidBrush(curr_style.SkillFill);
                buffer.FillEllipse(fillBush, rect);
            }
            Brush fontbush;
            fontbush = new SolidBrush(curr_style.Font);

            Point fontSize = (Point)getNameSize(curr_skill.name);
            Point DrawStringPoint = center;
            Geom.scale(ref fontSize, 1, 2);
            DrawStringPoint -= (Size)fontSize;
            buffer.DrawString(curr_skill.name, font_name, fontbush, DrawStringPoint);
        }
예제 #4
0
파일: ColorScheme.cs 프로젝트: QAsQ/VIDA
 public void initInString(string[] lists)
 {
     bg = ColorTranslator.FromHtml(lists[0]);
     int DSlength = DrawStyle.length;
     for (int i = 0; i < 3; i++)
     {
         ds[i] = new DrawStyle(lists[i * DSlength + 1]
                             , lists[i * DSlength + 2]
                             , lists[i * DSlength + 3]
                             , lists[i * DSlength + 4]
                             , lists[i * DSlength + 5]
                             , lists[i * DSlength + 6]);
     }
 }
예제 #5
0
 private void DrawArrow(Point[] PointList, DrawStyle currStyle)
 {
     if (currStyle.ArrowFill.IsEmpty == false)
     {
         Brush fillBush = new SolidBrush(currStyle.ArrowFill);
         buffer.FillPolygon(fillBush, PointList);
     }
     if (currStyle.ArrowEdge.IsEmpty == false)
     {
         Pen edgePen = new Pen(currStyle.ArrowEdge);
         edgePen.Width = lineW;
         buffer.DrawPolygon(edgePen, PointList);
     }
 }
예제 #6
0
파일: ColorScheme.cs 프로젝트: QAsQ/VIDA
        public void initInString(string[] lists)
        {
            bg = ColorTranslator.FromHtml(lists[0]);
            int DSlength = DrawStyle.length;

            for (int i = 0; i < 3; i++)
            {
                ds[i] = new DrawStyle(lists[i * DSlength + 1]
                                      , lists[i * DSlength + 2]
                                      , lists[i * DSlength + 3]
                                      , lists[i * DSlength + 4]
                                      , lists[i * DSlength + 5]
                                      , lists[i * DSlength + 6]);
            }
        }
예제 #7
0
        private void DrawArrow(PointF _st, PointF _ed, DrawStyle start)
        {
            Point st     = Point.Round(_st);
            Point ed     = Point.Round(_ed);
            int   length = Geom.Distance(st, ed);

            if (length <= size_circle * 2)
            {
                return;
            }
            Point[] pointList = Geom.getArrowHead(st, ed, size_circle);
            Geom.scaleLine(ref st, ref ed, size_circle);
            if (start.ArrowLine.IsEmpty == false)
            {
                Pen edPen = new Pen(start.ArrowLine);
                edPen.Width = lineW;
                buffer.DrawLine(edPen, st, pointList[0]);
            }
            DrawArrow(pointList, start);
        }
예제 #8
0
파일: ColorScheme.cs 프로젝트: QAsQ/VIDA
 public void loadByIndex(int index, DrawStyle inp)
 {
     ds[index] = inp;
 }
예제 #9
0
파일: ColorScheme.cs 프로젝트: QAsQ/VIDA
 public ColorScheme()
 {
     bg = Color.Empty;
     ds[0] = ds[1] = ds[2] = new DrawStyle();
 }
예제 #10
0
파일: DependencyView.cs 프로젝트: QAsQ/VIDA
 private void DrawArrow(Point[] PointList, DrawStyle currStyle)
 {
     if (currStyle.ArrowFill.IsEmpty == false)
     {
         Brush fillBush = new SolidBrush(currStyle.ArrowFill);
         buffer.FillPolygon(fillBush, PointList);
     }
     if (currStyle.ArrowEdge.IsEmpty == false)
     {
         Pen edgePen = new Pen(currStyle.ArrowEdge);
         edgePen.Width = lineW;
         buffer.DrawPolygon(edgePen, PointList);
     }
 }
예제 #11
0
파일: DependencyView.cs 프로젝트: QAsQ/VIDA
 private void DrawArrow(PointF _st, PointF _ed, DrawStyle start)
 {
     Point st = Point.Round(_st);
     Point ed = Point.Round(_ed);
     int length = Geom.Distance(st, ed);
     if (length <= size_circle * 2)
         return;
     Point[] pointList = Geom.getArrowHead(st, ed, size_circle);
     Geom.scaleLine(ref st, ref ed, size_circle);
     if (start.ArrowLine.IsEmpty == false)
     {
         Pen edPen = new Pen(start.ArrowLine);
         edPen.Width = lineW;
         buffer.DrawLine(edPen, st, pointList[0]);
     }
     DrawArrow(pointList, start);
 }
예제 #12
0
파일: ColorScheme.cs 프로젝트: QAsQ/VIDA
 public void loadByIndex(int index, DrawStyle inp)
 {
     ds[index] = inp;
 }
예제 #13
0
파일: ColorScheme.cs 프로젝트: QAsQ/VIDA
 public ColorScheme()
 {
     bg    = Color.Empty;
     ds[0] = ds[1] = ds[2] = new DrawStyle();
 }
예제 #14
0
파일: DrawStyle.cs 프로젝트: QAsQ/VIDA
 public object Clone()
 {
     DrawStyle ret = new DrawStyle();
     ret.initFromColor(Font, SkillFill, SkillEdge, ArrowLine, ArrowEdge, ArrowFill);
     return ret;
 }