public static bool DrawNode(this BuiltinPrimitiveRenderer primitiveRenderer, Node node, Rect rootClipRect, MeshList meshList)
        {
            if (!node.ActiveInTree)
            {
                return(false);
            }

            var clipRect = node.GetClipRect(rootClipRect);

            if (node.IsClipped(clipRect))
            {
                return(false);
            }

            node.Draw(primitiveRenderer, meshList);
            return(true);
        }
Esempio n. 2
0
        public static bool Draw(this BuiltinPrimitiveRenderer primitiveRenderer, Visual visual, Rect rootClipRect, MeshList meshList)
        {
            if (!visual.ActiveInTree)
            {
                return(false);
            }

            if (visual is Node)
            {
                var clipRect = visual.GetClipRect(rootClipRect);
                if (visual.IsClipped(clipRect))
                {
                    return(false);
                }
            }

            visual.Draw(primitiveRenderer, meshList);
            return(true);
        }