←Select platform

Phase Property

Summary
Gets or sets the angle to shift the star's rays.
Syntax
C#
C++/CLI
Python
public int Phase { get; set; } 
public: 
property int Phase { 
   int get(); 
   void set (    int ); 
} 
Phase # get and set (DrawStarCommand) 

Property Value

Angle to shift the star's rays. This value is given in hundredths of a degree (+/-). This can be a number from 0 to 36,000. A positive value will rotate the rays clockwise, while a negative value will rotate the rays counter-clockwise.

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:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.