public void DrawResult_ShouldBeFail_WhenNonExistentFont() { settings.FontFamily = "Some very strange font family"; var drawer = new TagDrawer(settings, fakeLayouter); drawer.DrawTagCloud(tags).Error.Should().Be("Font wasn't found on the system."); }
public void DrawResult_ShouldBeFail_WhenTagCloudOutOfBorder() { settings.ImageSize = new Size(25, 200); var drawer = new TagDrawer(settings, fakeLayouter); drawer.DrawTagCloud(tags).Error.Should().Be("Tag cloud didn't fit on the image.\n" + "Try increasing the image size or decreasing the font size"); }
public void TearDown() { var result = TestContext.CurrentContext.Result.Outcome.Status.Equals(TestStatus.Failed) ? "Failed" : "Successful"; var workingDirectory = Environment.CurrentDirectory; var testFullName = TestContext.CurrentContext.Test.Name; var savePath = workingDirectory + "\\" + result + "Test" + testFullName + ".bmp"; Console.WriteLine("Tag cloud visualization saved to file " + savePath); TagDrawer.Draw(savePath, cloudLayouter); }
void Start() { // Webcam initialization _webcamRaw = new WebCamTexture(Width, Height, 60); _webcamBuffer = new RenderTexture(Width, Height, 0); _readBuffer = new Color32 [Width * Height]; _webcamRaw.Play(); _webcamPreview.texture = _webcamBuffer; // Detector and drawer _detector = new AprilTag.TagDetector(Width, Height); _drawer = new TagDrawer(_tagMaterial); }
void Start() { // Webcam initialization _webcamRaw = new WebCamTexture(_resolution.x, _resolution.y, 60); _webcamBuffer = new RenderTexture(_resolution.x, _resolution.y, 0); _readBuffer = new Color32 [_resolution.x * _resolution.y]; _webcamRaw.Play(); _webcamPreview.texture = _webcamBuffer; // Detector and drawer _detector = new AprilTag.TagDetector(_resolution.x, _resolution.y, _decimation); _drawer = new TagDrawer(_tagMaterial); }
public void DrawResult_ShouldBeOk_WhenAllSettingsCorrect() { var drawer = new TagDrawer(settings, fakeLayouter); drawer.DrawTagCloud(tags).IsSuccess.Should().BeTrue(); }