Vector2 FromScene( Vector2 pos )
Rect FromScene( Rect pos )

book_4_sparkGenerated
code_blocksInput

Description

The FromScene method in the Editor.GraphicsView class is used to convert a position from scene coordinates to view coordinates. This is useful when you need to map a point from the scene's coordinate system to the view's coordinate system, which is typically used for rendering or interaction purposes.

Usage

To use the FromScene method, you need to have an instance of the GraphicsView class. You can then call this method by passing a Vector2 representing the position in the scene that you want to convert to view coordinates.

Example usage:

GraphicsView graphicsView = new GraphicsView();
Vector2 scenePosition = new Vector2(100, 200);
Vector2 viewPosition = graphicsView.FromScene(scenePosition);

In this example, scenePosition is the point in the scene's coordinate system, and viewPosition will be the corresponding point in the view's coordinate system.

Example

GraphicsView graphicsView = new GraphicsView();
Vector2 scenePosition = new Vector2(100, 200);
Vector2 viewPosition = graphicsView.FromScene(scenePosition);