篆体字网 > 知识库

drawtext

来源:篆体字网 2024-01-04 03:08:51 作者:篆字君

// Create a DrawingVisual that contains text.private DrawingVisual CreateDrawingVisualText(){ // Create an instance of a DrawingVisual. DrawingVisual drawingVisual=new DrawingVisual(); // Retrieve the DrawingContext from the DrawingVisual. DrawingContext drawingContext=drawingVisual.RenderOpen(); // Draw a formatted text string into the DrawingContext. drawingContext.DrawText( new FormattedText("Click Me!", CultureInfo.GetCultureInfo("en-us"), FlowDirection.LeftToRight, new Typeface("Verdana"), 36, System.Windows.Media.Brushes.Black), new System.Windows.Point(200, 116)); // Close the DrawingContext to persist changes to the DrawingVisual. drawingContext.Close(); return drawingVisual;}

上一篇:QQ强行视频

下一篇:baoji

相关阅读