// Token: 0x06004795 RID: 18325 RVA: 0x0010F040 File Offset: 0x0010D240
    private global::dfIntersectionType getViewportIntersection(global::dfMarkupBox box)
    {
        if (box.Display == global::dfMarkupDisplayType.none)
        {
            return(global::dfIntersectionType.None);
        }
        Vector2 size    = base.Size;
        Vector2 vector  = box.GetOffset() - this.scrollPosition;
        Vector2 vector2 = vector + box.Size;

        if (vector2.x <= 0f || vector2.y <= 0f)
        {
            return(global::dfIntersectionType.None);
        }
        if (vector.x >= size.x || vector.y >= size.y)
        {
            return(global::dfIntersectionType.None);
        }
        if (vector.x < 0f || vector.y < 0f || vector2.x > size.x || vector2.y > size.y)
        {
            return(global::dfIntersectionType.Intersecting);
        }
        return(global::dfIntersectionType.Inside);
    }
    // Token: 0x06004794 RID: 18324 RVA: 0x0010EEE0 File Offset: 0x0010D0E0
    private void gatherRenderBuffers(global::dfMarkupBox box, global::dfList <global::dfRenderData> buffers)
    {
        global::dfIntersectionType viewportIntersection = this.getViewportIntersection(box);

        if (viewportIntersection == global::dfIntersectionType.None)
        {
            return;
        }
        global::dfRenderData dfRenderData = box.Render();

        if (dfRenderData != null)
        {
            if (dfRenderData.Material == null && this.atlas != null)
            {
                dfRenderData.Material = this.atlas.Material;
            }
            float   num     = base.PixelsToUnits();
            Vector2 vector  = -this.scrollPosition.Scale(1f, -1f).RoundToInt();
            Vector3 vector2 = vector + box.GetOffset().Scale(1f, -1f) + this.pivot.TransformToUpperLeft(base.Size);
            global::dfList <Vector3> vertices = dfRenderData.Vertices;
            Matrix4x4 localToWorldMatrix      = base.transform.localToWorldMatrix;
            for (int i = 0; i < dfRenderData.Vertices.Count; i++)
            {
                vertices[i] = localToWorldMatrix.MultiplyPoint((vector2 + vertices[i]) * num);
            }
            if (viewportIntersection == global::dfIntersectionType.Intersecting)
            {
                this.clipToViewport(dfRenderData);
            }
            buffers.Add(dfRenderData);
        }
        for (int j = 0; j < box.Children.Count; j++)
        {
            this.gatherRenderBuffers(box.Children[j], buffers);
        }
    }