How to draw a specified region of image to specified location ?

  • Thread starter Thread starter trant
  • Start date Start date
T

trant

I have a source Bitmap file, lets call it "src" which is 1200x800 pixels

I want to basically take a small region of src where I specify the starting
x,y points and the width,height and then draw it to my Graphics object at a
specific x,y location.

Would one of the 30 overloaded DrawImage methods do this? I cant really tell
which one would do it
 
I have a source Bitmap file, lets call it "src" which is 1200x800 pixels

I want to basically take a small region of src where I specify the
starting
x,y points and the width,height and then draw it to my Graphics object
at a
specific x,y location.

Would one of the 30 overloaded DrawImage methods do this? I cant really
tell
which one would do it

Why can't you? The documentation does clearly state the purpose of the
arguments, including which argument specifies the source rectangle for the
drawing, if any.

Here's one example:
http://msdn.microsoft.com/en-us/library/ms142038.aspx

Pete
 
Back
Top