15,940,430 members
Home / Discussions / C / C++ / MFC

# C / C++ / MFC

 Sorting a user class based CArray al25003-Jul-07 19:31 al2500 3-Jul-07 19:31
 Re: Sorting a user class based CArray Stephen Hewitt3-Jul-07 19:55 Stephen Hewitt 3-Jul-07 19:55
 My registered activex control is corrupted or missing. adityarao313-Jul-07 18:35 adityarao31 3-Jul-07 18:35
 RTTI option in compiler vibindia3-Jul-07 17:30 vibindia 3-Jul-07 17:30
 Re: RTTI option in compiler User 5838523-Jul-07 17:36 User 583852 3-Jul-07 17:36
 Re: RTTI option in compiler Rajkumar R3-Jul-07 18:22 Rajkumar R 3-Jul-07 18:22
 Re: RTTI option in compiler Stephen Hewitt3-Jul-07 18:24 Stephen Hewitt 3-Jul-07 18:24
 A Fast Bresenham Type Algorithm For Drawing Ellipse KienNT783-Jul-07 17:20 KienNT78 3-Jul-07 17:20
 I read "A Fast Bresenham Type Algorithm For Drawing Ellipse" by John Kennedy Mathematics Department. Below function was developed base on above algorithm. I want to ask someone help me, how can develop below function to rotate ellipse. If someone have an other ideals, can you help me! ```
void CBGraphics::DrawEllipse(HDC hDC, int x1, int y1, int x2, int y2, COLORREF color)
{
long x, y, XChange, YChange, EllipseError, TwoASquare, TwoBSquare, StoppingX, StoppingY;
TwoASquare = 2 * x2 * x2;
TwoBSquare = 2 * y2 * y2;
x = x2;
y = 0;
XChange = y2 * y2 * (1 - 2 * x2);
YChange = x2 * x2;
EllipseError = 0;
StoppingX = TwoBSquare * x2;
StoppingY = 0;
while( StoppingX >= StoppingY)
{
Put4Pixel(hDC, x1, y1, x, y, color);
y++;
StoppingY += TwoASquare;
EllipseError += YChange;
YChange += TwoASquare;
if( ( 2 * EllipseError + XChange) > 0 )
{
x--;
StoppingX -= TwoBSquare;
EllipseError += XChange;
XChange += TwoBSquare;
}
}
x = 0;
y = y2;
XChange = y2 * y2;
YChange = x2 * x2 * (1 - 2 * y2);
EllipseError = 0;
StoppingX = 0;
StoppingY = TwoASquare * y2;
while (StoppingX <= StoppingY)
{
Put4Pixel(hDC, x1, y1, x, y, color);
x++;
StoppingX += TwoBSquare;
EllipseError += XChange;
XChange += TwoBSquare;
if( (2 * EllipseError + YChange) > 0)
{
y--;
StoppingY -= TwoASquare;
EllipseError += YChange;
YChange += TwoASquare;
}
}
}
```
 Re: A Fast Bresenham Type Algorithm For Drawing Ellipse Rajkumar R3-Jul-07 19:22 Rajkumar R 3-Jul-07 19:22
 Re: A Fast Bresenham Type Algorithm For Drawing Ellipse [modified] KienNT783-Jul-07 20:53 KienNT78 3-Jul-07 20:53
 monitoring user connections in my PC m-a-s-a-k-i-t-o-n3-Jul-07 15:35 m-a-s-a-k-i-t-o-n 3-Jul-07 15:35
 Re: monitoring user connections in my PC David Crow3-Jul-07 18:10 David Crow 3-Jul-07 18:10
 Re: monitoring user connections in my PC m-a-s-a-k-i-t-o-n3-Jul-07 22:16 m-a-s-a-k-i-t-o-n 3-Jul-07 22:16
 Custom Vector Allocator miketra3-Jul-07 10:04 miketra 3-Jul-07 10:04
 Re: Custom Vector Allocator Maximilien3-Jul-07 10:31 Maximilien 3-Jul-07 10:31
 Vector Function erase() miketra3-Jul-07 10:55 miketra 3-Jul-07 10:55
 Re: Vector Function erase() Stephen Hewitt3-Jul-07 13:59 Stephen Hewitt 3-Jul-07 13:59
 How to prevent CMainFrame from restores???? SandipG 3-Jul-07 9:22 SandipG 3-Jul-07 9:22
 Re: How to prevent CMainFrame from restores???? MANISH RASTOGI3-Jul-07 18:46 MANISH RASTOGI 3-Jul-07 18:46
 runtime type casting wallbrick3-Jul-07 6:00 wallbrick 3-Jul-07 6:00
 Re: runtime type casting Matthew Faithfull3-Jul-07 6:18 Matthew Faithfull 3-Jul-07 6:18
 Re: runtime type casting led mike3-Jul-07 6:22 led mike 3-Jul-07 6:22
 Re: runtime type casting Nuxser3-Jul-07 15:59 Nuxser 3-Jul-07 15:59
 Re: runtime type casting Nuxser3-Jul-07 16:17 Nuxser 3-Jul-07 16:17
 get Distinguished Email id from GAL Ganesh_T3-Jul-07 5:47 Ganesh_T 3-Jul-07 5:47
 Last Visit: 31-Dec-99 18:00     Last Update: 18-Jul-24 1:30 Refresh ᐊ Prev1...6526652765286529653065316532653365346535 Next ᐅ