Skip to content

Commit

Permalink
Update for drawing package changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dme-compunet committed Aug 16, 2023
1 parent 52e13d5 commit 6b5a6b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/YoloV8/Plotting/PlottingExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public static Image PlotImage(this IClassificationResult result, Image originIma
var fill = options.FillColorPalette.GetColor(result.Class.Id);
var border = options.BorderColorPalette.GetColor(result.Class.Id);

var pen = new Pen(border, options.BorderThickness * ratio);
var pen = new SolidPen(border, options.BorderThickness * ratio);
var brush = new SolidBrush(fill);
var location = new PointF(options.XOffset * ratio, options.YOffset * ratio);

Expand Down Expand Up @@ -257,7 +257,7 @@ private static void DrawBoundingBox(IImageProcessingContext context,
if (fillOpacity > 0F)
context.Fill(color.WithAlpha(fillOpacity), polygon);

var rendered = TextMeasurer.Measure(labelText, textOptions);
var rendered = TextMeasurer.MeasureSize(labelText, textOptions);
var renderedSize = new Size((int)(rendered.Width + textPadding), (int)rendered.Height);

var location = rectangle.Location;
Expand Down

0 comments on commit 6b5a6b3

Please sign in to comment.