Esempio n. 1
0
        public override void Paint()
        {
            MeshBlock block = FirstBlock;

            while (block != null)
            {
                block.SetColour(FontColour);
                block.Paint();
                block = block.LocalBlockAfter;
            }
        }
Esempio n. 2
0
        public override void Paint()
        {
            // Any meshes in this elements queue should now change colour:
            Color     colour = Element.Style.Computed.ColorOverlay;
            MeshBlock block  = FirstBlock;

            while (block != null)
            {
                block.SetColour(colour);
                block.Paint();
                block = block.LocalBlockAfter;
            }
        }
Esempio n. 3
0
        public override void Paint()
        {
            // Get the computed style:
            ComputedStyle computed = Element.Style.Computed;

            // Any meshes in my queue should now change colour:
            MeshBlock block = FirstBlock;

            if (Colour == null || Colour.Length == 1)
            {
                // Most common case. This is a single colour border.

                // Get the default colour - that's the same as the text colour:
                Color colour = Color.black;

                // Does this border have a colour?
                if (Colour == null)
                {
                    // Grab the text colour if there is one:
                    if (computed.Text != null)
                    {
                        // It's the same as the font colour:
                        colour = computed.Text.FontColour;
                    }
                    else
                    {
                        // Nope - We need to set alpha:
                        colour.a = computed.ColorOverlay.a;
                    }
                }
                else
                {
                    colour = Colour[0];
                }

                // For each block, set the colour:
                while (block != null)
                {
                    block.SetColour(colour);
                    block.Paint();

                    block = block.LocalBlockAfter;
                }

                return;
            }
        }