In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
It is believed that many inexperienced people have no idea about how to realize simple grayscale image and cool HeatMap thermal map winform. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
First, the effect display
Second, randomly generate thermal points
Thermal point class
Class HeatPoint {public int X; public int Y; public byte Intensity; public HeatPoint (int iX, int iY, byte bIntensity) {X = iX; Y = iY; Intensity = bIntensity;}}
Randomly generated thermal points
Privatevoid generateBtn_Click (object sender, EventArgs e) {Random rRand = new Random (); for (int I = 0; I < 500; iTunes +) {int iX = rRand.Next (0800); int iY = rRand.Next (0800); byte iIntense = (byte) rRand.Next (0180); heatPoints.Add (new HeatPoint (iX, iY, iIntense));} UpdateView () Private Bitmap CreateIntensityMask (Bitmap bitmap, List aHeatPoints) {Graphics graphics = Graphics.FromImage (bitmap); graphics.Clear (System.Drawing.Color.White); foreach (HeatPoint point in aHeatPoints) {if (point.Intensity * 30 / 180 = = 0) continue; DrawHeatPoint (graphics, point, point.Intensity * 30 / 180); / / DrawHeatPoint (graphics, point, 15);} return bitmap } / / this method is used to draw actual radial gradient "points" on the drawing surface. This is probably the most important method in the entire project because it can handle drawing points of different sizes and densities. Private void DrawHeatPoint (Graphics graphics, HeatPoint HeatPoint, int radius) {List pointsList = new List (); for (double degrees = 0; degrees)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.