Atalasoft
Welcome to Atalasoft Community Sign in | Join | Help
in

rotate not working...

Last post 24 Mar 2008, 4:22 PM by jaypompano. 1 replies.
Sort Posts: Previous Next
  •  24 Mar 2008, 2:47 PM 13541

    rotate not working...

    Trying to rotate webannotationviewer including annotations. Is this possible? In 'WebControlsMultiDemo' it shows rotation of a webimageviewer, but webannotationviewer doesn't seem to have an applycommand. Trying with the code below, doesn't error but doesn't rotate either. Am I missing some kind of update/refresh call or am I way off here? ApplyCommand seems to be some type of a canned method in the WebControlsMultiDemo, but coded out in the WebFormsDemoAnnotations sample; not sure if this is important to note or not. Thanks...

    client call from button onClick="Remote_ProcessImage();"

    [RemoteInvokable]
    public void Remote_ProcessImage()
    {
       this.ApplyCommand(GetCommand("+90"));
    }
    private ImageCommand GetCommand(string commandName)
    {
       ImageCommand command = null;
       switch (commandName)
       {
          case "+90":
          command = new RotateCommand(90.0);
          break;
       }
       return command;
    }
    private void ApplyCommand(ImageCommand command)
    {
       if (command != null)
       {
          command.Apply(WebAnnotationViewer1.Image);
       }
    }

  •  24 Mar 2008, 4:22 PM 13543 in reply to 13541

    Re: rotate not working...

    Rats...Lesson learned.

    You have to create a temp image and save it and then openURL() it back up again. I was thinking a little too easy which is what got me...

View as RSS news feed in XML