Click to See Complete Forum and Search --> : Question on GDI???


acsolu
March 27th, 2005, 12:13 AM
Recently, I am working on an image processing project. In the project, i need to create a selection first to define the region to be processed. here comes the problem, how can I do to draw the selection like that in photoshop as the picture below,

100% zoom ratio
http://www.codeguru.com/forum/attachment.php?attachmentid=9794&stc=1

800% zoom ratio
http://www.codeguru.com/forum/attachment.php?attachmentid=9795&stc=1



does anyone have any idea or advice on this??

any help will be appreciated.


Marco.

Andreas Masur
March 27th, 2005, 06:21 AM
[ Moved thread ]

andytim
April 8th, 2005, 01:34 AM
Hi,
You should create a new pen,such as:
// Prepare track line dc.
void CMYView::PrepareTrackLineDC(CDC *pDC)
{
pDC->SaveDC();
pDC->SelectObject(&m_penTrackLine);
pDC->SetROP2(R2_NOTXORPEN);
pDC->SelectStockObject(NULL_BRUSH);
}

// Clear track line dc.
void CMYView::ClearTrackLineDC(CDC *pDC)
{
pDC->RestoreDC(-1);
}

Then call pDC->Ellipse is enough!
:rolleyes:
Andy
----------------------------------------------------------------
XD++ MFC Library V9.0 -- http://www.********.net