With a picture as a background diagram, and this is the implementation of the coordinates above

xiaoxiao2021-03-06  24

The recent unit's chart needs, and the general control is unable to achieve 2 GDi, very hard. ASP. The NET's GDI drawing is indeed simpler, and some experience makes everyone reduce the detour. . The coordinates of the picture are default (0, 0) on the left, and the actual coordinates are definitely not the case, so it is used here to achieve the relative coordinates. Pen mypeny = new pen (color.red, 1); system.drawing.image objimage = system.drawing.image.fromfile (server.mappath ("../ Oilmap / solid.gif")); Bitmap Objbmp = New Bitmap (Objimage); graphics objt = graphics.fromimage (objbmp); Objt.translateTransform (122, 310); // Original location objt.drawline (mypedy, 0, 0, 20); // Draw simple line Objbmp.save Response.outputstream, Imageformat.gif); // Output picture After some calculations, draw these two pictures: 1. David Triangle Figure 2. The stereoscopic perspective of stereoscopic figure is very irregular, its Y-axis and horizontal direction have a certain angle, the z-axis is also visual coordinates, and if you want to do a predetermined chart, you will have a lot of conversion (estimated), which causes pictures of drawing The error is very large, so finally, the picture is adjusted, parallel the Y-axis and horizontally, only the X-axis conversion. This picture drawn is more accurate. Because this picture is just a matter of viewing, this painting is also satisfied.

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

New Post(0)