Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
ChingYen  
#1 Posted : Sunday, June 8, 2008 11:17:33 PM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 185

Thanks: 8 times
Hi,

May I know how can I programmatically rotate the TextVobject by using the Center point? just like how we drag @ the corner.

This is the code I am using now. Seems like no luck.

Code:
4:              If TypeOf obj Is Aurigma.GraphicsMill.WinControls.TextVObject Then
5:                  Dim point As New PointF(obj.GetVObjectBounds.Width / 2, obj.GetVObjectBounds.Height / 2)
6:                  obj.Transform.RotateAt(90, point)
7:                  obj.Update()
8:              End If


Please advice.
Alex Kon  
#2 Posted : Tuesday, June 10, 2008 1:22:06 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Administration
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hi,

I think that you should use this point as argument of the RotateAt(...) method:

Code:
Dim bounds As RectangleF = obj.GetTransformedVObjectBounds()
Dim point As New PointF( _ 
     bounds.X + bounds.Width / 2, _ 
     bounds.Y + bounds.Height / 2)

Edited by user Tuesday, June 10, 2008 1:23:23 PM(UTC)  | Reason: Not specified

ChingYen  
#3 Posted : Monday, March 9, 2009 4:27:15 PM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 185

Thanks: 8 times
Alex Kon wrote:
Hi,

I think that you should use this point as argument of the RotateAt(...) method:

Code:
Dim bounds As RectangleF = obj.GetTransformedVObjectBounds()
Dim point As New PointF( _ 
     bounds.X + bounds.Width / 2, _ 
     bounds.Y + bounds.Height / 2)



Hi,

Thanks for the suggestion, but seems like it's not rotating @ the center of the TextVObject. After the transform, the text will actually shifted to another location. Please advise. Thanks.
ChingYen  
#4 Posted : Monday, March 9, 2009 4:33:45 PM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 185

Thanks: 8 times
ChingYen wrote:
Alex Kon wrote:
Hi,

I think that you should use this point as argument of the RotateAt(...) method:

Code:
Dim bounds As RectangleF = obj.GetTransformedVObjectBounds()
Dim point As New PointF( _ 
     bounds.X + bounds.Width / 2, _ 
     bounds.Y + bounds.Height / 2)



Hi,

Thanks for the suggestion, but seems like it's not rotating @ the center of the TextVObject. After the transform, the text will actually shifted to another location. Please advise. Thanks.


Thanks... problem solved..

Dim point As New PointF(obj.GetVObjectBounds.X + obj.GetVObjectBounds.Width / 2, obj.GetVObjectBounds.Y + obj.GetVObjectBounds.Height / 2)
tcrosbie  
#5 Posted : Tuesday, March 10, 2009 3:32:01 PM(UTC)
tcrosbie

Rank: Advanced Member

Groups: Member
Joined: 6/22/2008(UTC)
Posts: 27

You'll find that unlike ImageVObjects, the TextVObjects centre point doesn't recalculate itself when the TextVObject is resized, (transformed). So the centre point stays in an absolute position, instead of a relative position.

I've been wondering with whether this is a bug or a feature :)
Dmitry  
#6 Posted : Sunday, March 15, 2009 3:34:40 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

You are right. If you change size of text area it does not shift center of rotation. I added this issue to our bug tracking system. Thanks for your report.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.