60001058 Display a drawing with different x,y scale factor.

Article 60001058
Type Wish
Product Engine
Date Added 1/8/2010 12:00:00 AM
Fixed (3/11/2010 12:00:00 AM)
Submitted by Mario Perino

Summary

Display a drawing with different scale factor. Also Ruler scale not change according World2View matrix scale.

Solution

This can be done by changing the World2ViewMatrix property of document as follow:

   Matrix m = new Matrix();
   //the Y values are scaling by 2.5
   m.ScaleMatrix(1.0d,2.5d,1.0d);
   doc.World2ViewMatrix = m;
   doc.Redraw(true);

In version 6018 , in order not to strech the vdText and vdMtext objects a new property StrechText was added in vdRenderGlobalProperties.
Specifies if vdText and vdMtext entities will be streched when the selected WorldToView matrix has different x,y scales.
This property is applied into Horizontal or Vertical vdMetext and vdText objects that belong into a Layout entities collection or are sub entities of a vdDimension object.
Default value is true.

Example:

doc.GlobalRenderProperties.StrechText = false;
Matrix m = new Matrix();
m.ScaleMatrix(1.0d, 2.5d, 1.0d);
doc.World2ViewMatrix = m;
doc.Redraw(true);

In version 6018 Ruler displaying values was fixed to follow the selected World2View matrix x,y scales

Send comments on this topic.