Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - The accuracy of MFC drawing curves, both moveto and lineto are int types, and there is no drawing function of double type?
The accuracy of MFC drawing curves, both moveto and lineto are int types, and there is no drawing function of double type?
How many pixels does your computer screen have? Can you divide a pixel into several parts? At least the general monitors I know don't have this function.

Because the display itself is pixel-based, pixel-based moveto and lineto are only integer types.

To realize the above-mentioned floating-point coordinate drawing, the numerical values can be enlarged, for example, after being enlarged by 100 times, they are all integers.

Then, after drawing the corresponding point, enter text to indicate the actual coordinates of the point.

In order to draw all the points that satisfy the range and definition domain, you can set the length of the drawing window as long as the definition domain (x 1, x2) and the width as long as the range (y 1, y2), and then judge its relative position with x 1, y 1 when drawing coordinates, and convert the pixel values of the window.