DiagramClientView.WorldToDevice Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WorldToDevice(PointD) |
Converts a point in world units to device units using the view's current zoom factor. The point returned is relative to the DiagramClientView's top-left. |
WorldToDevice(RectangleD) |
Converts a rectangle in world units to device units using the view's current zoom factor. The rectangle returned is relative to the DiagramClientView's top-left. |
WorldToDevice(SizeD) |
Converts a size in world units to device units using the view's current zoom factor. |
WorldToDevice(SizeD, Single) |
Converts a size in world units to device units using the specified zoom factor. |
WorldToDevice(PointD)
Converts a point in world units to device units using the view's current zoom factor. The point returned is relative to the DiagramClientView's top-left.
public:
System::Drawing::Point WorldToDevice(Microsoft::VisualStudio::Modeling::Diagrams::PointD worldPoint);
public System.Drawing.Point WorldToDevice (Microsoft.VisualStudio.Modeling.Diagrams.PointD worldPoint);
member this.WorldToDevice : Microsoft.VisualStudio.Modeling.Diagrams.PointD -> System.Drawing.Point
Public Function WorldToDevice (worldPoint As PointD) As Point
Parameters
- worldPoint
- PointD
The point in world units relative to the diagram's top-left.
Returns
The point in device units relative to the DiagramClientView's top-left.
Applies to
WorldToDevice(RectangleD)
Converts a rectangle in world units to device units using the view's current zoom factor. The rectangle returned is relative to the DiagramClientView's top-left.
public:
System::Drawing::Rectangle WorldToDevice(Microsoft::VisualStudio::Modeling::Diagrams::RectangleD worldRectangle);
public System.Drawing.Rectangle WorldToDevice (Microsoft.VisualStudio.Modeling.Diagrams.RectangleD worldRectangle);
member this.WorldToDevice : Microsoft.VisualStudio.Modeling.Diagrams.RectangleD -> System.Drawing.Rectangle
Public Function WorldToDevice (worldRectangle As RectangleD) As Rectangle
Parameters
- worldRectangle
- RectangleD
The rectangle in world units relative to the diagram's top-left.
Returns
The rectangle in device units relative to the DiagramClientView's top-left.
Applies to
WorldToDevice(SizeD)
Converts a size in world units to device units using the view's current zoom factor.
public:
System::Drawing::Size WorldToDevice(Microsoft::VisualStudio::Modeling::Diagrams::SizeD worldSize);
public System.Drawing.Size WorldToDevice (Microsoft.VisualStudio.Modeling.Diagrams.SizeD worldSize);
member this.WorldToDevice : Microsoft.VisualStudio.Modeling.Diagrams.SizeD -> System.Drawing.Size
Public Function WorldToDevice (worldSize As SizeD) As Size
Parameters
- worldSize
- SizeD
The size in world units.
Returns
The size in device units.
Applies to
WorldToDevice(SizeD, Single)
Converts a size in world units to device units using the specified zoom factor.
public:
System::Drawing::Size WorldToDevice(Microsoft::VisualStudio::Modeling::Diagrams::SizeD worldSize, float zoomFactor);
public System.Drawing.Size WorldToDevice (Microsoft.VisualStudio.Modeling.Diagrams.SizeD worldSize, float zoomFactor);
member this.WorldToDevice : Microsoft.VisualStudio.Modeling.Diagrams.SizeD * single -> System.Drawing.Size
Public Function WorldToDevice (worldSize As SizeD, zoomFactor As Single) As Size
Parameters
- worldSize
- SizeD
The size in world units.
- zoomFactor
- Single
The scaling factor. 1.0f is 100%.
Returns
The size in device units.