Can someone tell me how I can draw a diagonal or slanted oval on my form? I know DrawEllipse draws circles that are either straight vertical or straight horizontal....

Recommended Answers

All 4 Replies

Thanks! I got everything to work.

Hi again.

I was wrong. I thought I had it, but I can't figure out how to convert this code (as I'm not using MFC):

for (int i = Cnt-1; i>=0; --i)
    {
        vCtlPt[i] = (LDPoint(   vCtlPt[i].x * cosAng + vCtlPt[i].y * sinAng,
                               -vCtlPt[i].x * sinAng + vCtlPt[i].y * cosAng) + constTerm).GetCPoint();
    }

Can anyone help pls?

Member Avatar for iamthwee

Don't quote me on this, because it's just a guess but I see it like thus:-

for (int i = Cnt-1; i>=0; --i)
    {
        vCtlPt[i] = (LDPoint(   vCtlPt[i].x * cosAng + vCtlPt[i].y * sinAng,
                               -vCtlPt[i].x * sinAng + vCtlPt[i].y * cosAng) + constTerm).GetCPoint();
    }

vCtlPt is obviously an array of points, those 12 which you define at the beginning to be exact.


LDPoint (   );

is obviously some function, my guess is it plots a point on a 2d canvas in MFC

int i = Cnt-1; i>=0; --i)

The above line just goes through each array of points i.e

vCtlPt[11]
vCtlPt[10]
.
.
.
vCtlPt[1]

One other thing to be aware of is that the angle is defined in radians as opposed to degrees. I.e 360 ^\circ = 2 \pi radians?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.