Exemplo n.º 1
0
        internal StringFormat GetStringFormat(GraphicCache cache, StringFormatFlags flags, float scale)
        {
            if (RightToLeft)
            {
                flags |= StringFormatFlags.DirectionRightToLeft;
            }

            return(cache.GetStringFormat(StringAlignment.Near, StringAlignment.Near, StringTrimming.None, flags, 0 * scale, 0 * scale));
        }
Exemplo n.º 2
0
        internal StringFormat GetStringFormat(GraphicCache cache, StringFormatFlags flags)
        {
            StringAlignment align = StringAlignment.Near;

            if (HorzAlign == HorzAlign.Center)
            {
                align = StringAlignment.Center;
            }
            else if (HorzAlign == HorzAlign.Right)
            {
                align = StringAlignment.Far;
            }

            StringAlignment lineAlign = StringAlignment.Near;

            if (VertAlign == VertAlign.Center)
            {
                lineAlign = StringAlignment.Center;
            }
            else if (VertAlign == VertAlign.Bottom)
            {
                lineAlign = StringAlignment.Far;
            }

            if (RightToLeft)
            {
                flags |= StringFormatFlags.DirectionRightToLeft;
            }
            if (!WordWrap)
            {
                flags |= StringFormatFlags.NoWrap;
            }
            if (!Clip)
            {
                flags |= StringFormatFlags.NoClip;
            }

            return(cache.GetStringFormat(align, lineAlign, Trimming, flags, FFirstTabOffset, FTabWidth));
        }
Exemplo n.º 3
0
 internal StringFormat GetStringFormat(GraphicCache cache, StringFormatFlags flags)
 {
     return(GetStringFormat(cache, flags, 1));
 }