Exemplo n.º 1
0
        public void CreateText(ISheet sheet, IList <XText> texts, string content, double x, double y, double width, double height, int halign, int valign, double size, ArgbColor foreground)
        {
            var text = _blockFactory.CreateText(content, x, y, width, height, halign, valign, size, ArgbColors.Transparent, foreground);

            if (texts != null)
            {
                texts.Add(text);
            }

            if (sheet != null)
            {
                sheet.Add(text);
            }
        }
Exemplo n.º 2
0
        public XText Deserialize(ISheet sheet, XBlock parent, ItemText textItem)
        {
            var text = _blockFactory.CreateText(textItem.Text,
                                                textItem.X, textItem.Y,
                                                textItem.Width, textItem.Height,
                                                textItem.HAlign,
                                                textItem.VAlign,
                                                textItem.Size,
                                                textItem.Backgroud,
                                                textItem.Foreground);

            text.Id = textItem.Id;

            parent.Texts.Add(text);
            sheet.Add(text);

            return(text);
        }