## BeginContainer() {#begincontainer}

保存一个带有当前状态的图形容器Graphics并打开并使用一个新的图形容器。

```csharp
public GraphicsContainer BeginContainer()
```

### 返回值

该方法返回一个GraphicsContainer代表这个状态Graphics在方法调用时。

### 也可以看看

* class [GraphicsContainer](../../../system.drawing.drawing2d/graphicscontainer)
* class [Graphics](../../graphics)
* 命名空间 [System.Drawing](../../graphics)
* 部件 [Aspose.Drawing](../../../)

---

## BeginContainer(Rectangle, Rectangle, GraphicsUnit) {#begincontainer_1}

保存一个带有当前状态的图形容器Graphics并打开并使用具有指定比例变换的新图形容器。

```csharp
public GraphicsContainer BeginContainer(Rectangle dstrect, Rectangle srcrect, GraphicsUnit unit)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| dstrect | Rectangle | Rectangle与 srcrect 参数一起指定容器的缩放转换的结构。 |
| srcrect | Rectangle | Rectangle与 dstrect 参数一起指定容器的缩放转换的结构。 |
| unit | GraphicsUnit | 成员GraphicsUnit枚举指定容器的度量单位。 |

### 返回值

该方法返回一个GraphicsContainer代表这个状态Graphics在方法调用时。

### 也可以看看

* class [GraphicsContainer](../../../system.drawing.drawing2d/graphicscontainer)
* struct [Rectangle](../../rectangle)
* enum [GraphicsUnit](../../graphicsunit)
* class [Graphics](../../graphics)
* 命名空间 [System.Drawing](../../graphics)
* 部件 [Aspose.Drawing](../../../)

---

## BeginContainer(RectangleF, RectangleF, GraphicsUnit) {#begincontainer_2}

保存一个带有当前状态的图形容器Graphics并打开并使用具有指定比例变换的新图形容器。

```csharp
public GraphicsContainer BeginContainer(RectangleF dstrect, RectangleF srcrect, GraphicsUnit unit)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| dstrect | RectangleF | RectangleF与 srcrect 参数一起指定容器的缩放转换的结构。 |
| srcrect | RectangleF | RectangleF与 dstrect 参数一起指定容器的缩放转换的结构。 |
| unit | GraphicsUnit | 成员GraphicsUnit枚举指定容器的度量单位。 |

### 返回值

该方法返回一个GraphicsContainer代表这个状态Graphics在方法调用时。

### 也可以看看

* class [GraphicsContainer](../../../system.drawing.drawing2d/graphicscontainer)
* struct [RectangleF](../../rectanglef)
* enum [GraphicsUnit](../../graphicsunit)
* class [Graphics](../../graphics)
* 命名空间 [System.Drawing](../../graphics)
* 部件 [Aspose.Drawing](../../../)

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