Cleanup, and fixed a bug in the CloneArea method of the ImageHelper.cs

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2506 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-02-22 16:27:55 +00:00
parent 652ca64e9f
commit ec5840550a
4 changed files with 29 additions and 12 deletions

View file

@ -128,6 +128,14 @@ namespace GreenshotPlugin.Core {
/// <param name="graphics">Graphics</param>
/// <param name="destinationRect">Rectangle with destination</param>
void DrawTo(Graphics graphics, Rectangle destinationRect);
/// <summary>
/// Return true if the coordinates are inside the FastBitmap
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
bool Contains(int x, int y);
}
/// <summary>
@ -416,6 +424,16 @@ namespace GreenshotPlugin.Core {
}
}
/// <summary>
/// returns true if x & y are inside the FastBitmap
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns>true if x & y are inside the FastBitmap</returns>
public bool Contains(int x, int y) {
return x >= 0 && x < Width && y >= 0 && y < Height;
}
public abstract Color GetColorAt(int x, int y);
public abstract void SetColorAt(int x, int y, Color color);
public abstract void GetColorAt(int x, int y, byte[] color);