←Select platform

Angle Property

Summary
Gets or sets a value indicating the direction of the light source producing the shadow.
Syntax
C#
C++/CLI
Python
public ShadowCommandAngle Angle { get; set; } 
public: 
property ShadowCommandAngle Angle { 
   ShadowCommandAngle get(); 
   void set (    ShadowCommandAngle ); 
} 
Angle # get and set (ShadowCommand) 

Property Value

Angle value indicating the direction of the light source producing the shadow.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.SpecialEffects; 
 
 
public void ShadowCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Master.jpg")); 
 
   // Prepare the command 
   ShadowCommand command = new ShadowCommand(); 
   command.Type = ShadowCommandType.GrayShadow; 
   command.Angle = ShadowCommandAngle.SouthEast; 
   command.Threshold = 0; 
   //Apply shadow effect  to the image. 
   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.