We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Rectangle with millimeter values

Thread ID:

Created:

Updated:

Platform:

Replies:

82201 Jun 4,2009 03:08 AM Jun 5,2009 08:14 AM Windows Forms 3
loading
Tags: Diagram
Kumar
Asked On June 4, 2009 03:08 AM

Hi,
I am using Diagram control. could u plz help me, how to draw rectangle with millimeter values?

Thanks in advance...


Gowri Manohari D [Syncfusion]
Replied On June 4, 2009 05:18 AM

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

Kumar
Replied On June 4, 2009 06:42 AM

can u explain how this measureunits works? how it draws in millimeters instead of pixels?

Regards,
Mani


Gowri Manohari D [Syncfusion]
Replied On June 5, 2009 08:14 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;