home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / src / dynamicp / bxform / vshractv.c < prev    next >
Text File  |  1997-04-02  |  3KB  |  69 lines

  1. /*====START_GENERATED_PROLOG======================================
  2.  */
  3. /*
  4.  *   COMPONENT_NAME: oddynamicpart
  5.  *
  6.  *   CLASSES: none
  7.  *
  8.  *   ORIGINS: 82,27
  9.  *
  10.  *
  11.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12.  *   All Rights Reserved
  13.  *   Licensed Materials - Property of IBM
  14.  *   US Government Users Restricted Rights - Use, duplication or
  15.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16.  *       
  17.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23.  *   OR PERFORMANCE OF THIS SOFTWARE.
  24.  */
  25. /*====END_GENERATED_PROLOG========================================
  26.  */
  27. /* @(#) 1.3 com/src/samples/dynamicp/bxform/vshractv.c, oddynamicpart, od96os2, odos29712d 97/03/21 17:44:52 (96/11/12 18:47:36)
  28. *******************************************************************
  29. ** Name: void _set_vShearActive
  30. **
  31. ** Description:  Update the flag that determines whether the
  32. **               part will shear vertically.
  33. **
  34. ** Parameters:   vShearActive - should part shear?
  35. **
  36. *******************************************************************
  37. */
  38. {
  39.     if (_vShearActive != vShearActive) {
  40.       _vShearActive = vShearActive;
  41.       if (!_xRotateActive && !_hShearActive) {
  42.         if (_vShearActive) {
  43.           if (!_rotateTimer->isStarted()) {
  44.             _rotateTimer->start(new DynamicPartRotateFn(*somSelf), _rotateTimerRate );
  45.           } /* endif */
  46.         } else {
  47.           _rotateTimer->stop();
  48.         } /* endif */
  49.       } /* endif */
  50.  
  51.       if (_vShearActive) {
  52.         // Force only one type of transform to be applied
  53.         // to work around limitation in OpenDoc Transforms.
  54.         if (_xRotAngle != 0.0) {
  55.           somSelf->_set_xRotAngle(ev, 0.0);
  56.         } /* endif */
  57.         if (_xRotateActive) {
  58.           somSelf->_set_xRotateActive(ev, kODFalse);
  59.         } /* endif */
  60.         if (_hShearAngle != 0.0) {
  61.           somSelf->_set_hShearAngle(ev, 0.0);
  62.         } /* endif */
  63.         if (_hShearActive) {
  64.           somSelf->_set_hShearActive(ev, kODFalse);
  65.         } /* endif */
  66.       } /* endif */
  67.     } /* endif */
  68. }
  69.