Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Шевырин Никита #245

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

alexadralt
Copy link

No description provided.


[TestFixture]
[TestOf(typeof(CircularCloudLayouter))]
public class CircularCloudLayouterTest

This comment was marked as resolved.

var isCenterTest = context.Test.MethodName.Contains(nameof(RectanglesCommonBarycenterIsCloseToTheProvidedCenter));
if (isCenterTest)
{
graphics.DrawEllipse(

This comment was marked as resolved.

graphics.Clear(Color.White);
graphics.DrawRectangles(new Pen(Color.Blue), rectangles);

var isCenterTest = context.Test.MethodName.Contains(nameof(RectanglesCommonBarycenterIsCloseToTheProvidedCenter));

This comment was marked as resolved.

return new CircularCloudLayouter(new Point(centerX, centerY));
}

private readonly struct RectanglePair(Rectangle rectangle1, Rectangle rectangle2)

This comment was marked as resolved.

deviationFromCenter.Should().BeLessOrEqualTo(maxDistanceFromBarycenter * maxDistanceFromBarycenter);
}

private static object[][] IntersectionTestSource()

This comment was marked as resolved.

public Rectangle PutNextRectangle(Size rectangleSize)
{
if (rectangleSize.Width <= 0 || rectangleSize.Height <= 0)
throw new ArgumentException("rectangle width and height must be greater than 0");

This comment was marked as resolved.


private static readonly double angleStep = Math.PI / 2;
private static readonly float tracingStep = 0.01f;
private static readonly float maxTracingDistance = 500f;

This comment was marked as resolved.

@@ -0,0 +1,3 @@
// See https://aka.ms/new-console-template for more information

Console.WriteLine("Hello, World!");

This comment was marked as resolved.

var bitmap = new Bitmap(1000, 1000);
var graphics = Graphics.FromImage(bitmap);
graphics.Clear(Color.White);
graphics.DrawRectangles(new Pen(Color.Blue), rectangles);

This comment was marked as resolved.

using NUnit.Framework;
using NUnit.Framework.Interfaces;

namespace TagsCloudVisualization.Tests;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хочется тест на то, что прямоугольники действительно располагаются по спирали

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Насколько я понял, в задании не требуется располагать их именно по спирали, да и я немного другой алгоритм реализовал

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants