Exemplo n.º 1
0
 public void Paint(TextObject text)
 {
     using (var graph = Graphics.FromImage(_page.ImageBuffer))
     using (var b = new SolidBrush(text.Color))
     {
         graph.DrawString(text.Text, text.Font, b, text.Location);
     }
 }
Exemplo n.º 2
0
        public CreateTextAction(TextObject text)
        {
            Text = text;

            Visible = true;
            RePaint = true;
            IsToAll = true;
        }
Exemplo n.º 3
0
 public CreateTextAction(Page page, TextObject text)
     : this(text)
 {
     Page = page;
 }
Exemplo n.º 4
0
        private CreateTextAction GetCreateTextAction(int senderId, NetworkStream stream)
        {
            // Location | Size | Text | Font | Color

            // Shape type
            var text = new TextObject();
            // Location
            text.Location = ReadPointF(stream);
            // Size
            text.Size = ReadSizeF(stream);
            // Outline width
            text.Text = ReadString(stream);
            // Outline dash
            text.Font = ReadFont(stream);
            // Fill Color
            text.Color = ReadColor(stream);

            text.UserId = senderId;

            return new CreateTextAction(_manager.Page, text);
        }