Interface IAnchorEditService
A service used to edit an anchor point on a sprite.
Namespace: Gorgon.Editor.Services
Assembly: Gorgon.Editor.API.dll
Syntax
public interface IAnchorEditService
Remarks
Use this service when rendering the UI for editing the Anchor on a GorgonSprite. Plug in developers should use this to provide interaction with the anchor point.
Properties
| Edit this page View SourceAnchorPosition
Property to set or return the position of the sprite anchor.
Declaration
Vector2 AnchorPosition { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Camera
Property to set or return the camera for the renderer.
Declaration
GorgonOrthoCamera Camera { get; set; }
Property Value
Type | Description |
---|---|
GorgonOrthoCamera |
CenterPosition
Property to set or return the center position of the sprite.
Declaration
Vector2 CenterPosition { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
IsDragging
Property to return whether we're in the middle of a drag operation or not.
Declaration
bool IsDragging { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceKeyDown(PreviewKeyDownEventArgs)
Function to intercept keyboard key presses.
Declaration
bool KeyDown(PreviewKeyDownEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
PreviewKeyDownEventArgs | e | The event arguments. |
Returns
Type | Description |
---|---|
bool | true if the event is handled, false if not. |
MouseDown(MouseArgs)
Function called when the mouse button is pressed.
Declaration
bool MouseDown(MouseArgs args)
Parameters
Type | Name | Description |
---|---|---|
MouseArgs | args | The mouse event arguments. |
Returns
Type | Description |
---|---|
bool | true if the mouse event was handled, false if it was not. |
MouseMove(MouseArgs)
Function called when the mouse button is moved.
Declaration
bool MouseMove(MouseArgs args)
Parameters
Type | Name | Description |
---|---|---|
MouseArgs | args | The mouse event arguments. |
Returns
Type | Description |
---|---|
bool | true if the mouse event was handled, false if it was not. |
MouseUp(MouseArgs)
Function called when the mouse button is released.
Declaration
bool MouseUp(MouseArgs args)
Parameters
Type | Name | Description |
---|---|---|
MouseArgs | args | The event arguments.. |
Returns
Type | Description |
---|---|
bool | true if the mouse event was handled, false if it was not. |
Render()
Function to render the anchor UI.
Declaration
void Render()
Reset()
Function to reset the anchor value.
Declaration
void Reset()
Events
| Edit this page View SourceAnchorChanged
Event triggered when the anchor position is updated.
Declaration
event EventHandler AnchorChanged
Event Type
Type | Description |
---|---|
EventHandler |