Skew horizontally and vertically about a locked anchor point.

 

   

Syntax
 

[C#]
virtual void Skew(double sX, double sY, double aX, double aY)

[Visual Basic]
Sub Skew(ByVal sX As Double, ByVal sY As Double, ByVal aX As Double, ByVal aY As Double)

 

   

Params
 
Name Description
sX The amount of horizontal skewing to apply.
sY The amount of vertical skewing to apply.
aX The horizontal coordinate about which the stretch should be applied.
aY The vertical coordinate about which the stretch should be applied.

 

   

Notes
 

This method skews the world space about a locked anchor point. Different degrees of horizontal and vertical stretch can be used.

A skew or shear is a mathematical operation which shifts points by an amount proportional to the distance from the anchor point. This shift is scaled by the horizontal and vertical skew factors.

 

   

Example
 

Here we draw two rectangles into our document. The black rectangle is drawn before the skew operation and the red one is drawn after it.

[C#]
Doc theDoc = new Doc();
theDoc.Rect.Width = 200;
theDoc.Rect.Height = 250;
theDoc.Rect.Position(20, 20);
theDoc.Width = 20;
theDoc.FrameRect();
theDoc.Transform.Skew(1.5, 1.5, 20, 20);
theDoc.Color.String = "255 0 0"; // red
theDoc.FrameRect();
theDoc.Save(Server.MapPath("transformskew.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Rect.Width = 200
theDoc.Rect.Height = 250
theDoc.Rect.Position(20, 20)
theDoc.Width = 20
theDoc.FrameRect()
theDoc.Transform.Skew(1.5, 1.5, 20, 20)
theDoc.Color.String = "255 0 0" ' red
theDoc.FrameRect()
theDoc.Save(Server.MapPath("transformskew.pdf"))
theDoc.Clear()


transformskew.pdf