←Select platform

Angle Property

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

Property Value

Angle to rotate the star. 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 star clockwise, while a negative value will rotate the star 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:\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.