protected override void Draw(DemoTime time) { base.Draw(time); // Draw the TextLayout RenderTarget2D.DrawTextLayout(new DrawingPointF(0,0), TextLayout, SceneColorBrush, DrawTextOptions.None ); }
protected override void Draw(DemoTime time) { base.Draw(time); // Draw the TextLayout RenderTarget2D.DrawGeometry(TesselatedGeometry, SceneColorBrush, 1, null); }
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)); }
protected override void Draw(DemoTime time) { base.Draw(time); RenderTarget2D.Clear(Color.White); RenderTarget2D.DrawText("Hello World using DirectWrite!", TextFormat, ClientRectangle, SceneColorBrush); }
protected override void Draw(DemoTime time) { base.Draw(time); // Draw the TextLayout RenderTarget2D.DrawBitmap(_bitmap, 1.0f, BitmapInterpolationMode.Linear); }
/// <summary> /// In a derived class, implements logic to update any relevant sample state. /// </summary> protected virtual void Update(DemoTime time) { }
/// <summary> /// In a derived class, implements logic to render the sample. /// </summary> protected virtual void Draw(DemoTime time) { }