示例#1
0
        public float ComputeTextHeight(TextStylePainterParameters painterParams)
        {
            string     text          = painterParams.text;
            float      wordWrapWidth = painterParams.wordWrapWidth;
            bool       wordWrap      = painterParams.wordWrap;
            Font       font          = painterParams.font;
            int        fontSize      = painterParams.fontSize;
            FontStyle  fontStyle     = painterParams.fontStyle;
            TextAnchor anchor        = painterParams.anchor;
            bool       richText      = painterParams.richText;

            return(this.ComputeTextHeight_Internal(text, wordWrapWidth, wordWrap, font, fontSize, fontStyle, anchor, richText));
        }
示例#2
0
        public void DrawText(TextStylePainterParameters painterParams)
        {
            Rect         layout        = painterParams.layout;
            string       text          = painterParams.text;
            Font         font          = painterParams.font;
            int          fontSize      = painterParams.fontSize;
            FontStyle    fontStyle     = painterParams.fontStyle;
            Color        fontColor     = painterParams.fontColor;
            TextAnchor   anchor        = painterParams.anchor;
            bool         wordWrap      = painterParams.wordWrap;
            float        wordWrapWidth = painterParams.wordWrapWidth;
            bool         richText      = painterParams.richText;
            TextClipping clipping      = painterParams.clipping;

            this.DrawText_Internal(layout, text, font, fontSize, fontStyle, fontColor * this.m_OpacityColor, anchor, wordWrap, wordWrapWidth, richText, clipping);
        }