Back to Devexpress

ReflectionEffect.HorizontalSkew Property

officefileapi-devexpress-dot-docs-dot-presentation-dot-reflectioneffect-dce57802.md

latest6.0 KB
Original Source

ReflectionEffect.HorizontalSkew Property

Gets or sets the horizontal skew angle of the reflection effect.

Namespace : DevExpress.Docs.Presentation

Assembly : DevExpress.Docs.Presentation.v25.2.dll

NuGet Package : DevExpress.Docs.Presentation

Declaration

csharp
public float HorizontalSkew { get; set; }
vb
Public Property HorizontalSkew As Single

Property Value

TypeDescription
Single

The horizontal skew angle in degrees in the (-90, 90) range.

|

Remarks

The ReflectionEffect class exposes properties that you can use to configure the reflection effect:

AngleSpecifies the angle of the reflection effect in degrees.BlurRadiusSpecifies the blur radius of the reflection effect.DistanceSpecifies how far to offset the reflection relative to the shape.StartOpacity | EndOpacitySpecifies the start and end opacity of the reflection effect.StartPosition | EndPositionSpecifies the start and end position of the reflection effect.FadeAngleSpecifies the fade angle of the reflection effect.HorizontalScale | VerticalScaleSpecifies the horizontal and vertical scale factors of the reflection effect.HorizontalSkew | VerticalSkewSpecifies the horizontal and vertical skew angles of the reflection effect. This property is measured in degrees and can have values in the (-90, 90) range.RotateWithShapeSpecifies whether the reflection effect rotates with the shape.

The following code snippet applies a reflection effect to a shape:

csharp
using DevExpress.Docs.Presentation;
using System.Drawing;

namespace PresentationApiSample;

public class Program {
    public static void Main(string[] _) {

        Presentation presentation = new Presentation();
        presentation.Slides.Clear();

        Slide slide = new Slide(SlideLayoutType.Blank);
        presentation.Slides.Add(slide);

        Shape shape1 = new Shape(ShapeType.Rectangle);
        shape1.Outline = new OutlineStyle { Fill = new SolidFill(Color.RoyalBlue), Width = 8 };
        shape1.Fill = new SolidFill(Color.RoyalBlue);
        shape1.X = 1100;
        shape1.Y = 1100;
        shape1.Width = 300;
        shape1.Height = 300;
        slide.Shapes.Add(shape1);

        ShapeEffectProperties e_properties = new ShapeEffectProperties();
        e_properties.Reflection = new ReflectionEffect {
            Angle = 45,
            BlurRadius = 50,
            Distance = 50,
            StartOpacity = 0,
            EndOpacity = 100,
            StartPosition = 0,
            EndPosition = 100,
            FadeAngle = 45,
            HorizontalScale = 100,
            VerticalScale = 100,
            HorizontalSkew = 0,
            VerticalSkew = 0,
            RotateWithShape = true,
            ShadowAlignment = RectangleAlignType.Center
        };
        shape1.Effects = e_properties;
    }
}
vb
Imports DevExpress.Docs.Presentation
Imports System.Drawing

Namespace PresentationApiSample

    Public Class Program
        Public Shared Sub Main(ByVal args As String())

            Dim presentation As New Presentation()
            presentation.Slides.Clear()

            Dim slide As New Slide(SlideLayoutType.Blank)
            presentation.Slides.Add(slide)

            Dim shape1 As New Shape(ShapeType.Rectangle)
            shape1.Outline = New OutlineStyle With {
                .Fill = New SolidFill(Color.RoyalBlue),
                .Width = 8
            }
            shape1.Fill = New SolidFill(Color.RoyalBlue)
            shape1.X = 1100
            shape1.Y = 1100
            shape1.Width = 300
            shape1.Height = 300
            slide.Shapes.Add(shape1)

            Dim e_properties As New ShapeEffectProperties()
            e_properties.Reflection = New ReflectionEffect With {
                .Angle = 45,
                .BlurRadius = 50,
                .Distance = 50,
                .StartOpacity = 0,
                .EndOpacity = 100,
                .StartPosition = 0,
                .EndPosition = 100,
                .FadeAngle = 45,
                .HorizontalScale = 100,
                .VerticalScale = 100,
                .HorizontalSkew = 0,
                .VerticalSkew = 0,
                .RotateWithShape = True,
                .ShadowAlignment = RectangleAlignType.Center
            }
            shape1.Effects = e_properties
        End Sub
    End Class

End Namespace

See Also

ReflectionEffect Class

ReflectionEffect Members

DevExpress.Docs.Presentation Namespace