| |

VerySource

 Forgot password?
 Register
Search
View: 750|Reply: 2

GDI + radian conversion CDC coordinate algorithm problem

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-28 17:00:01
| Show all posts |Read mode
GDI + 's ARC is two radians (angle or radian?) As a parameter
CDC is the start and end coordinates
Excuse me:
Use CDC algorithm instead of GDI +, and parameters use GDI +
Here is the code for the circle, is there any good, and the ellipse?
long double x = long double (double (r) * cos (double (m_fAngle / RAD_ANG)));
  long double y = long double (double (r) * sin (double (m_fAngle / RAD_ANG)));
  return PointF (ptCenter.X + REAL (x), ptCenter.Y + REAL (y));
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-1 09:00:01
| Show all posts
pDC->Ellipse(a,b,c,d);
The principle is to draw a circle based on a rectangle (a, b are the coordinates of the upper left corner, c, d are the coordinates of the upper right corner), when the rectangle is not a square, it is an ellipse.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-9-2 15:30:01
| Show all posts
Yours is serrated, not the answer I want
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list