ASP.NET implementation data chart A

xiaoxiao2021-03-06  18

Public void DrawString (String S, Font Font, Brush Brush, float x, float y);

"S" is the string to output, "font" is the font of the string, "brush" is defined the brush, and the two parameters later are the position coordinates of the string. The specific statement of the string in the program is as follows:

Font Axesfont = New Font ("Arial", 10); Brush BlackBrush = New Solidbrush (color. Red); g. DrawString ("Write text on the picture, huh", Axesfont, BlackBrush, 90, 20);

To draw lines on the picture to use the Drawline () method of the "Graphic" object, the specific usage syntax is as follows:

Public void Drawlines (Pen Pen, Point [] Points;

"Points" is the location of the definition point, of course, you can also use the methods used in this article, that is, define a line of each painting, so I feel more method. Below is the three lines in the generated picture:

Pen redpen = new pen (color. Red, 1); Pen Blackpen = New Pen (Color. Blue, 2); // The following statement draws a variety of lines on this picture object, which can define the thickness, starting point of the lines, The end point, etc., DrawLine (Blackpen, 0, 2, 210, 250); g. Drawline (Blackpen, 210, 250, 310, 50); g. Drawline (Redpen, 310, 50, 210, 350);

I know these basic knowledge, in the custom picture shape, give the picture, let the picture, the picture is more likely, the function of the following code is custom-made a square picture and draw line on the picture , Writing, coloring, specific as follows:

转载请注明原文地址:https://www.9cbs.com/read-50893.html

New Post(0)