Rank: Advanced Member
Groups: Guest
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.
|
|
|
|
Rank: Advanced Member
Groups: Guest
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 |
|
|
|
|
Rank: Advanced Member
Groups: Guest
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.
|
|
|
|
Rank: Advanced Member
Groups: Guest
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)
|
|
|
|
Rank: Advanced Member
Groups: Guest
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 :)
|
|
|
|
Rank: Advanced Member
Groups: Guest
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. |
|
|
|
|
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.