コード例 #1
0
ファイル: Program.cs プロジェクト: Nezz/SharpDX
        protected override void Draw(DemoTime time)
        {
            base.Draw(time);

            // Draw the TextLayout
            RenderTarget2D.DrawTextLayout(new DrawingPointF(0,0), TextLayout, SceneColorBrush, DrawTextOptions.None );
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: MaybeMars/SharpDX-Samples
        protected override void Draw(DemoTime time)
        {
            base.Draw(time);

            // Draw the TextLayout
            RenderTarget2D.DrawGeometry(TesselatedGeometry, SceneColorBrush, 1, null);
        }
コード例 #3
0
        protected override void Draw(DemoTime time)
        {
            base.Draw(time);

            Device.ClearRenderTargetView(BackBufferView, new Color4(1,0.1f,0.1f,0.1f));

            // Make the text boucing on the screen limits
            if ((fontDimension.Right + xDir) > Config.Width)
                xDir = -1;
            else if ((fontDimension.Left + xDir) <= 0)
                xDir = 1;

            if ((fontDimension.Bottom + yDir) > Config.Height)
                yDir = -1;
            else if ((fontDimension.Top + yDir) <= 0)
                yDir = 1;

            fontDimension.Left += (int)xDir;
            fontDimension.Top += (int)yDir;
            fontDimension.Bottom += (int)yDir;
            fontDimension.Right += (int)xDir;

            // Draw the text
            font.DrawText(null, DisplayText, fontDimension, FontDrawFlags.Center | FontDrawFlags.VerticalCenter, new Color4(1, 1, 1, 1));
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: MaybeMars/SharpDX-Samples
        protected override void Draw(DemoTime time)
        {
            base.Draw(time);

            RenderTarget2D.Clear(Color.White);

            RenderTarget2D.DrawText("Hello World using DirectWrite!", TextFormat, ClientRectangle, SceneColorBrush);
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: MaybeMars/SharpDX-Samples
        protected override void Draw(DemoTime time)
        {
            base.Draw(time);

            // Draw the TextLayout
            RenderTarget2D.DrawBitmap(_bitmap, 1.0f, BitmapInterpolationMode.Linear);
        }
コード例 #6
0
 /// <summary>
 ///   In a derived class, implements logic to update any relevant sample state.
 /// </summary>
 protected virtual void Update(DemoTime time)
 {
 }
コード例 #7
0
 /// <summary>
 ///   In a derived class, implements logic to render the sample.
 /// </summary>
 protected virtual void Draw(DemoTime time)
 {
 }
コード例 #8
0
 /// <summary>
 ///   In a derived class, implements logic to render the sample.
 /// </summary>
 protected virtual void Draw(DemoTime time)
 {
 }
コード例 #9
0
 /// <summary>
 ///   In a derived class, implements logic to update any relevant sample state.
 /// </summary>
 protected virtual void Update(DemoTime time)
 {
 }