ToVector2()

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Common > Charts > Rendering > DxExtensions >

ToVector2()

Previous page Return to chapter overview Next page

Definition

Converts a System.Windows.Point structure to a SharpDX.Vector2 used for SharpDX rendering.

 

Method Return Value

A new SharpDX.Vector2 constructed with the point parameters X and Y values

 

Syntax

DxExtensions.ToVector2(this System.Windows.Point point)
<point>.ToVector2()

 

Parameters

point

The System.Windows.Point point to convert

 

 

Example

ns


// gets the application/user WPF point and converts to a SharpDX Vector
System.Windows.Point wpfPoint = ChartControl.MouseDownPoint;
 
SharpDX.Vector2 dxVector2 = wpfPoint.ToVector2();