KitchenDraw SDK 2
Show / Hide Table of Contents

Method GetMagneticPoint

GetMagneticPoint(int, int, int, int, int)

Gets the closest magnetic point in the current window to the given pixel coordinates.

Declaration
public Scene.View_.MagneticPoint GetMagneticPoint(int windowWidth, int windowHeight, int pixelX, int pixelY, int magneticMargin)
Parameters
Type Name Description
int windowWidth

Width of the window (or image) for which pixel coordinate is given.

int windowHeight

Height of the window (or image) for which pixel coordinate is given.

int pixelX

X coordinate of the point to search magnetic point for.

int pixelY

Y coordinate of the point to search magnetic point for.

int magneticMargin

Margin in pixels around the given point, in pixels, that defines a square to search magnetic points in.

Returns
Type Description
Scene.View_.MagneticPoint
Remarks

You can set magneticMargin to 0 to disable magnetism and just to get pixel point converted to 3d scene coordinate.

In this article
Back to top Generated by DocFX