public SamplePoints GetSamplePoints(float screenPercentage) { var samplePoints = new SamplePoints(); // Get the box sizing samplePoints.CenterBox = GetCenterBox(screenPercentage); // Get the sample points samplePoints.Points = GenerateSamplePoints(samplePoints.CenterBox); return samplePoints; }
/// <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(); } }