## Clone(Rectangle, PixelFormat) {#clone}

创建此部分的副本Bitmap被定义为Rectanglestructure 并具有指定的PixelFormat枚举.

```csharp
public Bitmap Clone(Rectangle rect, PixelFormat format)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| rect | Rectangle | 定义这部分Bitmapto copy. 坐标是相对于这个Bitmap. |
| format | PixelFormat | 指定PixelFormatthe 目的地的枚举Bitmap. |

### 返回值

新的Bitmap该方法创建的。

### 也可以看看

* struct [Rectangle](../../rectangle)
* enum [PixelFormat](../../../system.drawing.imaging/pixelformat)
* class [Bitmap](../../bitmap)
* 命名空间 [System.Drawing](../../bitmap)
* 部件 [Aspose.Drawing](../../../)

---

## Clone(RectangleF, PixelFormat) {#clone_1}

创建此部分的副本Bitmap用指定的定义PixelFormat枚举.

```csharp
public Bitmap Clone(RectangleF rect, PixelFormat format)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| rect | RectangleF | 定义这部分Bitmap复印。 |
| format | PixelFormat | 指定PixelFormat目的地枚举Bitmap. |

### 返回值

这Bitmap该方法创建的。

### 例外

| 例外 | （健康）状况 |
| --- | --- |
| OutOfMemoryException | *rect*位于源位图范围之外。 |
| ArgumentException | 的高度或宽度*rect*为 0。 |

### 也可以看看

* struct [RectangleF](../../rectanglef)
* enum [PixelFormat](../../../system.drawing.imaging/pixelformat)
* class [Bitmap](../../bitmap)
* 命名空间 [System.Drawing](../../bitmap)
* 部件 [Aspose.Drawing](../../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Drawing.dll -->
