篆体字作品 | 篆体字知识 | 加入收藏 篆体字转换器软件可转换多种篆体字在线预览 网页版 V2.0
篆体字转换器

当前位置:篆体字网 > 知识库 >

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;}

Copyright:2021-2023 篆体字转换器 www.dddtedu.com All rights reserved.