GM
Gowri Manohari D
Syncfusion Team
June 4, 2009 09:18 AM UTC
Hi Mani,
Thanks for choosing Syncfusion Products.
MeasureUnit is one of the argument of Rectangle class. For your requirement we can specify the MeasureUnits as MeasureUnits.Millimeter.The below code illustrate this.
Syncfusion.Windows.Forms.Diagram.Rectangle r = new Syncfusion.Windows.Forms.Diagram.Rectangle(100,50,100, 50, MeasureUnits.Millimeter);
diagram1.Model.AppendChild(r);
Thanks & Regards,
Gowri
KU
Kumar
June 4, 2009 10:42 AM UTC
can u explain how this measureunits works? how it draws in millimeters instead of pixels?
Regards,
Mani
GM
Gowri Manohari D
Syncfusion Team
June 5, 2009 12:14 PM UTC
Hi Mani,
All the graphics objects are Pixel Based representation units.The Diagram Control also Pixel Based Measurement.So whatever measure unit we specify it will convert to pixel.
For your requirement Measurement.MilliMeter , before drawing rectangle the system will convert into equivalent pixel representation.The below is the method used for conversion.
MeasureUnitsConverter.ToPixels(rectBounds, MeasureUnit.MilliMeter);
Thanks & Regards,
Gowri