←Select platform

HoleSize Property

Summary
Gets or sets the hole size.
Syntax
C#
C++/CLI
Python
public int HoleSize { get; set; } 
public: 
property int HoleSize { 
   int get(); 
   void set (    int ); 
} 
HoleSize # get and set (DrawStarCommand) 

Property Value

The hole size. This value is given as a percent of the whole star from which the rays start or in which they end. The valid range is from 0 to 100.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.SpecialEffects; 
 
 
public void DrawStarCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "ImageProcessingDemo\\Image3.cmp")); 
 
   // Prepare the command 
   DrawStarCommand command = new DrawStarCommand(); 
 
   command.CenterPoint = new LeadPoint(image.Width / 2, image.Height / 2); 
   command.Spoke = 5; 
   command.StarWidth = image.Width / 2; 
   command.StarHeight = image.Height / 2; 
   command.HoleSize = 50; 
   command.Phase = 0; 
   command.Angle = 0; 
   command.DistanceOpacity = 0; 
   command.SpokeDivision = 0; 
   command.AngleOpacity = 0; 
   command.BorderOpacity = 0; 
   command.LowerColorFill = new RasterColor(255, 0, 0); 
   command.UpperColorFill = new RasterColor(0, 0, 255); 
   command.Opacity = 100; 
   command.Flags = DrawStarCommandFlags.Inside; 
 
   command.Run(image); 
   codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.SpecialEffects Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.