diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-05-29 06:14:03 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-05-29 06:14:03 +0300 |
commit | d90f7e6f75873f40dcfe807752522b4c1baa751e (patch) | |
tree | 3fab7b5faca785983f0444b0654d6314351f6d36 /UVtools.ScriptSample | |
parent | ff4e0dfe28572b151b4831f905110eeeaf57fb62 (diff) |
v2.13.1v2.13.1
- (Add) Layer preview - Outline: Skeletonize
- (Add) Actions - Export layers to skeleton: Export a layer range to a skeletonized image that is the sum of each layer skeleton
- (Add) Pixel editor - Text: Allow to rotate text placement by any angle (#206)
- (Add) Calibrate - XYZ Accuracy: Drain hole diameter (#205)
Diffstat (limited to 'UVtools.ScriptSample')
-rw-r--r-- | UVtools.ScriptSample/ScriptTestPerLayerSettingsSample.cs | 16 | ||||
-rw-r--r-- | UVtools.ScriptSample/ScriptVATClean.cs | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/UVtools.ScriptSample/ScriptTestPerLayerSettingsSample.cs b/UVtools.ScriptSample/ScriptTestPerLayerSettingsSample.cs index 70e283c..5e1dbde 100644 --- a/UVtools.ScriptSample/ScriptTestPerLayerSettingsSample.cs +++ b/UVtools.ScriptSample/ScriptTestPerLayerSettingsSample.cs @@ -89,27 +89,27 @@ namespace UVtools.ScriptSample // Do the left eye x = xCenter - noseThickness/2 - faceSpacing - eyeDiameter/2; y = faceSpacing; - CvInvoke.Circle(mats[0], new Point(x, y), eyeDiameter/2, EmguExtensions.WhiteByte, -1, lineType); - CvInvoke.Circle(mats[1], new Point(x, y), eyeDiameter/2, EmguExtensions.WhiteByte, -1, lineType); + CvInvoke.Circle(mats[0], new Point(x, y), eyeDiameter/2, EmguExtensions.WhiteColor, -1, lineType); + CvInvoke.Circle(mats[1], new Point(x, y), eyeDiameter/2, EmguExtensions.WhiteColor, -1, lineType); Progress++; // Do the right eye, the mirror of left... x = (int)(SlicerFile.ResolutionX - x); - CvInvoke.Circle(mats[0], new Point(x, y), eyeDiameter / 2, EmguExtensions.WhiteByte, -1, lineType); - CvInvoke.Circle(mats[3], new Point(x, y), eyeDiameter / 2, EmguExtensions.WhiteByte, -1, lineType); + CvInvoke.Circle(mats[0], new Point(x, y), eyeDiameter / 2, EmguExtensions.WhiteColor, -1, lineType); + CvInvoke.Circle(mats[3], new Point(x, y), eyeDiameter / 2, EmguExtensions.WhiteColor, -1, lineType); Progress++; // Do the noose x = xCenter - noseThickness / 2; - CvInvoke.Rectangle(mats[0], new Rectangle(x, y, noseThickness, noseHeight), EmguExtensions.WhiteByte, -1, lineType); - CvInvoke.Rectangle(mats[2], new Rectangle(x, y, noseThickness, noseHeight), EmguExtensions.WhiteByte, -1, lineType); + CvInvoke.Rectangle(mats[0], new Rectangle(x, y, noseThickness, noseHeight), EmguExtensions.WhiteColor, -1, lineType); + CvInvoke.Rectangle(mats[2], new Rectangle(x, y, noseThickness, noseHeight), EmguExtensions.WhiteColor, -1, lineType); Progress++; // Do the mouth x = xCenter; y += noseHeight + faceSpacing; - CvInvoke.Ellipse(mats[0], new Point(x, y), new Size(eyeDiameter+faceSpacing+noseThickness/2, mouthHeight), 0, 0, 180, EmguExtensions.WhiteByte, -1, lineType); - CvInvoke.Ellipse(mats[4], new Point(x, y), new Size(eyeDiameter+faceSpacing+noseThickness/2, mouthHeight), 0, 0, 180, EmguExtensions.WhiteByte, -1, lineType); + CvInvoke.Ellipse(mats[0], new Point(x, y), new Size(eyeDiameter+faceSpacing+noseThickness/2, mouthHeight), 0, 0, 180, EmguExtensions.WhiteColor, -1, lineType); + CvInvoke.Ellipse(mats[4], new Point(x, y), new Size(eyeDiameter+faceSpacing+noseThickness/2, mouthHeight), 0, 0, 180, EmguExtensions.WhiteColor, -1, lineType); SlicerFile.LayerManager.AllocateAndSetFromMat(mats); // Replace layers and rebuild properties diff --git a/UVtools.ScriptSample/ScriptVATClean.cs b/UVtools.ScriptSample/ScriptVATClean.cs index aefee4c..bd769b5 100644 --- a/UVtools.ScriptSample/ScriptVATClean.cs +++ b/UVtools.ScriptSample/ScriptVATClean.cs @@ -91,7 +91,7 @@ namespace UVtools.ScriptSample CvInvoke.Rectangle(mat, new Rectangle( new Point(InputInset.Value, InputInset.Value), new Size((int) (SlicerFile.ResolutionX - InputInset.Value*2)-1, (int) (SlicerFile.ResolutionY - InputInset.Value*2)-1) - ), EmguExtensions.WhiteByte, -1, LineType.FourConnected); + ), EmguExtensions.WhiteColor, -1, LineType.FourConnected); layer.LayerMat = mat; SlicerFile.SuppressRebuildPropertiesWork(() => @@ -132,8 +132,8 @@ namespace UVtools.ScriptSample CvInvoke.Line(thumbnail, new Point(xSpacing, ySpacing + 5), new Point(thumbnail.Width - xSpacing, ySpacing + 5), new MCvScalar(255, 27, 245), 3); CvInvoke.Line(thumbnail, new Point(thumbnail.Width - xSpacing, 0), new Point(thumbnail.Width - xSpacing, ySpacing + 5), new MCvScalar(255, 27, 245), 3); CvInvoke.PutText(thumbnail, "VAT Clean Utility", new Point(xSpacing, ySpacing * 2), fontFace, fontScale, new MCvScalar(0, 255, 255), fontThickness); - CvInvoke.PutText(thumbnail, $"Exposure time: {SlicerFile.ExposureTime}s", new Point(xSpacing, ySpacing * 3), fontFace, fontScale, EmguExtensions.White3Byte, fontThickness); - CvInvoke.PutText(thumbnail, $"Use the spatula in!", new Point(xSpacing, ySpacing * 4), fontFace, fontScale, EmguExtensions.White3Byte, fontThickness); + CvInvoke.PutText(thumbnail, $"Exposure time: {SlicerFile.ExposureTime}s", new Point(xSpacing, ySpacing * 3), fontFace, fontScale, EmguExtensions.WhiteColor, fontThickness); + CvInvoke.PutText(thumbnail, $"Use the spatula in!", new Point(xSpacing, ySpacing * 4), fontFace, fontScale, EmguExtensions.WhiteColor, fontThickness); return thumbnail; } |