public override void Apply(ComputedStyle style, Value value)
        {
            // Get the text:
            TextRenderingProperty text = GetText(style);

            if (text == null)
            {
                return;
            }

            if (text.TextLine == null)
            {
                return;
            }

            // Apply the property:
            if (value == null || value.Text == "initial")
            {
                // No longer custom:
                text.TextLine.ColourOverride = false;
            }
            else
            {
                // Set the colour:
                text.TextLine.SetColour(value.ToColor());
            }

            // Let it know a colour changed:
            text.ColourChanged();
        }
예제 #2
0
        public override void Apply(ComputedStyle style, Value value)
        {
            // Get the text:
            TextRenderingProperty text = GetText(style);

            if (text == null)
            {
                return;
            }

            // Apply the property:
            if (value == null)
            {
                text.BaseColour = Color.black;
            }
            else
            {
                text.BaseColour = value.ToColor();
            }

            // Let it know a colour changed:
            text.ColourChanged();
        }