nextuppreviouscontents
Next:Entry PointsUp:POLKA Animation Designer's PackagePrevious:ExampleContents




This section is a copy of [1] , which is available at:
http://www.cc.gatech.edu/gvu/softviz/parviz/polkastuff/polkadoc-lite.ps.
The POLKA document is copyrighted by John T. Stasko, College of Computing, Georgia Institute of Technology, Atlanta, GA 30332-0280, and is available for noncommercial use.

Animation Views

An animation View is a particular graphical perspective of a program. Each resides in its own X window. Each View has its own animation time (frame number). This value is defined in the member time initialized to zero. An animation designer should create a subclass of the general View class. In addition to the functions already provided for a View, the View should also have individual animation scenes (such as Input, Compare, Exchange, and InPlace for a sorting view) placed in it.

Views contain a real-valued animation coordinate system. Typically, views begin with $x$ and $y$ ranging from 0.0 to 1.0, with the origin at the lower left corner and increasing from left-to-right and bottom-to-top. If the window isn't square initially, one of the dimensions will be skewed, and for instance, circles will look like ellipses. To get a non-square window to have a similar x-y aspect ratio, use the routine SetCoord.

The View base class is defined as follows:

class View {
   protected:
      int     time;
   public:
      View();
      ~View();
      void SetDebug(int);
      void SetCoord(double, double, double, double);
      void SetBgColor(const char *);
      int Create(const char *title=''Polka", RefreshMode rm=CoordStretch,
                 int width=0, int height=0);
      int Animate(int, int);
      int CheckInput();
};



Subsections

Ha Hoai Phuong

2002-11-11