// Token: 0x06006500 RID: 25856 RVA: 0x001C5414 File Offset: 0x001C3614 internal static void DumpVisual(XmlTextWriter writer, Visual visual, Visual parent) { if (visual is UIElement) { LayoutDump.DumpUIElement(writer, (UIElement)visual, parent, false); return; } writer.WriteStartElement(visual.GetType().Name); Rect visualContentBounds = visual.VisualContentBounds; if (!visualContentBounds.IsEmpty) { LayoutDump.DumpRect(writer, "ContentRect", visualContentBounds); } Geometry clip = VisualTreeHelper.GetClip(visual); if (clip != null) { LayoutDump.DumpRect(writer, "Clip.Bounds", clip.Bounds); } GeneralTransform generalTransform = visual.TransformToAncestor(parent); Point point = new Point(0.0, 0.0); generalTransform.TryTransform(point, out point); if (point.X != 0.0 || point.Y != 0.0) { LayoutDump.DumpPoint(writer, "Position", point); } LayoutDump.DumpVisualChildren(writer, "Children", visual); writer.WriteEndElement(); }
// Token: 0x06006502 RID: 25858 RVA: 0x001C5614 File Offset: 0x001C3814 internal static void DumpDocumentPage(XmlTextWriter writer, DocumentPage page, Visual parent) { writer.WriteStartElement("DocumentPage"); writer.WriteAttributeString("Type", page.GetType().FullName); if (page != DocumentPage.Missing) { LayoutDump.DumpSize(writer, "Size", page.Size); GeneralTransform generalTransform = page.Visual.TransformToAncestor(parent); Point point = new Point(0.0, 0.0); generalTransform.TryTransform(point, out point); if (point.X != 0.0 || point.Y != 0.0) { LayoutDump.DumpPoint(writer, "Position", point); } Type type = page.GetType(); LayoutDump.DumpCustomDocumentPage dumpCustomDocumentPage = null; while (dumpCustomDocumentPage == null && type != null) { dumpCustomDocumentPage = (LayoutDump._documentPageToDumpHandler[type] as LayoutDump.DumpCustomDocumentPage); type = type.BaseType; } if (dumpCustomDocumentPage != null) { dumpCustomDocumentPage(writer, page); } } writer.WriteEndElement(); }
// Token: 0x0600650D RID: 25869 RVA: 0x001C5B40 File Offset: 0x001C3D40 private static bool DumpFlowDocumentView(XmlTextWriter writer, UIElement element, bool uiElementsOnly) { FlowDocumentView flowDocumentView = element as FlowDocumentView; IScrollInfo scrollInfo = flowDocumentView; if (scrollInfo.ScrollOwner != null) { Size size = new Size(scrollInfo.ExtentWidth, scrollInfo.ExtentHeight); if (DoubleUtil.AreClose(size, element.DesiredSize)) { LayoutDump.DumpSize(writer, "Extent", size); } Point point = new Point(scrollInfo.HorizontalOffset, scrollInfo.VerticalOffset); if (!DoubleUtil.IsZero(point.X) || !DoubleUtil.IsZero(point.Y)) { LayoutDump.DumpPoint(writer, "Offset", point); } } FlowDocumentPage documentPage = flowDocumentView.Document.BottomlessFormatter.DocumentPage; GeneralTransform generalTransform = documentPage.Visual.TransformToAncestor(flowDocumentView); Point point2 = new Point(0.0, 0.0); generalTransform.TryTransform(point2, out point2); if (!DoubleUtil.IsZero(point2.X) && !DoubleUtil.IsZero(point2.Y)) { LayoutDump.DumpPoint(writer, "PagePosition", point2); } LayoutDump.DumpFlowDocumentPage(writer, documentPage); return(false); }
// Token: 0x06006501 RID: 25857 RVA: 0x001C54F0 File Offset: 0x001C36F0 private static void DumpUIElement(XmlTextWriter writer, UIElement element, Visual parent, bool uiElementsOnly) { writer.WriteStartElement(element.GetType().Name); LayoutDump.DumpSize(writer, "DesiredSize", element.DesiredSize); LayoutDump.DumpSize(writer, "ComputedSize", element.RenderSize); Geometry clip = VisualTreeHelper.GetClip(element); if (clip != null) { LayoutDump.DumpRect(writer, "Clip.Bounds", clip.Bounds); } GeneralTransform generalTransform = element.TransformToAncestor(parent); Point point = new Point(0.0, 0.0); generalTransform.TryTransform(point, out point); if (point.X != 0.0 || point.Y != 0.0) { LayoutDump.DumpPoint(writer, "Position", point); } bool flag = false; Type type = element.GetType(); LayoutDump.DumpCustomUIElement dumpCustomUIElement = null; while (dumpCustomUIElement == null && type != null) { dumpCustomUIElement = (LayoutDump._elementToDumpHandler[type] as LayoutDump.DumpCustomUIElement); type = type.BaseType; } if (dumpCustomUIElement != null) { flag = dumpCustomUIElement(writer, element, uiElementsOnly); } if (!flag) { if (uiElementsOnly) { LayoutDump.DumpUIElementChildren(writer, "Children", element); } else { LayoutDump.DumpVisualChildren(writer, "Children", element); } } writer.WriteEndElement(); }
// Token: 0x0600651C RID: 25884 RVA: 0x001C63D8 File Offset: 0x001C45D8 private static Visual DumpParagraphOffset(XmlTextWriter writer, ParagraphResult paragraph, Visual visualParent) { Type type = paragraph.GetType(); FieldInfo field = type.GetField("_paraClient", BindingFlags.Instance | BindingFlags.NonPublic); object value = field.GetValue(paragraph); Type type2 = value.GetType(); PropertyInfo property = type2.GetProperty("Visual", BindingFlags.Instance | BindingFlags.NonPublic); Visual visual = (Visual)property.GetValue(value, null); if (visualParent.IsAncestorOf(visual)) { GeneralTransform generalTransform = visual.TransformToAncestor(visualParent); Point point = new Point(0.0, 0.0); generalTransform.TryTransform(point, out point); if (point.X != 0.0 || point.Y != 0.0) { LayoutDump.DumpPoint(writer, "Origin", point); } } return(visual); }