Skip to content

Commit

Permalink
* Added setting to Json file - RectDetectionTextSize. It defaults to …
Browse files Browse the repository at this point in the history
…12 and is the size of the text displayed for the detection rectangle/caption
  • Loading branch information
VorlonCD committed Sep 17, 2020
1 parent dd31f4c commit a2a0cae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UI/Camera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ public void MergeImageAnnotations(string OutputImageFile, ClsImageQueueItem CurI

Brush brush = new SolidBrush(color); //sets background rectangle color

System.Drawing.SizeF size = g.MeasureString(lasttext, new Font("Segoe UI Semibold", 10)); //finds size of text to draw the background rectangle
System.Drawing.SizeF size = g.MeasureString(lasttext, new Font("Segoe UI Semibold", AppSettings.Settings.RectDetectionTextSize)); //finds size of text to draw the background rectangle
g.FillRectangle(brush, xmin - 1, ymax, size.Width, size.Height); //draw grey background rectangle for detection text
g.DrawString(lasttext, new Font("Segoe UI Semibold", 10), Brushes.Black, rect); //draw detection text
g.DrawString(lasttext, new Font("Segoe UI Semibold", AppSettings.Settings.RectDetectionTextSize), Brushes.Black, rect); //draw detection text

g.Flush();

Expand Down
1 change: 1 addition & 0 deletions src/UI/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public class ClsSettings
//public int MaxDeepStackProcessTimeSeconds = 120;
public int RectRelevantColorAlpha = 150; //255=solid, 127 half transparent
public int RectIrrelevantColorAlpha = 150;
public int RectDetectionTextSize = 12;
public System.Drawing.Color RectRelevantColor = System.Drawing.Color.Red;
public System.Drawing.Color RectIrrelevantColor = System.Drawing.Color.Silver;
public string image_copy_folder = "";
Expand Down

0 comments on commit a2a0cae

Please sign in to comment.