コード例 #1
0
ファイル: FontFactory.cs プロジェクト: ronmark1/ClearCanvas-1
        private Font GetFont(ItemKey key, string defaultFontName)
        {
            if (key.Unit != GraphicsUnit.Pixel && key.Unit != GraphicsUnit.Point)
            {
                throw new NotSupportedException("Only Pixel and Point GraphicsUnits are supported.");
            }

            try
            {
                return(_fonts.Create(key));
            }
            catch (Exception e)
            {
                Platform.Log(LogLevel.Error, e);
                return(_fonts.Create(new ItemKey(defaultFontName, key.Size, FontStyle.Regular, key.Unit)));
            }
        }
コード例 #2
0
 public StringFormat CreateStringFormat(CreateStringFormatArgs args)
 {
     return(_stringFormatFactory.Create(args));
 }
コード例 #3
0
 public Brush CreateBrush(CreateBrushArgs args)
 {
     return(_brushFactory.Create(args));
 }