Skip to content

Commit 1e06da2

Browse files
authored
Add overload to Bitmap.Flush() accepting bitmap and screen coordinates (#106)
1 parent 691a3be commit 1e06da2

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

nanoFramework.Graphics/Primitive/Bitmap.cs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,21 +197,33 @@ public enum BitmapImageType : byte
197197

198198
/// <summary>
199199
/// Flushes the current bitmap to the display device.
200-
/// The bitmap must have the same dimensions as the display device.The.NET Micro Framework provides the
200+
/// Bitmap will be written to the upper-left corner of the screen (full-screen, for full-screen bitmaps).
201201
/// </summary>
202202
[MethodImplAttribute(MethodImplOptions.InternalCall)]
203203
extern public void Flush();
204204

205205
/// <summary>
206-
/// Flushes the current bitmap to the display device.
206+
/// Flushes a sub-rectangle of the current bitmap to the display device.
207207
/// </summary>
208-
/// <param name = "x" > The x-coordinate of the bitmap's upper-left corner.</param>
209-
/// <param name = "y" > The y-coordinate of the bitmap's upper-left corner.</param>
210-
/// <param name = "width" > The width of the bitmap.</param>
211-
/// <param name = "height" > The height of the bitmap.</param>
208+
/// <param name = "x" > The x-coordinate of the sub-rectangle's upper-left corner.</param>
209+
/// <param name = "y" > The y-coordinate of the sub-rectangle's upper-left corner.</param>
210+
/// <param name = "width" > The width of the sub-rectangle.</param>
211+
/// <param name = "height" > The height of the sub-rectangle.</param>
212212
[MethodImplAttribute(MethodImplOptions.InternalCall)]
213213
extern public void Flush(int x, int y, int width, int height);
214214

215+
/// <summary>
216+
/// Flushes a sub-rectangle of the current bitmap to the display device at a specified screen position.
217+
/// </summary>
218+
/// <param name = "srcX" > The x-coordinate of the sub-rectangle's upper-left corner.</param>
219+
/// <param name = "srcY" > The y-coordinate of the sub-rectangle's upper-left corner.</param>
220+
/// <param name = "width" > The width of the sub-rectangle.</param>
221+
/// <param name = "height" > The height of the sub-rectangle.</param>
222+
/// <param name = "screenX" > The x-coordinate of the screen to write to.</param>
223+
/// <param name = "screenY" > The y-coordinate of the screen to write to</param>
224+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
225+
extern public void Flush(int srcX, int srcY, int width, int height, int screenX, int screenY);
226+
215227
/// <summary>
216228
/// Clears the entire drawing surface.
217229
/// </summary>

nanoFramework.Graphics/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
////////////////////////////////////////////////////////////////
1313
// update this whenever the native assembly signature changes //
14-
[assembly: AssemblyNativeVersion("100.0.0.3")]
14+
[assembly: AssemblyNativeVersion("100.0.0.4")]
1515
////////////////////////////////////////////////////////////////
1616

1717
// Setting ComVisible to false makes the types in this assembly not visible

0 commit comments

Comments
 (0)