<commit_before>package org.lasarobotics.vision.image;

import org.lasarobotics.vision.detection.objects.Contour;
import org.lasarobotics.vision.detection.objects.Ellipse;
import org.lasarobotics.vision.detection.objects.Rectangle;
import org.lasarobotics.vision.util.color.Color;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfPoint;
import org.opencv.core.Point;
import org.opencv.imgproc.Imgproc;

import java.util.ArrayList;
import java.util.List;

/**
 * Methods for drawing shapes onto images
 */
public class Drawing {
    public static void drawCircle(Mat img, Point center, int diameter, Color color)
    {
        drawCircle(img, center, diameter, color, 2);
    }
    public static void drawCircle(Mat img, Point center, int diameter, Color color, int thickness)
    {
        Imgproc.circle(img, center, diameter, color.getScalarRGBA(), thickness);
    }
    public static void drawEllipse(Mat img, Ellipse ellipse, Color color)
    {
        drawEllipse(img, ellipse, color, 2);
    }
    public static void drawEllipse(Mat img, Ellipse ellipse, Color color, int thickness)
    {
        Imgproc.ellipse(img, ellipse.getRect(), color.getScalarRGBA(), thickness);
    }
    public static void drawEllipses(Mat img, List<Ellipse> ellipses, Color color)
    {
        drawEllipses(img, ellipses, color, 2);
    }
    public static void drawEllipses(Mat img, List<Ellipse> ellipses, Color color, int thickness)
    {
        for (Ellipse ellipse : ellipses)
            Imgproc.ellipse(img, ellipse.getRect(), color.getScalarRGBA(), thickness);
    }

    public enum Anchor
    {
        TOPLEFT,
        BOTTOMLEFT,<commit_msg>Auto merge of #36 - lasarobotics:bugfix-ellipse, r=smo-key<commit_after>package org.lasarobotics.vision.image;

import org.lasarobotics.vision.detection.objects.Contour;
import org.lasarobotics.vision.detection.objects.Ellipse;
import org.lasarobotics.vision.detection.objects.Rectangle;
import org.lasarobotics.vision.util.color.Color;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfPoint;
import org.opencv.core.Point;
import org.opencv.imgproc.Imgproc;

import java.util.ArrayList;
import java.util.List;

/**
 * Methods for drawing shapes onto images
 */
public class Drawing {
    public static void drawCircle(Mat img, Point center, int diameter, Color color)
    {
        drawCircle(img, center, diameter, color, 2);
    }
    public static void drawCircle(Mat img, Point center, int diameter, Color color, int thickness)
    {
        Imgproc.circle(img, center, diameter, color.getScalarRGBA(), thickness);
    }
    public static void drawEllipse(Mat img, Ellipse ellipse, Color color)
    {
        drawEllipse(img, ellipse, color, 2);
    }
    public static void drawEllipse(Mat img, Ellipse ellipse, Color color, int thickness)
    {
        Imgproc.ellipse(img, ellipse.center(), ellipse.size(), ellipse.angle(), 0, 360, color.getScalarRGBA(), thickness);
    }
    public static void drawEllipses(Mat img, List<Ellipse> ellipses, Color color)
    {
        drawEllipses(img, ellipses, color, 2);
    }
    public static void drawEllipses(Mat img, List<Ellipse> ellipses, Color color, int thickness)
    {
        for (Ellipse ellipse : ellipses)
            drawEllipse(img, ellipse, color, thickness);
    }
    public static void drawArc(Mat img, Ellipse ellipse, Color color, double angleDegrees)
    {
        drawArc(img, ellipse, color, angleDegrees, 2);
    }
    public static void drawArc(Mat img, Ellipse ellipse, Color color, double angleDegrees, int thickness)
    {
        Imgproc.ellipse(img, ellipse.center(), ellipse.size(), ellipse.angle(), 0, angleDegrees, color.getScalarRGBA(), thickness);
    }

    public enum Anchor
    {
        TOPLEFT,
        BOTTOMLEFT,
{'fraction_non_alphanumeric': 0.1041174927878311, 'fraction_numerical': 0.0036716496197220037, 'mean_word_length': 3.623030303030303, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1374229', 'n_tokens_mistral': 1306, 'n_tokens_neox': 1218, 'n_words': 309}