|
|
Rank: Member Groups: Member
Joined: 1/8/2008 Posts: 28 Points: 84
|
Hi,
Is that possible to flip the text and image in horizontal and vertical in VObject?
Please advice.
Thanks.
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 1/31/2005 Posts: 385 Points: 400
|
Hello, Do you mean something like that? Code:
vObject.Transform.Scale(-1, 1, MatrixOrder.Append);
vObject.Transform.Scale(1, -1, MatrixOrder.Append);
Best wishes, Alex.
|
|
Rank: Member Groups: Member
Joined: 1/8/2008 Posts: 28 Points: 84
|
Alex Kon wrote:Hello, Do you mean something like that? Code:
vObject.Transform.Scale(-1, 1, MatrixOrder.Append);
vObject.Transform.Scale(1, -1, MatrixOrder.Append);
Hi, I think this will only flip the image and not the text?
|
|
Rank: Advanced Member Groups: Administration
, Member
Joined: 1/31/2005 Posts: 385 Points: 400
|
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();
Best wishes, Alex.
|
|
Rank: Member Groups: Member
Joined: 1/8/2008 Posts: 28 Points: 84
|
Thanks !! Perfect !!
|
|
|
Guest |