Beispiel #1
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);
        }
Beispiel #2
0
 private void addOneSkill(PointF centerPoint)
 {
     Skill adder = new Skill(defaultSkillName +"("+ count.ToString()+")");
     count++;
     skillList.Add(adder);
     circleCenter.Add(centerPoint);
     drawModeList.Add(SkillDrawMode.Us);
     isLearnList.Add(false);
     resetAllDrawmode();
     reName(skillList.Count- 1);
 }