0 Replies Latest reply on Jul 30, 2012 12:18 AM by DeepAlone

    Problem in applying reflection using action manager.

    DeepAlone Level 1



      I am trying to use reflection on some art using action manager. On clicking a menuitem, I am applying the reflection.

      When I am not using kAIReflectSelectionAboutDXKey and kAIReflectSelectionAboutDYKey parameter it works fine.

      But providing the value for the above key not working on first time when menu-item is clicked.

      It says "Can't reflect the objects. The requested transformation would make some objects fall completely off the drawing area." But clicking again on menu-item, it works.


      When I debug the code, I found the error code "1346458189" (PARM : kBadParameterErr).

      How the same code is working on subsequent click on menu-item.


      Please Help!

      Here is my code snippet


      AIErr error;


      AIActionParamValueRef actionParam;


      //create a new action param value.

      error = sAIActionManager->AINewActionParamValue(&actionParam);

      error = sAIActionManager->AIActionSetUnitReal(actionParam, kAIReflectSelectionAngleKey, unitAngle, (AIReal)90.0);

      error = sAIActionManager->AIActionSetReal(actionParam, kAIReflectSelectionAboutDXKey, 297.0);

      error = sAIActionManager->AIActionSetReal(actionParam, kAIReflectSelectionAboutDYKey, 420.0);

      error = sAIActionManager->AIActionSetBoolean(actionParam, kAIReflectSelectionObjectsKey, true);

      error = sAIActionManager->AIActionSetBoolean(actionParam, kAIReflectSelectionCopyKey, true);

      error = sAIActionManager->AIActionSetBoolean(actionParam, kAIReflectSelectionPatternsKey, true);

      error = sAIActionManager->PlayActionEvent(kAIReflectSelectionAction, kDialogOff, actionParam);