←Select platform

CenterPoint Property

Summary
Get or sets the point structure that contains the star center.
Syntax
C#
C++/CLI
Python
public LeadPoint CenterPoint { get; set; } 
public: 
property LeadPoint CenterPoint { 
   LeadPoint get(); 
   void set (    LeadPoint ); 
} 
CenterPoint # get and set (DrawStarCommand) 

Property Value

Pointe structure that contains the star center.

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.