|
-
September 1st, 1999, 10:16 AM
#1
Transparent Ellipses?
Hi,
Does anyone know of a simple way to create transparent ellipses? The CDC::Ellipse() function only seems to support filled ellipses. I've thought about using a series of bezier curves. Does anyone know a different approach?
Thanks,
Jon
-
September 1st, 1999, 10:43 AM
#2
Re: Transparent Ellipses?
The help for CDC::Ellipse says that the interior is filled with the current brush. So if you don't want the interior filled try this:
CBrush* oldBrush=pDC->SelectObject((CBrush*)NULL);
pDC->Ellipse(rect);
pDC->SelectObject(oldBrush);
-
September 1st, 1999, 01:13 PM
#3
Re: Transparent Ellipses?
Thanks, Anonymous, for the help. Your suggestion sort of works. The problem now is that I need the background to be black. The current method causes it to be white. I'll keep trying other options, but if anyone has more suggestions I'd appreciate it.
Thanks,
Jon
-
September 1st, 1999, 01:31 PM
#4
Re: Transparent Ellipses?
Just found the answer myself. FYI - you have to use CBrush::CreateBrushIndirect() and specify BS_HOLLOW as the style for LOGBRUSH.
-
September 2nd, 1999, 09:29 AM
#5
Re: Transparent Ellipses?
One way of doing it is to use paths in the device context...
pDC->BeginPath()
Draw your elipse
pDC->EndPath()
pDC->StrokePath()
Check those out and see if that works any better.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|