C# Class Sphere_Editor.EditorComponents.ImageEditorControl

Inheritance: System.Windows.Forms.UserControl
Datei anzeigen Open project: Radnen/spherestudio

Public Methods

Method Description
Blur ( int h, int v ) : void
ColorNoise ( ) : void
Copy ( ) : void
Destroy ( ) : void
GetEditorImageTiles ( int tw, int th ) : Sphere_Editor.EditorComponents.TileImage[]
ImageEditorControl ( ) : System
InvertColors ( ) : void
MonoNoise ( ) : void
Paste ( ) : void
RedoAction ( ) : void
ReplacePixels ( Color oldCol, Color newCol ) : void
ResizeImage ( int width, int height, bool scale, InterpolationMode mode ) : void

Resizes the image to new bounds.

SetImage ( Bitmap img ) : void
SetSize ( int width, int height ) : void
SetTileImageMap ( Bitmap img, short indices ) : void
SetZoom ( int zoom ) : void
Slide ( int ox, int oy ) : void

Draws the image slid to the new position.

ToGrayscale ( ) : void
ToggleGrid ( ) : void
UndoAction ( ) : void
UpdateControl ( ) : void

Positions the object in the middle of its container. Also toggles scrollbars where apropriate.

UpdateScrollbars ( ) : void
UpdateUndoRedoItems ( ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnScroll ( ScrollEventArgs se ) : void
ScrollToControl ( Control activeControl ) : Point

Private Methods

Method Description
AddPage ( List pages, bool all ) : void
BlurItem_Click ( object sender, EventArgs e ) : void
ClearHistory ( ) : void
CopyImageItem_Click ( object sender, EventArgs e ) : void
DoTool ( Graphics g ) : void
DownItem_Click ( object sender, EventArgs e ) : void
DrawBG ( Graphics g ) : void
DrawGrid ( Graphics g ) : void

Draws the grid image X*Y times, depending on the size of the control.

DrawTool ( Graphics g ) : void
Flatten ( ) : void
FlipHorizontalItem_Click ( object sender, EventArgs e ) : void
FlipVerticalItem_Click ( object sender, EventArgs e ) : void
Gauss ( System.Single x, System.Single middle, System.Single width ) : System.Single
GetPixelItem_Click ( object sender, EventArgs e ) : void
GrayscaleItem_Click ( object sender, EventArgs e ) : void
ImageEditorControl_KeyDown ( object sender, KeyEventArgs e ) : void
ImageEditorControl_KeyUp ( object sender, KeyEventArgs e ) : void
ImageEditorControl_Load ( object sender, EventArgs e ) : void
ImageEditorControl_MouseDown ( object sender, MouseEventArgs e ) : void
ImageEditorControl_MouseMove ( object sender, MouseEventArgs e ) : void
ImageEditorControl_MouseUp ( object sender, MouseEventArgs e ) : void
ImageEditorControl_Paint ( object sender, PaintEventArgs e ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

InvertColorItem_Click ( object sender, EventArgs e ) : void
LeftItem_Click ( object sender, EventArgs e ) : void
MonoNoiseItem_Click ( object sender, EventArgs e ) : void
NoiseItem_Click ( object sender, EventArgs e ) : void
PasteImageItem_Click ( object sender, EventArgs e ) : void
RedoMenuItem_Click ( object sender, EventArgs e ) : void
ReplacePixelsItem_Click ( object sender, EventArgs e ) : void
RightItem_Click ( object sender, EventArgs e ) : void
RotateCCWItem_Click ( object sender, EventArgs e ) : void
RotateCWItem_Click ( object sender, EventArgs e ) : void
ToggleGridItem_Click ( object sender, EventArgs e ) : void
UndoMenuItem_Click ( object sender, EventArgs e ) : void
UpItem_Click ( object sender, EventArgs e ) : void
UpdateControlSize ( ) : void
UpdateEditRegion ( int x, int y ) : void
UpdateGrid ( ) : void

Initializes the grid which is a generated 512x512 texture.

UpdateHistory ( ) : void
UpdateHistoryAfter ( ) : void
UpdateHistoryAfter ( bool all ) : void
UpdateHistoryBefore ( ) : void
UpdateHistoryBefore ( bool all ) : void

Method Details

Blur() public method

public Blur ( int h, int v ) : void
h int
v int
return void

ColorNoise() public method

public ColorNoise ( ) : void
return void

Copy() public method

public Copy ( ) : void
return void

Destroy() public method

public Destroy ( ) : void
return void

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

GetEditorImageTiles() public method

public GetEditorImageTiles ( int tw, int th ) : Sphere_Editor.EditorComponents.TileImage[]
tw int
th int
return Sphere_Editor.EditorComponents.TileImage[]

ImageEditorControl() public method

public ImageEditorControl ( ) : System
return System

InvertColors() public method

public InvertColors ( ) : void
return void

MonoNoise() public method

public MonoNoise ( ) : void
return void

OnScroll() protected method

protected OnScroll ( ScrollEventArgs se ) : void
se System.Windows.Forms.ScrollEventArgs
return void

Paste() public method

public Paste ( ) : void
return void

RedoAction() public method

public RedoAction ( ) : void
return void

ReplacePixels() public method

public ReplacePixels ( Color oldCol, Color newCol ) : void
oldCol Color
newCol Color
return void

ResizeImage() public method

Resizes the image to new bounds.
public ResizeImage ( int width, int height, bool scale, InterpolationMode mode ) : void
width int New width parameter.
height int New height parameter.
scale bool If true, it shall scale the image rather than increase canvas size.
mode InterpolationMode the resizing mode
return void

ScrollToControl() protected method

protected ScrollToControl ( Control activeControl ) : Point
activeControl System.Windows.Forms.Control
return Point

SetImage() public method

public SetImage ( Bitmap img ) : void
img System.Drawing.Bitmap
return void

SetSize() public method

public SetSize ( int width, int height ) : void
width int
height int
return void

SetTileImageMap() public method

public SetTileImageMap ( Bitmap img, short indices ) : void
img System.Drawing.Bitmap
indices short
return void

SetZoom() public method

public SetZoom ( int zoom ) : void
zoom int
return void

Slide() public method

Draws the image slid to the new position.
public Slide ( int ox, int oy ) : void
ox int horizontal increments.
oy int vertical increments.
return void

ToGrayscale() public method

public ToGrayscale ( ) : void
return void

ToggleGrid() public method

public ToggleGrid ( ) : void
return void

UndoAction() public method

public UndoAction ( ) : void
return void

UpdateControl() public method

Positions the object in the middle of its container. Also toggles scrollbars where apropriate.
public UpdateControl ( ) : void
return void

UpdateScrollbars() public method

public UpdateScrollbars ( ) : void
return void

UpdateUndoRedoItems() public method

public UpdateUndoRedoItems ( ) : void
return void