Esempio n. 1
0
 public D2DStorylinesUScene(StoryTable st, bool showLocationLines)
 {
     this._st = st;
     this._showLocationLines = showLocationLines;
     brushes     = new Dictionary <string, D2D.SolidColorBrush>();
     halobrushes = new Dictionary <string, D2D.SolidColorBrush>();
 }
Esempio n. 2
0
 public D2DStorygraphEFDEBScene(StoryTable st, ForceParameters f, bool showLocationLines)
 {
     this._st = st;
     this._showLocationLines = showLocationLines;
     brushes = new Dictionary <string, D2D.SolidColorBrush>();
     this._f = f;
 }
Esempio n. 3
0
        private bool RefreshDrawingData()
        {
            if (_drawingHeight < 1 || _drawingWidth < 1)
            {
                return(false);
            }

            StoryToolkit stk = new StoryToolkit(_dt, _meta, _drawingWidth, _drawingHeight);

            _storyTable = stk.GetStoryTable();
            return(true);
        }
Esempio n. 4
0
        public StoryTable GetStoryTable()
        {
            StoryTable st = new StoryTable();

            float x1 = 0;
            float y1 = (float)_height;

            float x2 = (float)_width;
            float y2 = (float)_height;



            for (int i = 0; i < _dt.Rows.Count; i++)
            {
                float[]  fLocation = new float[2];
                float[]  fStory    = new float[2];
                double[] oloc      = new double[2];

                var ptx1 = x1;
                oloc[0] = (double)_dt.Rows[i][Properties.Settings.Default.StorygraphLatitudeName];
                var pty1 = GetYFromLatitude(oloc[0]);
                fLocation[0] = (float)pty1;

                var ptx2 = x2;
                oloc[1] = (double)_dt.Rows[i][Properties.Settings.Default.StorygraphLongitudeName];
                var pty2 = GetYFromLongitude(oloc[1]);
                fLocation[1] = (float)pty2;

                double m = (pty2 - pty1) / _width;

                DateTime odt   = (DateTime)_dt.Rows[i][Properties.Settings.Default.StorygraphDateName];
                double   tempx = GetXFromEventdate(odt);
                double   tempy = m * tempx + pty1;

                fStory[0] = (float)(tempx + ptx1);
                fStory[1] = (float)tempy;

                st.Add(new Story(oloc, odt, fLocation, fStory, _dt.Rows[i][Properties.Settings.Default.StorygraphColorName].ToString(), _dt.Rows[i][Properties.Settings.Default.StorygraphLabelName].ToString()));
            }
            ;

            return(st);
        }