~dangarner/xibo/client-141

« back to all changes in this revision

Viewing changes to client/dotNET/Rss.cs

  • Committer: Dan Garner
  • Date: 2012-11-08 21:22:20 UTC
  • Revision ID: dan@xibo.org.uk-20121108212220-oijc5k6i88aeasl0
[dotnetclient] Possible fix for text scaling issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        private int _duration;
50
50
        private bool _fitText;
51
51
 
 
52
        private RegionOptions _options;
 
53
 
52
54
        private int _numItems;
53
55
        private string _takeItemsFrom;
54
56
        private int _durationIsPerItem;
76
78
        public Rss(RegionOptions options)
77
79
            : base(options.width, options.height, options.top, options.left)
78
80
        {
 
81
            // Store the options
 
82
            _options = options;
 
83
 
 
84
            // Get the URI
79
85
            if (String.IsNullOrEmpty(options.uri))
80
86
            {
81
87
                throw new ArgumentNullException("Uri", "The Uri for the RSS feed can not be empty");
106
112
            _duration = options.duration;
107
113
            _fitText = (options.Dictionary.Get("fitText", "0") == "0" ? false : true);
108
114
 
109
 
            // Adjust the scale factor
110
 
            // Scale factor is always slightly over stated, we need to reduce it.
111
 
            _scaleFactor = options.scaleFactor * 0.85;
 
115
            // Scale factor
 
116
            _scaleFactor = options.scaleFactor;
112
117
 
113
118
            // Update interval and scrolling speed
114
119
            _updateInterval = options.updateInterval;
214
219
            headContent += "           numItems: 0,";
215
220
            headContent += "           width: " + _width + ",";
216
221
            headContent += "           height: " + _height + ",";
 
222
            headContent += "           originalWidth: " + _options.originalWidth + ",";
 
223
            headContent += "           originalHeight: " + _options.originalHeight + ",";
217
224
            headContent += "           scrollSpeed: " + _scrollSpeed + ",";
218
225
            headContent += "           fitText: " + ((!_fitText) ? "false" : "true") + ",";
219
226
            headContent += "           scaleText: " + ((_fitText) ? "false" : "true") + ",";