Example #1
0
        public void Deserialize_GetStyle()
        {
            IStyle headerStyle = m_stylesheetFromXml.GetStyle("h");

            Assert.NotNull(headerStyle);
            Assert.AreEqual("h", headerStyle.Id);
            Assert.IsTrue(headerStyle.IsPublishable);
            Assert.IsFalse(headerStyle.IsVerseText);
        }
Example #2
0
        public void Draw(DrawContext dc, XmlElement e)
        {
            Style c = Stylesheet.GetStyle(dc.Graphics, e, dc.DocumentType.GetElementType(e));

            if (rootBlock == null)
            {
                rootBlock = c.CreateReflowObject(null, e) as IBlock;
                rootBlock.Reflow(dc, new BoundingContext(dc.BoundingRectangle), false);
            }

            if (rootBlock == null)
            {
                throw new InvalidOperationException("Root element is not a block element");
            }

//			PerfLog.Mark();
            rootBlock.Draw(dc, 0, 0, c);
//			PerfLog.Write("Layout engine redraw complete for rect bounds {0} / clip {1}", dc.BoundingRectangle, dc.ClippingRectangle);
        }