This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
undead80  
#1 Posted : Monday, January 28, 2008 8:44:43 AM(UTC)
undead80

Rank: Member

Groups: Guest
Joined: 1/7/2008(UTC)
Posts: 28

Hi,

Is that possible to flip the text and image in horizontal and vertical in VObject?

Please advice.

Thanks.

Alex Kon  
#2 Posted : Tuesday, January 29, 2008 8:33:13 PM(UTC)
Alex Kon

Rank: Advanced Member

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

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

Do you mean something like that?

Code:
vObject.Transform.Scale(-1, 1, MatrixOrder.Append); //horizontal flip
vObject.Transform.Scale(1, -1, MatrixOrder.Append); //vertical flip 
undead80  
#3 Posted : Sunday, February 3, 2008 1:20:29 PM(UTC)
undead80

Rank: Member

Groups: Guest
Joined: 1/7/2008(UTC)
Posts: 28

Alex Kon wrote:
Hello,

Do you mean something like that?

Code:
vObject.Transform.Scale(-1, 1, MatrixOrder.Append); //horizontal flip
vObject.Transform.Scale(1, -1, MatrixOrder.Append); //vertical flip 

Hi,

I think this will only flip the image and not the text?

Alex Kon  
#4 Posted : Wednesday, February 6, 2008 6:17:53 PM(UTC)
Alex Kon

Rank: Advanced Member

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

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

No, this will flip any object across vertical or horizontal axis - it is math which is common for all VObjects. Here is more detailed code for vertical flip:

Code:

IVObject obj = _mlv.CurrentDesigner.VObjects[0];

RectangleF bounds = obj.GetTransformedVObjectBounds();
obj.Transform.Translate(-bounds.X, -bounds.Y, MatrixOrder.Append);
obj.Transform.Scale(-1, 1, MatrixOrder.Append);
obj.Transform.Translate(bounds.X + bounds.Width, bounds.Y, MatrixOrder.Append);
obj.Update();

undead80  
#5 Posted : Wednesday, February 13, 2008 12:52:09 AM(UTC)
undead80

Rank: Member

Groups: Guest
Joined: 1/7/2008(UTC)
Posts: 28

Thanks !! Perfect !!
Users browsing this topic
Guest (3)
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.