ZoomIn and ZoomOut features using GdiPlus

I was very surprised of the power feature of Gdiplus scaling facilities.

Just look at this source code and next, the screen shots:


void CElement::Draw(CModeler1View * pView, CDC* pDC)
 {
 Graphics graphics(pDC->m_hDC);
 // I have just added this next line.

// On the Ribbon, ZoomIn/ZoomOut just +/- 0.10 to the m_fZoomFactor member

// I should talk the C# marketing guys to explain that C++ is very productive !!!
 graphics.ScaleTransform(GetManager()->m_fZoomFactor, GetManager()->m_fZoomFactor);
 . . .
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: