예제 #1
0
        public static DDFont GetFont(string fontName, int fontSize, int fontThick = 6, bool antiAliasing = true, int edgeSize = 0, bool italicFlag = false)
        {
            DDFont font = Fonts.FirstOrDefault(v =>
                                               v.FontName == fontName &&
                                               v.FontSize == fontSize &&
                                               v.FontThick == fontThick &&
                                               v.AntiAliasing == antiAliasing &&
                                               v.EdgeSize == edgeSize &&
                                               v.ItalicFlag == italicFlag
                                               );

            if (font == null)
            {
                font = new DDFont(fontName, fontSize, fontThick, antiAliasing, edgeSize, italicFlag);
            }

            return(font);
        }
예제 #2
0
 public static int GetDrawStringWidth(string str, DDFont font, bool tategakiFlag = false)
 {
     return(DX.GetDrawStringWidthToHandle(str, StringTools.ENCODING_SJIS.GetByteCount(str), font.GetHandle(), tategakiFlag ? 1 : 0));
 }
예제 #3
0
        public static void DrawString_XCenter(int x, int y, string str, DDFont font, bool tategakiFlag, I3Color color, I3Color edgeColor)
        {
            x -= GetDrawStringWidth(str, font, tategakiFlag) / 2;

            DrawString(x, y, str, font, tategakiFlag, color, edgeColor);
        }
예제 #4
0
        public static void DrawString_XCenter(int x, int y, string str, DDFont font, bool tategakiFlag = false)
        {
            x -= GetDrawStringWidth(str, font, tategakiFlag) / 2;

            DrawString(x, y, str, font, tategakiFlag);
        }
예제 #5
0
 public static void DrawString(int x, int y, string str, DDFont font, bool tategakiFlag, I3Color color, I3Color edgeColor)
 {
     DX.DrawStringToHandle(x, y, str, DDUtils.GetColor(color), font.GetHandle(), DDUtils.GetColor(edgeColor), tategakiFlag ? 1 : 0);
 }
예제 #6
0
 public static void DrawString(int x, int y, string str, DDFont font, bool tategakiFlag, I3Color color)
 {
     DrawString(x, y, str, font, tategakiFlag, color, new I3Color(0, 0, 0));
 }
예제 #7
0
 public static void DrawString(int x, int y, string str, DDFont font, bool tategakiFlag = false)
 {
     DrawString(x, y, str, font, tategakiFlag, new I3Color(255, 255, 255));
 }
예제 #8
0
 public static void Add(DDFont font)
 {
     Fonts.Add(font);
 }