Exemplo n.º 1
0
 public Point MeasureStringCached(ref CachedRenderString cache, string fontName, float size, string text, bool underline = false, TextAlignment alignment = TextAlignment.Left)
 {
     if (text == "" || size < 1) //skip empty str
     {
         return(Point.Zero);
     }
     return(CreateRichTextEngine().MeasureStringCached(ref cache, fontName, size, text, underline, alignment));
 }
Exemplo n.º 2
0
 public void DrawStringCached(ref CachedRenderString cache, string fontName, float size, string text,
                              float x, float y, Color4 color, bool underline = false, TextShadow shadow = default,
                              TextAlignment alignment = TextAlignment.Left)
 {
     if (text == "" || size < 1) //skip empty str
     {
         return;
     }
     CreateRichTextEngine().DrawStringCached(ref cache, fontName, size, text, x, y, color, underline, shadow, alignment);
 }
Exemplo n.º 3
0
 public abstract Point MeasureStringCached(ref CachedRenderString cache, string fontName, float size, string text,
                                           bool underline, TextAlignment alignment);
Exemplo n.º 4
0
 public abstract void DrawStringCached(ref CachedRenderString cache, string fontName, float size, string text,
                                       float x, float y, Color4 color, bool underline = false, TextShadow shadow = default, TextAlignment alignment = TextAlignment.Left);