示例#1
0
 public void ShowTextBox(Vector2 pos, Stroke st)
 {
     this.Location = new System.Drawing.Point((int)(pos.X + Browser.Instance.clientBounds.Min.X), (int)(pos.Y + Browser.Instance.clientBounds.Min.Y));
     this.Show();
     IsShown = true;
     boundingBox = new BoundingBox2D(new Vector2(pos.X , pos.Y), new Vector2(pos.X + width, pos.Y + height), 0f);
     s = st;
 }
示例#2
0
 public Stroke createStroke(Vector2 pos)
 {
     Stroke s = new Stroke(pos, photos);
     StrokeBox[s] = null;
     setColor(s);
     return s;
 }
示例#3
0
 public void remove(Stroke s)
 {
     if (StrokeBox.ContainsKey(s))
     {
         if (StrokeBox[s] != null)
             StrokeBox[s].Dispose();
         StrokeBox.Remove(s);
     }
 }
示例#4
0
 private void setColor(Stroke s)
 {
     tempColor = new Vector3(hue, 1f, 1f);
     Vector3 strokeColor = Vector3.Zero;
     ResourceManager.hsv2rgb(ref tempColor, out strokeColor);
     //Color sColor = new Color(strokeColor);
     s.Color = new Color(strokeColor);
     hue += 0.3f;
     if (hue > 1f)
         hue -= (int)hue;
 }
示例#5
0
 //public void remove()
 //{
 //    List<Stroke> strokes = new List<Stroke>(StrokeBox.Keys);
 //    for (int i = 0; i < strokes.Count; i++)
 //    {
 //        FloatTextBox box = StrokeBox[strokes[i]];
 //        if (box != null && box.IsShown == false)
 //        {
 //            strokes[i].AddTags(box.tags);
 //            box.Dispose();
 //            StrokeBox[strokes[i]] = null;
 //        }
 //    }
 //}
 public void createTextBox(Vector2 pos, Stroke s)
 {
     FloatTextBox box = new FloatTextBox();
     //textBoxes.Add(box);
     StrokeBox[s] = box;
     box.ShowTextBox(pos, s);
 }