public void updateData(DrawItem _item) { _rectangle.Opacity = 0.5; _rectangle.Color = _item.color; if (_item.box) { _rectangle.Location = Rectangle.FromLTRB(_item.rect.left, _item.rect.top, _item.rect.right, _item.rect.bottom); } else { _rectangle.Location = Rectangle.FromLTRB(_item.rect.left + 5, _item.rect.top + verticalPadding, _item.rect.left + 5, _item.rect.bottom - verticalPadding); } }
public void DrawRectangle(DrawItem _item) { updateData(_item); this._rectangle.Visible = true; }
public Highlighter(DrawItem _item) { hightlights.Add(this); _rectangle.Color = Color.Red; updateData(_item); }
public DrawItem(DrawItem clone) { box = clone.box; rect = clone.rect; color = clone.color; }