## Graphics::BeginContainer() method


保存一个包含此对象当前状态的容器，打开并使用一个新容器，然后返回已保存的容器。

```cpp
SharedPtr<Drawing2D::GraphicsContainer> System::Drawing::Graphics::BeginContainer()
```

## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [GraphicsContainer](../../../system.drawing.drawing2d/graphicscontainer/)
* Class [Graphics](../)
* Namespace [System::Drawing](../../)
* Library [Aspose.Font for C++](../../../)
## Graphics::BeginContainer(Rectangle, Rectangle, GraphicsUnit) method


保存一个包含此对象当前状态的容器，打开并使用一个新容器，然后返回已保存的容器。

```cpp
SharedPtr<Drawing2D::GraphicsContainer> System::Drawing::Graphics::BeginContainer(Rectangle dstrect, Rectangle srcrect, GraphicsUnit unit)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| dstrect | 矩形 | 指定新容器的比例变换的矩形。与 **srcrect** 一起使用。 |
| srcrect | 矩形 | 指定新容器的比例变换的矩形。与 **dstrect** 一起使用。 |
| 单位 | GraphicsUnit | 指定新容器度量单位的值 |

## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [GraphicsContainer](../../../system.drawing.drawing2d/graphicscontainer/)
* Class [Rectangle](../../rectangle/)
* Enum [GraphicsUnit](../../graphicsunit/)
* Class [Graphics](../)
* Namespace [System::Drawing](../../)
* Library [Aspose.Font for C++](../../../)
## Graphics::BeginContainer(RectangleF, RectangleF, GraphicsUnit) method


保存一个包含此对象当前状态的容器，打开并使用一个新容器，然后返回已保存的容器。

```cpp
SharedPtr<Drawing2D::GraphicsContainer> System::Drawing::Graphics::BeginContainer(RectangleF dstrect, RectangleF srcrect, GraphicsUnit unit)
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| dstrect | RectangleF | 指定新容器的比例变换的矩形。与 **srcrect** 一起使用。 |
| srcrect | RectangleF | 指定新容器的比例变换的矩形。与 **dstrect** 一起使用。 |
| 单位 | GraphicsUnit | 指定新容器度量单位的值 |

## 另见

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [GraphicsContainer](../../../system.drawing.drawing2d/graphicscontainer/)
* Class [RectangleF](../../rectanglef/)
* Enum [GraphicsUnit](../../graphicsunit/)
* Class [Graphics](../)
* Namespace [System::Drawing](../../)
* Library [Aspose.Font for C++](../../../)
