简体   繁体   English

C#WPF无法在3D网格上绘制热图

[英]C# WPF not capable to draw heatmaps on 3D Meshes

Hi a long time ago i used this code in a Windows Form App to draw a gradient in a single triangle, which could later be used to generate a color based heatmap over a 3D Mesh: 早在很久以前,我就在Windows Form App中使用此代码在单个三角形中绘制渐变,以后可用于在3D网格上生成基于颜色的热图:

PathGradientBrush gradientBrush = new PathGradientBrush(points);
Color[] colors = { Color.Red, Color.Blue, Color.Green };
gradientBrush.CenterColor = Color.ToARGB(85,85,85);
gradientBrush.SurroundColors = colors;
surface.FillPolygon(gradientBrush, points);

I was able to draw a gradient like this from the corners of the triangle, which faded seamlessly into the middle of it. 我能够从三角形的角上绘制出这样的渐变,该渐变无缝地淡入到中间。 By placing many triangles together i could generate a colormap on my 3D mesh which was seamless, no sharp borders. 通过将多个三角形放在一起,我可以在无缝的3D网格上生成色彩图,没有清晰的边界。

However there is not PathGradientBrush in WPF anymore. 但是WPF中不再有PathGradientBrush。 How can I generate a colormap like that between three points with only the limited linear and radial brushes? 如何仅使用有限的线性和径向画笔生成三个点之间的颜色图? Are there any other ways to generate the same result? 还有其他方法可以产生相同的结果吗?

WPF is more base for the GUI reach application and there are many available library for same WPF是GUI覆盖应用程序的基础,并且有很多可用的库

http://www.telerik.com/products/wpf/overview.aspx http://www.telerik.com/products/wpf/overview.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM