简体   繁体   中英

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:

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.

However there is not PathGradientBrush in WPF anymore. 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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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