troubleshooting Question

GDI+ Rotate objects

Avatar of WxW
WxW asked on
Microsoft Development
8 Comments1 Solution1531 ViewsLast Modified:

I am new to GDI+ and I am trying to use Graphics :: RotateTransform to rotate some objects. I can rotate the whole DC by some angle, but it rotates it around 0,0.

Two questions:

1. I want to rotate the DC around a specific point of the DC , and not 0,0. Say, I want to rotate around the center so the point would be (rc.right - rc.left)/2 , (rc.bottom - Can you provide me sample code to do that ? I 've seen the Matrix and other Graphics :: transform-related stuff, but since I am new to affline transformations I don't understand then pretty well.

2. Can I do the same with just a part of the DC, and not the entire DC ?


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros