Ejemplo n.º 1
0
 /// <summary>
 /// Ctor
 /// </summary>
 public GDIColorProvider()
 {
     _colorHelper = new ColorHelper();
     _samplePointService = new SamplePointService();
     _colorMapper = new ColorMapper();
     SamplePoints = _samplePointService.GetSamplePoints(.30f);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Ctor
        /// </summary>
        public DirectxColorProvider()
        {
            _colorHelper = new ColorHelper();
            _samplePointService = new SamplePointService();

            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();
            }
        }