|
1 | 1 | --- |
2 | 2 | title: Graphics.DrawImage |
3 | 3 | second_title: Aspose.Imaging for .NET API Reference |
4 | | -description: Graphics method. Draws the specified Image using its original physical size at the specified location |
| 4 | +description: Graphics method. Draws the specified image using its original physical size at the location specified by a coordinate pair |
5 | 5 | type: docs |
6 | 6 | weight: 230 |
7 | 7 | url: /net/aspose.imaging/graphics/drawimage/ |
8 | 8 | --- |
| 9 | +## DrawImage(Image, int, int) {#drawimage_20} |
| 10 | + |
| 11 | +Draws the specified image, using its original physical size, at the location specified by a coordinate pair. |
| 12 | + |
| 13 | +```csharp |
| 14 | +public void DrawImage(Image sourceImage, int x, int y) |
| 15 | +``` |
| 16 | + |
| 17 | +| Parameter | Type | Description | |
| 18 | +| --- | --- | --- | |
| 19 | +| sourceImage | Image | The image to draw with. | |
| 20 | +| x | Int32 | The x-coordinate of the upper-left corner of the drawn image. | |
| 21 | +| y | Int32 | The y-coordinate of the upper-left corner of the drawn image. | |
| 22 | + |
| 23 | +### Exceptions |
| 24 | + |
| 25 | +| exception | condition | |
| 26 | +| --- | --- | |
| 27 | +| ArgumentNullException | *sourceImage* is null. | |
| 28 | + |
| 29 | +### See Also |
| 30 | + |
| 31 | +* class [Image](../../image/) |
| 32 | +* class [Graphics](../) |
| 33 | +* namespace [Aspose.Imaging](../../graphics/) |
| 34 | +* assembly [Aspose.Imaging](../../../) |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## DrawImage(Image, Rectangle) {#drawimage_10} |
| 39 | + |
| 40 | +Draws the specified [`Image`](../image/) at the specified location and with the specified size. |
| 41 | + |
| 42 | +```csharp |
| 43 | +public void DrawImage(Image sourceImage, Rectangle rect) |
| 44 | +``` |
| 45 | + |
| 46 | +| Parameter | Type | Description | |
| 47 | +| --- | --- | --- | |
| 48 | +| sourceImage | Image | The image to draw with. | |
| 49 | +| rect | Rectangle | [`Rectangle`](../../rectangle/) structure that specifies the location and size of the drawn image. | |
| 50 | + |
| 51 | +### Exceptions |
| 52 | + |
| 53 | +| exception | condition | |
| 54 | +| --- | --- | |
| 55 | +| ArgumentNullException | *sourceImage* is null. | |
| 56 | + |
| 57 | +### See Also |
| 58 | + |
| 59 | +* class [Image](../../image/) |
| 60 | +* struct [Rectangle](../../rectangle/) |
| 61 | +* class [Graphics](../) |
| 62 | +* namespace [Aspose.Imaging](../../graphics/) |
| 63 | +* assembly [Aspose.Imaging](../../../) |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +## DrawImage(Image, int, int, int, int) {#drawimage_21} |
| 68 | + |
| 69 | +Draws the specified [`Image`](../image/) at the specified location and with the specified size. |
| 70 | + |
| 71 | +```csharp |
| 72 | +public void DrawImage(Image sourceImage, int x, int y, int width, int height) |
| 73 | +``` |
| 74 | + |
| 75 | +| Parameter | Type | Description | |
| 76 | +| --- | --- | --- | |
| 77 | +| sourceImage | Image | The image to draw with. | |
| 78 | +| x | Int32 | The x-coordinate of the upper-left corner of the drawn image. | |
| 79 | +| y | Int32 | The y-coordinate of the upper-left corner of the drawn image. | |
| 80 | +| width | Int32 | Width of the drawn image. | |
| 81 | +| height | Int32 | Height of the drawn image. | |
| 82 | + |
| 83 | +### Exceptions |
| 84 | + |
| 85 | +| exception | condition | |
| 86 | +| --- | --- | |
| 87 | +| ArgumentNullException | *sourceImage* is null. | |
| 88 | + |
| 89 | +### See Also |
| 90 | + |
| 91 | +* class [Image](../../image/) |
| 92 | +* class [Graphics](../) |
| 93 | +* namespace [Aspose.Imaging](../../graphics/) |
| 94 | +* assembly [Aspose.Imaging](../../../) |
| 95 | + |
| 96 | +--- |
| 97 | + |
9 | 98 | ## DrawImage(Image, PointF) {#drawimage_1} |
10 | 99 |
|
11 | 100 | Draws the specified [`Image`](../image/), using its original physical size, at the specified location. |
@@ -633,93 +722,4 @@ public void DrawImage(Image sourceImage, Point point) |
633 | 722 | * namespace [Aspose.Imaging](../../graphics/) |
634 | 723 | * assembly [Aspose.Imaging](../../../) |
635 | 724 |
|
636 | | ---- |
637 | | - |
638 | | -## DrawImage(Image, int, int) {#drawimage_20} |
639 | | - |
640 | | -Draws the specified image, using its original physical size, at the location specified by a coordinate pair. |
641 | | - |
642 | | -```csharp |
643 | | -public void DrawImage(Image sourceImage, int x, int y) |
644 | | -``` |
645 | | - |
646 | | -| Parameter | Type | Description | |
647 | | -| --- | --- | --- | |
648 | | -| sourceImage | Image | The image to draw with. | |
649 | | -| x | Int32 | The x-coordinate of the upper-left corner of the drawn image. | |
650 | | -| y | Int32 | The y-coordinate of the upper-left corner of the drawn image. | |
651 | | - |
652 | | -### Exceptions |
653 | | - |
654 | | -| exception | condition | |
655 | | -| --- | --- | |
656 | | -| ArgumentNullException | *sourceImage* is null. | |
657 | | - |
658 | | -### See Also |
659 | | - |
660 | | -* class [Image](../../image/) |
661 | | -* class [Graphics](../) |
662 | | -* namespace [Aspose.Imaging](../../graphics/) |
663 | | -* assembly [Aspose.Imaging](../../../) |
664 | | - |
665 | | ---- |
666 | | - |
667 | | -## DrawImage(Image, Rectangle) {#drawimage_10} |
668 | | - |
669 | | -Draws the specified [`Image`](../image/) at the specified location and with the specified size. |
670 | | - |
671 | | -```csharp |
672 | | -public void DrawImage(Image sourceImage, Rectangle rect) |
673 | | -``` |
674 | | - |
675 | | -| Parameter | Type | Description | |
676 | | -| --- | --- | --- | |
677 | | -| sourceImage | Image | The image to draw with. | |
678 | | -| rect | Rectangle | [`Rectangle`](../../rectangle/) structure that specifies the location and size of the drawn image. | |
679 | | - |
680 | | -### Exceptions |
681 | | - |
682 | | -| exception | condition | |
683 | | -| --- | --- | |
684 | | -| ArgumentNullException | *sourceImage* is null. | |
685 | | - |
686 | | -### See Also |
687 | | - |
688 | | -* class [Image](../../image/) |
689 | | -* struct [Rectangle](../../rectangle/) |
690 | | -* class [Graphics](../) |
691 | | -* namespace [Aspose.Imaging](../../graphics/) |
692 | | -* assembly [Aspose.Imaging](../../../) |
693 | | - |
694 | | ---- |
695 | | - |
696 | | -## DrawImage(Image, int, int, int, int) {#drawimage_21} |
697 | | - |
698 | | -Draws the specified [`Image`](../image/) at the specified location and with the specified size. |
699 | | - |
700 | | -```csharp |
701 | | -public void DrawImage(Image sourceImage, int x, int y, int width, int height) |
702 | | -``` |
703 | | - |
704 | | -| Parameter | Type | Description | |
705 | | -| --- | --- | --- | |
706 | | -| sourceImage | Image | The image to draw with. | |
707 | | -| x | Int32 | The x-coordinate of the upper-left corner of the drawn image. | |
708 | | -| y | Int32 | The y-coordinate of the upper-left corner of the drawn image. | |
709 | | -| width | Int32 | Width of the drawn image. | |
710 | | -| height | Int32 | Height of the drawn image. | |
711 | | - |
712 | | -### Exceptions |
713 | | - |
714 | | -| exception | condition | |
715 | | -| --- | --- | |
716 | | -| ArgumentNullException | *sourceImage* is null. | |
717 | | - |
718 | | -### See Also |
719 | | - |
720 | | -* class [Image](../../image/) |
721 | | -* class [Graphics](../) |
722 | | -* namespace [Aspose.Imaging](../../graphics/) |
723 | | -* assembly [Aspose.Imaging](../../../) |
724 | | - |
725 | 725 |
|
0 commit comments