<commit_before>using System;
using System.Collections.Generic;
using System.Text;
using Draw = System.Drawing;
using Geo = ERY.AgateLib.Geometry;

namespace ERY.AgateLib.WinForms
{
    public static class FormsInterop
    {
        public static Draw.Rectangle ToRectangle(Geo.Rectangle rect)
        {
            return new System.Drawing.Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
        }
    }
}<commit_msg>Add converters for System.Drawing structures.<commit_after>using System;
using System.Collections.Generic;
using System.Text;
using Draw = System.Drawing;
using ERY.AgateLib.Geometry;

namespace ERY.AgateLib.WinForms
{
    public static class FormsInterop
    {
        public static Draw.Color ConvertColor(Color clr)
        {
            return Draw.Color.FromArgb(clr.ToArgb());
        }
        public static Color ConvertColor(Draw.Color clr)
        {
            return Color.FromArgb(clr.ToArgb());
        }

        public static Draw.Rectangle ConvertRectangle(Rectangle rect)
        {
            return new Draw.Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
        }
        public static Rectangle ConvertRectangle(Draw.Rectangle rect)
        {
            return new Rectangle(rect.X, rect.Y, rect.Width, rect.Height);
        }

        public static Draw.RectangleF ConvertRectangleF(RectangleF rect)
        {
            return new Draw.RectangleF(rect.X, rect.Y, rect.Width, rect.Height);
        }
        public static RectangleF ConvertRectangleF(Draw.RectangleF rect)
        {
            return new RectangleF(rect.X, rect.Y, rect.Width, rect.Height);
        }

        public static Point ConvertPoint(Draw.Point pt)
        {
            return new Point(pt.X, pt.Y);
        }
        public static Draw.Point ConvertPoint(Point pt)
        {
            return new Draw.Point(pt.X, pt.Y);
        }

        public static PointF ConvertPointF(Draw.PointF pt)
        {
            return new PointF(pt.X, pt.Y);
        }
        public static Draw.PointF ConvertPointF(PointF pt)
        {
            return new Draw.PointF(pt.X, pt.Y);
        }


        public static Size ConvertSize(Draw.Size pt)
        {
            return new Size(pt.Width, pt.Height);
        }
        public static Draw.Size ConvertSize(Size pt)
        {
            return new Draw.Size(pt.Width, pt.Height);
        }

        public static SizeF ConvertSizeF(Draw.SizeF pt)
        {
            return new SizeF(pt.Width, pt.Height);
        }
        public static Draw.SizeF ConvertSizeF(SizeF pt)
        {
            return new Draw.SizeF(pt.Width, pt.Height);
        }

    }
}
{'fraction_non_alphanumeric': 0.09187547456340167, 'fraction_numerical': 0.0, 'mean_word_length': 2.0045610034207524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '655346', 'n_tokens_mistral': 775, 'n_tokens_neox': 762, 'n_words': 180}