Inline UpdateMappingFromPerson

This commit is contained in:
2023-03-24 21:57:29 -07:00
parent c48a30f42f
commit 90b3f93e6e
4 changed files with 86 additions and 97 deletions

View File

@ -237,6 +237,7 @@ public class D2_FaceParts
{
int x;
int y;
Pen pen;
string? firstFileName = null;
using Image image = Image.FromFile(resizedFileHolder.FullName);
using Graphics graphic = Graphics.FromImage(image);
@ -253,7 +254,8 @@ public class D2_FaceParts
{
if (face.Location is null)
continue;
graphic.DrawEllipse(Pens.GreenYellow, facePoint.X - pointSize, facePoint.Y - pointSize, pointSize * 2, pointSize * 2);
pen = face.Mapping?.MappingFromPerson is null ? Pens.Red : Pens.GreenYellow;
graphic.DrawEllipse(pen, facePoint.X - pointSize, facePoint.Y - pointSize, pointSize * 2, pointSize * 2);
}
if (facePart == FacePart.Chin)
continue;