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

Notification

Icon
Error

Options
Go to last post Go to first unread
fit2page  
#1 Posted : Thursday, October 04, 2012 6:48:49 AM(UTC)
fit2page

Rank: Member

Groups: Member
Joined: 3/15/2012(UTC)
Posts: 10

Thanks: 1 times
I am trying to invoke a remote method through JS:

function Flip(){
var frontPsdEditor = $find("<%= ClientID %>");
var cv = frontPsdEditor.get_canvas();
cv.invokeRemoteMethod("FlipImage");
cv.redraw();
}

The server code:

[Aurigma.GraphicsMill.AjaxControls.RemoteScriptingMethod()]
public void FlipImage(Object sender, CommandEventArgs e) {
var imageLayer = CanvasViewer.Canvas.Layers.Where(l => l.Name == "imageUG").FirstOrDefault();
ImageVObject imgorg = (ImageVObject)CanvasViewer.Canvas.CurrentVObject;
var bitmaporg = (Aurigma.GraphicsMill.Bitmap)imgorg.Bitmap;
Aurigma.GraphicsMill.Transforms.RotateAndFlip rotateAndFlip = new Aurigma.GraphicsMill.Transforms.RotateAndFlip();
rotateAndFlip.Mode = System.Drawing.RotateFlipType.RotateNoneFlipX;
rotateAndFlip.ApplyTransform(bitmaporg);

}

The VObject is not updated after applying the Flip?
What am I missing?

Marc


Dmitry.Obukhov  
#2 Posted : Friday, October 05, 2012 2:18:03 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups:
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Marco,

<%= ClientID %> returns "__Page". You should set the correct ID of the canvasViewer. Please check it.
Best regards,
Dmitry Obukhov

Technical Support. Aurigma, Inc.
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.