Scale about a locked anchor point.

 

   

Syntax
 

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

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

 

   

Params
 
Name Description
sX The amount of horizontal scaling to apply.
sY The amount of vertical scaling 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 stretches the world space about a locked anchor point. Different degrees of horizontal and vertical stretch can be used.

Another way of looking at this kind of transform is as a zoom. The anchor point is the location you're zooming in on and the scale factors indicate the level of zoom.

 

   

Example
 

Here we add two chunks of text. The default text is added in black and the magnified text is drawn in red. We specify the middle of the document as the anchor point which means that all scaling is relative to the middle of the document. Our horizontal scale factor is larger than our text has been stretched horizontally somewhat.

[C#]
Doc theDoc = new Doc();
theDoc.Rect.Inset(200, 200);
theDoc.FontSize = 48;
theDoc.AddText("Normal");
theDoc.FrameRect();
theDoc.Rect.Move(0, -100);
theDoc.Color.String = "255 0 0";
theDoc.Transform.Magnify(2, 1.5, 302, 396);
theDoc.AddText("Magnified");
theDoc.FrameRect();
theDoc.Save(Server.MapPath("transformmagnify.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Rect.Inset(200, 200)
theDoc.FontSize = 48
theDoc.AddText("Normal")
theDoc.FrameRect()
theDoc.Rect.Move(0, -100)
theDoc.Color.String = "255 0 0"
theDoc.Transform.Magnify(2, 1.5, 302, 396)
theDoc.AddText("Magnified")
theDoc.FrameRect()
theDoc.Save(Server.MapPath("transformmagnify.pdf"))
theDoc.Clear()


transformmagnify.pdf