Initialize() public method

public Initialize ( string FontName, float FontSize, FontStyle FontStyle, bool AntiAliased ) : bool
FontName string
FontSize float
FontStyle FontStyle
AntiAliased bool
return bool
Exemplo n.º 1
0
 private DXFont GetFontForTextElement(TextElement element)
 {
     DXFont result;
     var key = String.Format("{0}{1}{2}", element.Font.Name, element.Font.Size, element.Font.Style);
     if (FontCache.TryGetValue(key, out result))
     {
         return result;
     }
     result = new DXFont(Device, DeviceContext);
     result.Initialize(element.Font.Name, element.Font.Size, element.Font.Style, element.AntiAliased);
     FontCache[key] = result;
     return result;
 }
Exemplo n.º 2
0
 private DXFont GetFont(Font font)
 {
     DXFont result;
     var key = String.Format("{0}{1}{2}", font.Name, font.Size, font.Style);
     if (FontCache.TryGetValue(key, out result))
     {
         return result;
     }
     result = new DXFont(Device, DeviceContext);
     result.Initialize(font.Name, font.Size, font.Style, true);
     FontCache[key] = result;
     return result;
 }