Class RectClipperService
A service used to clip a rectangular area from an image.
Inherited Members
Namespace: Gorgon.Editor.Services
Assembly: Gorgon.Editor.API.dll
Syntax
public class RectClipperService : IRectClipperService, IDisposable
Constructors
| Edit this page View SourceRectClipperService(Gorgon2D, IMarchingAnts)
Initializes a new instance of the RectClipperService class.
Declaration
public RectClipperService(Gorgon2D renderer, IMarchingAnts marchingAnts)
Parameters
Type | Name | Description |
---|---|---|
Gorgon2D | renderer | The 2D renderer for the application. |
IMarchingAnts | marchingAnts | The marching ants rectangle used to display the selection region. |
Properties
| Edit this page View SourceAllowManualInput
Property to set or return whether manual input is allowed or not.
Declaration
public bool AllowManualInput { get; set; }
Property Value
Type | Description |
---|---|
bool |
AllowMove
Property to set or return whether the selection can be moved.
Declaration
public bool AllowMove { get; set; }
Property Value
Type | Description |
---|---|
bool |
AllowResize
Property to set or return whether resizing is allowed.
Declaration
public bool AllowResize { get; set; }
Property Value
Type | Description |
---|---|
bool |
Bounds
Property to set or return the boundaries for the clipping rectangle.
Declaration
public RectangleF Bounds { get; set; }
Property Value
Type | Description |
---|---|
RectangleF |
Camera
Property to set or return the camera being used.
Declaration
public GorgonOrthoCamera Camera { get; set; }
Property Value
Type | Description |
---|---|
GorgonOrthoCamera |
ClipAgainstBoundaries
Property to set or return whether to clip the rectangle against the boundaries provided by Bounds.
Declaration
public bool ClipAgainstBoundaries { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsDragging
Property to return whether we're in the middle of a drag operation or not.
Declaration
public bool IsDragging { get; }
Property Value
Type | Description |
---|---|
bool |
Rectangle
Property to return the rectangular region marked for clipping.
Declaration
public RectangleF Rectangle { get; set; }
Property Value
Type | Description |
---|---|
RectangleF |
ShowManualInput
Property to set or return whether to show the manual input icon.
Declaration
public bool ShowManualInput { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
KeyDown(Keys, Keys)
Function called when a key is held down.
Declaration
public bool KeyDown(Keys key, Keys modifiers)
Parameters
Type | Name | Description |
---|---|---|
Keys | key | The key that was held down. |
Keys | modifiers | The modifier keys held down with the |
Returns
Type | Description |
---|---|
bool | true if the key was handled, false if it was not. |
MouseDown(MouseArgs)
Function called when the mouse button is pressed.
Declaration
public bool MouseDown(MouseArgs mouseArgs)
Parameters
Type | Name | Description |
---|---|---|
MouseArgs | mouseArgs | The arguments for the mouse events. |
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
public bool MouseMove(MouseArgs mouseArgs)
Parameters
Type | Name | Description |
---|---|---|
MouseArgs | mouseArgs | The arguments for the mouse events. |
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
public bool MouseUp(MouseArgs mouseArgs)
Parameters
Type | Name | Description |
---|---|---|
MouseArgs | mouseArgs | The arguments for the mouse events. |
Returns
Type | Description |
---|---|
bool | true if the mouse event was handled, false if it was not. |
Refresh()
Function to force a refresh of the service.
Declaration
public void Refresh()
Render()
Function to render the clipping region.
Declaration
public void Render()
Events
| Edit this page View SourceKeyboardIconClicked
Event triggered when the keyboard icon is clicked.
Declaration
public event EventHandler KeyboardIconClicked
Event Type
Type | Description |
---|---|
EventHandler |
RectChanged
Event triggered when the rectangle coordinates have been altered.
Declaration
public event EventHandler RectChanged
Event Type
Type | Description |
---|---|
EventHandler |