elliptic image

elliptic image

Post by Tang YongGan » Mon, 29 Oct 2001 12:49:38

I want to create an elliptic image use API CreateEllipticRgn and
SetWindowRgn :

at first I create an Elliptic rgn

        HRGN rgn = CreateEllipticRgn(0,0,Image1->Height,Image1->Width);

then when I want to use SetWindowRgn to set rgn on Image1, I find Image1
does not have Handle which is the first parameter of SetWindowRgn, so I use
the Handle of Image1->Canvas,


but it does not work.


elliptic image

Post by Fishfac » Mon, 29 Oct 2001 15:03:43


Quote:> SetWindowRgn(Image1->Canvas->Handle,rgn,true);

> but it does not work.

Wrong kind of handle-- that's an HDC.  What you can do is
put your TImage component on a TPanel and use the Handle,
Width, and Height properties of the TPanel.


elliptic image

Post by Eudy Silv » Tue, 30 Oct 2001 04:02:08


Maybe it won't solve your problem, but this line is wrong:

Quote:>  HRGN rgn = CreateEllipticRgn(0,0,Image1->Height,Image1->Width);

It should be

HRGN rgn = CreateEllipticRgn(0,0,Image1->Width,Image1->Height);



1. Elliptic arcs

Does anybody know the algorithm (I don't mind the language,
        but preferible in C or C++) of how to stroke an arc into

        I know that it can be done, this way:

        First find the highest point in the arc, and so we'll have
        two arcs, with which will do the same operation, so on until
        we have enough "middle arc points" that follows more or less
        the contorn of the arc.

        But I've got a problem, what about if we only know
        the two extrem points of the arc and the center of the same?

        I don't know how to find the highest point in the arc.

        Thank's a lot to the group.


2. Jobsuche

3. Stroke of elliptic arcs

4. Live Pictures and layers

5. Algorithm for filling an elliptic sector needed !!!

6. FAQ: surface generating literature

7. Approximating Elliptic arc using Bezier

8. WTB:YARC MacRenderman NuBus board

9. Image Database Software / Image Catalogues / Image Library summary

10. OPEN/image TIPS: Attention Wang OPEN/image document imaging sites

11. image 1 + image 2 = image 3 how ???

12. Image, Hot Image and Disabled Image