The Artima Developer Community
Sponsored Link

C# Answers Forum
Rotate Text in Rectangle ?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Vinod Shinde

Posts: 1
Nickname: vindo
Registered: Sep, 2003

Rotate Text in Rectangle ? Posted: Sep 9, 2003 10:34 PM
Reply to this message Reply
Advertisement
Currently I am drawing a text inside rectangle and rotating that text. But I am facing one problem. when I rotate the text it goes outside the rectangle when the angle is more than 60 degrees. Following is the code used for drawing text.

Matrix oldMatrix = graphics.Transform.Clone();
graphics.TranslateTransform(m_Rect.Location.X, m_Rect.Y);
graphics.RotateTransform(-m_nRotateAngle);
Rectangle rect = new Rectangle(0, 0, m_Rect.Width, m_Rect.Height);
graphics.DrawString(m_strText, m_Font, m_TextBrush, rect, m_StringFormat);
graphics.Transform = oldMatrix;

Can anybody suggest some method by which I can rotate the text inside the rectangle itself.

Topic: Persistence and Polymorphic Reads Previous Topic   Next Topic Topic: GAC - Assembly Reference

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use