GDI Gurus, Ellipses
-
I just wonder how
::Ellipse
and::ArcTo
were implemented(orCDC::Ellipse
,CDC::ArcTo
in MFC library), I really wish I could have a chance to see the source code of those functions, or less than that, an idea how it was possible to draw an ellipse(not a circle) on the screen, by being given a mere boundary rectangle. I guess there got to be a lot of plane geometry involved, hell, wouldn't it be terribly time consuming to calculate coordinates of every single point on the arc? -
I just wonder how
::Ellipse
and::ArcTo
were implemented(orCDC::Ellipse
,CDC::ArcTo
in MFC library), I really wish I could have a chance to see the source code of those functions, or less than that, an idea how it was possible to draw an ellipse(not a circle) on the screen, by being given a mere boundary rectangle. I guess there got to be a lot of plane geometry involved, hell, wouldn't it be terribly time consuming to calculate coordinates of every single point on the arc?It's not that hard :) Have a look at this: http://wscg.zcu.cz/wscg2001/Papers_2001/R18.pdf Best regards, Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
I just wonder how
::Ellipse
and::ArcTo
were implemented(orCDC::Ellipse
,CDC::ArcTo
in MFC library), I really wish I could have a chance to see the source code of those functions, or less than that, an idea how it was possible to draw an ellipse(not a circle) on the screen, by being given a mere boundary rectangle. I guess there got to be a lot of plane geometry involved, hell, wouldn't it be terribly time consuming to calculate coordinates of every single point on the arc?Hi, For most of the devices, the GDI will just delegate the drawing to the device itself because the drawing has been optimized by the manufacturer of that piece of hardware. Check the API GetDeviceCaps, it tells you if the hardware device is capable to draw the primitive, in this case, of an ellipse. Fabian