Spread Windows Forms 12.0 Product Documentation
PictureRotationAngle Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.DrawingSpace Namespace > PSObject Class : PictureRotationAngle Property
Gets or sets the picture rotation angle of the object.
Syntax
'Declaration
 
Public Overridable Property PictureRotationAngle As Single
'Usage
 
Dim instance As PSObject
Dim value As Single
 
instance.PictureRotationAngle = value
 
value = instance.PictureRotationAngle
public virtual float PictureRotationAngle {get; set;}

Property Value

Single-precision, floating-point number representing the angle that the picture is rotated
Remarks

This property can be overridden by the setting in the PictureOrientation property.

This property is available at run time only.

Example
This example shows the use of the property in customizing a shape to illustrate the use of the property for classes that inherit this property.
System.Drawing.Point[] pts = {new System.Drawing.Point(25, 0), 
                            new System.Drawing.Point(0, 50), 
                            new System.Drawing.Point(20, 50), 
                            new System.Drawing.Point((int)2.5, 100), 
                            new System.Drawing.Point(40, 40), 
                            new System.Drawing.Point(20, 40), 
                            new System.Drawing.Point(40, 0), 
                            new System.Drawing.Point(25, 0)};

System.Drawing.Drawing2D.GraphicsPath gpath = new System.Drawing.Drawing2D.GraphicsPath();
gpath.AddPolygon(pts);

Point pt = new Point(150, 60);
FarPoint.Win.Picture pic = new FarPoint.Win.Picture(Image.FromFile("d:\\images\\gwashington.bmp"));

FarPoint.Win.Spread.DrawingSpace.PSObject pso = new FarPoint.Win.Spread.DrawingSpace.CustomShape();
pso.BackColor = Color.Black;
pso.AlphaBlendBackColor = 90;
pso.Enabled = true;
pso.CanMove = FarPoint.Win.Spread.DrawingSpace.Moving.HorizontalAndVertical;
pso.CanRotate = true;
pso.CanSize = FarPoint.Win.Spread.DrawingSpace.Sizing.HeightAndWidth;
pso.Shape = gpath;
pso.SetBounds(250, 250, 120, 120);
pso.Location = pt;
pso.BackgroundImage = pic;
pso.PictureRotationAngle = 20;
fpSpread1.ActiveSheet.AddShape((FarPoint.Win.Spread.DrawingSpace.PSShape)pso);
Dim pts As System.Drawing.Point() = {New System.Drawing.Point(25, 0),  _
                            New System.Drawing.Point(0, 50),  _
                            New System.Drawing.Point(20, 50),  _
                            New System.Drawing.Point(2.5, 100),  _
                            New System.Drawing.Point(40, 40),  _
                            New System.Drawing.Point(20, 40),  _
                            New System.Drawing.Point(40, 0),  _
                            New System.Drawing.Point(25, 0)}

Dim gpath As System.Drawing.Drawing2D.GraphicsPath = New System.Drawing.Drawing2D.GraphicsPath
gpath.AddPolygon(pts)

dim pt As New Point(150, 60)
Dim pic As New FarPoint.Win.Picture(Image.FromFile("d:\images\gwashington.bmp"))


Dim pso As New FarPoint.Win.Spread.DrawingSpace.CustomShape
pso.BackColor = Color.Black
pso.AlphaBlendBackColor = 90
pso.Enabled = True
pso.CanMove = FarPoint.Win.Spread.DrawingSpace.Moving.HorizontalAndVertical
pso.CanRotate = True
pso.CanSize = FarPoint.Win.Spread.DrawingSpace.Sizing.HeightAndWidth
pso.Shape = gpath
pso.SetBounds(40, 40, 60, 60)
pso.Location = pt
pso.BackgroundImage = pic
pso.PictureRotationAngle = 20
FpSpread1.ActiveSheet.AddShape(pso)
See Also

Reference

PSObject Class
PSObject Members