/// <summary>
 /// Ctor
 /// </summary>
 public GDIColorProvider()
 {
     _colorHelper = new ColorHelper();
     _samplePointService = new SamplePointService();
     _colorMapper = new ColorMapper();
     SamplePoints = _samplePointService.GetSamplePoints(.30f);
 }
Beispiel #2
0
        public AvatarLoader(
            IFileLoader fileLoader,
            IAvatarCache avatarCache,
            IColorMapper colorMapper)
        {
            _fileLoader  = fileLoader;
            _cache       = avatarCache;
            _colorMapper = colorMapper;

            _locker = new object();
        }
        public DisplayManager(CityDistrict cityModel, bool withoutFactors = false)
        {
            OptionsManager.Singleton.Load();

            _cityModel = new AnalysisDistrict(cityModel, withoutFactors);
            _pathModel = new TongJi.Network.PathFinder(_cityModel.Roads.Select(x => x.Alignment).ToList());

            _current = this;

            ColorMapper = new BiColorGradientMapper();
        }
Beispiel #4
0
        public AvatarLoader(
            IFileLoader fileLoader,
            IAvatarCache avatarCache,
            IColorMapper colorMapper)
        {
            _fileLoader  = fileLoader;
            _cache       = avatarCache;
            _colorMapper = colorMapper;

            _brushCache = new ConcurrentDictionary <long, SolidColorBrush>();
            _locker     = new object();
        }
Beispiel #5
0
        public AvatarLoader(
            IPlatform platform,
            IStorage storage,
            IFileLoader fileLoader,
            IAvatarCache avatarCache,
            IColorMapper colorMapper)
        {
            _platform    = platform;
            _storage     = storage;
            _fileLoader  = fileLoader;
            _cache       = avatarCache;
            _colorMapper = colorMapper;

            _locker = new object();
        }
        /// <summary>
        /// Ctor
        /// </summary>
        public DirectxColorProvider()
        {
            _colorHelper = new ColorHelper();
            _samplePointService = new SamplePointService();
            _colorMapper = new ColorMapper();

            PresentParameters present_params = new PresentParameters();
            if (d == null)
            {
                d = new Device(new Direct3D(), 0, DeviceType.Hardware, IntPtr.Zero, CreateFlags.SoftwareVertexProcessing, present_params);
            }
            if (_samplePoints == null)
            {
                _samplePoints = _samplePointService.GetSamplePoints(.1f);
            }

            if(_graphics == null)
            {
                _graphics = this.CreateGraphics();
            }
        }
 public LeveledColorDecorator(IColorMapper mapper, double[] levels)
 {
     _mapper = mapper;
     _levels = levels.OrderBy(x => x).ToArray();
 }