C# Class Sphere_Editor.EditorComponents.ImageEditorControl

Inheritance: System.Windows.Forms.UserControl
Afficher le fichier Open project: Radnen/spherestudio

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

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

Private Methods

Méthode 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 méthode

public Blur ( int h, int v ) : void
h int
v int
Résultat void

ColorNoise() public méthode

public ColorNoise ( ) : void
Résultat void

Copy() public méthode

public Copy ( ) : void
Résultat void

Destroy() public méthode

public Destroy ( ) : void
Résultat void

Dispose() protected méthode

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

GetEditorImageTiles() public méthode

public GetEditorImageTiles ( int tw, int th ) : Sphere_Editor.EditorComponents.TileImage[]
tw int
th int
Résultat Sphere_Editor.EditorComponents.TileImage[]

ImageEditorControl() public méthode

public ImageEditorControl ( ) : System
Résultat System

InvertColors() public méthode

public InvertColors ( ) : void
Résultat void

MonoNoise() public méthode

public MonoNoise ( ) : void
Résultat void

OnScroll() protected méthode

protected OnScroll ( ScrollEventArgs se ) : void
se System.Windows.Forms.ScrollEventArgs
Résultat void

Paste() public méthode

public Paste ( ) : void
Résultat void

RedoAction() public méthode

public RedoAction ( ) : void
Résultat void

ReplacePixels() public méthode

public ReplacePixels ( Color oldCol, Color newCol ) : void
oldCol Color
newCol Color
Résultat void

ResizeImage() public méthode

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
Résultat void

ScrollToControl() protected méthode

protected ScrollToControl ( Control activeControl ) : Point
activeControl System.Windows.Forms.Control
Résultat Point

SetImage() public méthode

public SetImage ( Bitmap img ) : void
img System.Drawing.Bitmap
Résultat void

SetSize() public méthode

public SetSize ( int width, int height ) : void
width int
height int
Résultat void

SetTileImageMap() public méthode

public SetTileImageMap ( Bitmap img, short indices ) : void
img System.Drawing.Bitmap
indices short
Résultat void

SetZoom() public méthode

public SetZoom ( int zoom ) : void
zoom int
Résultat void

Slide() public méthode

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

ToGrayscale() public méthode

public ToGrayscale ( ) : void
Résultat void

ToggleGrid() public méthode

public ToggleGrid ( ) : void
Résultat void

UndoAction() public méthode

public UndoAction ( ) : void
Résultat void

UpdateControl() public méthode

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

UpdateScrollbars() public méthode

public UpdateScrollbars ( ) : void
Résultat void

UpdateUndoRedoItems() public méthode

public UpdateUndoRedoItems ( ) : void
Résultat void