コード例 #1
0
        static void Main()
        {
            using (FontLoader font = new FontLoader("font/VL-Gothic-Regular.ttf"))
                using (FontLoader debugFont = new FontLoader("font/88 Zen.ttf"))
                {
                    TextOptions textOptions = new TextOptions(font.Family, 12, 17)
                    {
                        ShadowIndex  = 1,
                        DrawShadow   = true,
                        Antialiasing = true
                    };
                    textOptions.SetSolidBrushes(Color.White, Color.Black, Color.OrangeRed);

                    TextOptions debugTextOptions = new TextOptions(debugFont.Family, 8, 8)
                    {
                        ShadowIndex = 1,
                        DrawShadow  = true,
                    };
                    debugTextOptions.SetSolidBrushes(Color.White, Color.Black);

                    WindowOptions options = new WindowOptions()
                    {
                        Title            = "Sample",
                        TargetSize       = new Size(320, 240),
                        WindowSize       = new Size(640, 480),
                        DebugTextOptions = debugTextOptions,
                        TextOptions      = textOptions
                    };

                    using (SitrineWindow window = new SitrineWindow(options))
                    {
                        window.AddStoryboard(new SampleStory(window));
                        window.Run(30.0, 60.0);
                    }
                }
        }