Graphics.BeginContainer 方法

定义

保存具有此 Graphics 的当前状态的图形容器,然后打开并使用新的图形容器。Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container.

重载

BeginContainer()

保存具有此 Graphics 的当前状态的图形容器,然后打开并使用新的图形容器。Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container.

BeginContainer(Rectangle, Rectangle, GraphicsUnit)

保存具有此 Graphics 的当前状态的图形容器,然后打开并使用具有指定缩放变形的新图形容器。Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container with the specified scale transformation.

BeginContainer(RectangleF, RectangleF, GraphicsUnit)

保存具有此 Graphics 的当前状态的图形容器,然后打开并使用具有指定缩放变形的新图形容器。Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container with the specified scale transformation.

BeginContainer()

保存具有此 Graphics 的当前状态的图形容器,然后打开并使用新的图形容器。Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container.

public:
 System::Drawing::Drawing2D::GraphicsContainer ^ BeginContainer();
public System.Drawing.Drawing2D.GraphicsContainer BeginContainer ();
member this.BeginContainer : unit -> System.Drawing.Drawing2D.GraphicsContainer
Public Function BeginContainer () As GraphicsContainer

返回

GraphicsContainer

此方法返回一个 GraphicsContainer,该对象表示该方法调用运行时此 Graphics 的状态。This method returns a GraphicsContainer that represents the state of this Graphics at the time of the method call.

示例

下面的代码示例旨在与 Windows 窗体一起使用,并且它需要作为 PaintEventArgs e Paint 事件处理程序的参数。The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. 此代码执行以下操作:The code performs the following actions:

  • 打开新的图形容器并保存旧容器。Opens a new graphics container and saves the old container.

  • 将世界坐标转换到容器中。Translates the world coordinates in the container.

  • 在) 新容器的 (平移坐标中填充红色矩形。Fills a red rectangle in the (translated coordinates of the) new container.

  • 关闭新容器并还原已保存的容器。Closes the new container and restores the saved container.

  • 将绿色矩形 (填充到已保存容器的未翻译坐标) 。Fills a green rectangle (to the untranslated coordinates) of the saved container.

结果是一个绿色矩形,它 overlies 大小相同的红色矩形。The result is a green rectangle that overlies a red rectangle of the same size.

private:
   void BeginContainerVoid( PaintEventArgs^ e )
   {
      // Begin graphics container.
      GraphicsContainer^ containerState = e->Graphics->BeginContainer();

      // Translate world transformation.
      e->Graphics->TranslateTransform( 100.0F, 100.0F );

      // Fill translated rectangle in container with red.
      e->Graphics->FillRectangle( gcnew SolidBrush( Color::Red ), 0, 0, 200, 200 );

      // End graphics container.
      e->Graphics->EndContainer( containerState );

      // Fill untransformed rectangle with green.
      e->Graphics->FillRectangle( gcnew SolidBrush( Color::Green ), 0, 0, 200, 200 );
   }
private void BeginContainerVoid(PaintEventArgs e)
{
    // Begin graphics container.
    GraphicsContainer containerState = e.Graphics.BeginContainer();
             
    // Translate world transformation.
    e.Graphics.TranslateTransform(100.0F, 100.0F);
             
    // Fill translated rectangle in container with red.
    e.Graphics.FillRectangle(new SolidBrush(Color.Red), 0, 0, 200, 200);
             
    // End graphics container.
    e.Graphics.EndContainer(containerState);
             
    // Fill untransformed rectangle with green.
    e.Graphics.FillRectangle(new SolidBrush(Color.Green), 0, 0, 200, 200);
}
Private Sub BeginContainerVoid(ByVal e As PaintEventArgs)

    ' Begin graphics container.
    Dim containerState As GraphicsContainer = _
    e.Graphics.BeginContainer()

    ' Translate world transformation.
    e.Graphics.TranslateTransform(100.0F, 100.0F)

    ' Fill translated rectangle in container with red.
    e.Graphics.FillRectangle(New SolidBrush(Color.Red), 0, 0, 200, 200)

    ' End graphics container.
    e.Graphics.EndContainer(containerState)

    ' Fill untransformed rectangle with green.
    e.Graphics.FillRectangle(New SolidBrush(Color.Green), 0, 0, _
    200, 200)
End Sub

注解

将此方法与方法一起使用 EndContainer 可创建嵌套图形容器。Use this method with the EndContainer method to create nested graphics containers. 图形容器将保留图形状态,如转换、剪辑区域和呈现属性。Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.

调用的方法时 BeginContainer Graphics ,保存的状态的信息块将 Graphics 放在堆栈上。When you call the BeginContainer method of a Graphics, an information block that holds the state of the Graphics is put on a stack. BeginContainer方法返回 GraphicsContainer 标识该信息块的。The BeginContainer method returns a GraphicsContainer that identifies that information block. 将标识对象传递给 EndContainer 方法时,信息块将从堆栈中移除,并用于将还原 Graphics 到在方法调用时它所处的状态 BeginContainerWhen you pass the identifying object to the EndContainer method, the information block is removed from the stack and is used to restore the Graphics to the state it was in at the time of the BeginContainer method call.

容器可以嵌套;也就是说,您可以在 BeginContainer 调用方法之前多次调用方法 EndContainerContainers can be nested; that is, you can call the BeginContainer method several times before you call the EndContainer method. 每次调用方法时 BeginContainer ,都会将信息块放在堆栈上,并收到 GraphicsContainer 信息块的。Each time you call the BeginContainer method, an information block is put on the stack, and you receive a GraphicsContainer for the information block. 将其中一个对象传递给 EndContainer 方法时,将 Graphics 返回到它在 BeginContainer 方法调用时返回该特定的状态 GraphicsContainerWhen you pass one of those objects to the EndContainer method, the Graphics is returned to the state it was in at the time of the BeginContainer method call that returned that particular GraphicsContainer. 从堆栈中删除由该方法调用放置在堆栈上的信息块 BeginContainer ,并且 BeginContainer 也会删除该方法调用之后置于该堆栈上的所有信息块。The information block placed on the stack by that BeginContainer method call is removed from the stack, and all information blocks placed on that stack after that BeginContainer method call are also removed.

调用方法会 Save 将信息块放在与调用方法相同的堆栈上 BeginContainerCalls to the Save method place information blocks on the same stack as calls to the BeginContainer method. 正如 EndContainer 方法调用与方法调用配对一样 BeginContainerRestore 方法调用与 Save 方法调用配对。Just as an EndContainer method call is paired with a BeginContainer method call, a Restore method call is paired with a Save method call.

当你调用 EndContainer 方法时,将 Save BeginContainer BeginContainer 从堆栈中移除在调用方法后,由方法或方法) 放置在堆栈 (的所有信息块。When you call the EndContainer method, all information blocks placed on the stack (by the Save method or by the BeginContainer method) after the corresponding call to the BeginContainer method are removed from the stack. 同样,在调用方法时 Restore ,通过方法) 或方法调用的堆栈上放置的所有信息块 (Save BeginContainer Save 将从堆栈中移除。Likewise, when you call the Restore method, all information blocks placed on the stack (by the Save method or by the BeginContainer method) after the corresponding call to the Save method are removed from the stack.

方法建立的图形状态 BeginContainer 包括默认图形状态的渲染质量; 当调用方法时,任何呈现质量状态更改都将重置为默认值。The graphics state established by the BeginContainer method includes the rendering qualities of the default graphics state; any rendering-quality state changes existing when the method is called are reset to the default values.

适用于

BeginContainer(Rectangle, Rectangle, GraphicsUnit)

保存具有此 Graphics 的当前状态的图形容器,然后打开并使用具有指定缩放变形的新图形容器。Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container with the specified scale transformation.

public:
 System::Drawing::Drawing2D::GraphicsContainer ^ BeginContainer(System::Drawing::Rectangle dstrect, System::Drawing::Rectangle srcrect, System::Drawing::GraphicsUnit unit);
public System.Drawing.Drawing2D.GraphicsContainer BeginContainer (System.Drawing.Rectangle dstrect, System.Drawing.Rectangle srcrect, System.Drawing.GraphicsUnit unit);
member this.BeginContainer : System.Drawing.Rectangle * System.Drawing.Rectangle * System.Drawing.GraphicsUnit -> System.Drawing.Drawing2D.GraphicsContainer
Public Function BeginContainer (dstrect As Rectangle, srcrect As Rectangle, unit As GraphicsUnit) As GraphicsContainer

参数

dstrect
Rectangle

Rectangle 结构,它与 srcrect 参数一起为容器指定缩放变换。Rectangle structure that, together with the srcrect parameter, specifies a scale transformation for the container.

srcrect
Rectangle

Rectangle 结构,它与 dstrect 参数一起为容器指定缩放变换。Rectangle structure that, together with the dstrect parameter, specifies a scale transformation for the container.

unit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定容器的度量单位。Member of the GraphicsUnit enumeration that specifies the unit of measure for the container.

返回

GraphicsContainer

此方法返回一个 GraphicsContainer,该对象表示该方法调用运行时此 Graphics 的状态。This method returns a GraphicsContainer that represents the state of this Graphics at the time of the method call.

示例

下面的代码示例旨在与 Windows 窗体一起使用,并且它需要作为 PaintEventArgs e Paint 事件处理程序的参数。The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. 此代码执行以下操作:The code performs the following actions:

  • 创建两个矩形,为新容器指定缩放变换。Creates two rectangles to specify a scale transformation for the new container.

  • 打开新的图形容器并保存旧容器。Opens the new graphics container and saves the old container.

  • 填充) 新容器 (缩放坐标中的红色矩形。Fills a red rectangle in the (scaled coordinates of the) new container.

  • 关闭新容器并还原已保存的容器。Closes the new container and restores the saved container.

  • 将绿色矩形 (填充到已保存容器的未缩放坐标) 。Fills a green rectangle (to the unscaled coordinates) of the saved container.

结果是一个绿色矩形,它 overlies 一个较小的红色矩形。The result is a green rectangle that overlies a smaller red rectangle.

private:
   void BeginContainerRectangle( PaintEventArgs^ e )
   {
      // Define transformation for container.
      Rectangle srcRect = Rectangle(0,0,200,200);
      Rectangle destRect = Rectangle(100,100,150,150);

      // Begin graphics container.
      GraphicsContainer^ containerState = e->Graphics->BeginContainer( destRect, srcRect, GraphicsUnit::Pixel );

      // Fill red rectangle in container.
      e->Graphics->FillRectangle( gcnew SolidBrush( Color::Red ), 0, 0, 200, 200 );

      // End graphics container.
      e->Graphics->EndContainer( containerState );

      // Fill untransformed rectangle with green.
      e->Graphics->FillRectangle( gcnew SolidBrush( Color::Green ), 0, 0, 200, 200 );
   }
private void BeginContainerRectangle(PaintEventArgs e)
{
    // Define transformation for container.
    Rectangle srcRect = new Rectangle(0, 0, 200, 200);
    Rectangle destRect = new Rectangle(100, 100, 150, 150);
             
    // Begin graphics container.
    GraphicsContainer containerState = e.Graphics.BeginContainer(
        destRect, srcRect,
        GraphicsUnit.Pixel);
             
    // Fill red rectangle in container.
    e.Graphics.FillRectangle(new SolidBrush(Color.Red), 0, 0, 200, 200);
             
    // End graphics container.
    e.Graphics.EndContainer(containerState);
             
    // Fill untransformed rectangle with green.
    e.Graphics.FillRectangle(new SolidBrush(Color.Green), 0, 0, 200, 200);
}
Private Sub BeginContainerRectangle(ByVal e As PaintEventArgs)

    ' Define transformation for container.
    Dim srcRect As New Rectangle(0, 0, 200, 200)
    Dim destRect As New Rectangle(100, 100, 150, 150)

    ' Begin graphics container.
    Dim containerState As GraphicsContainer = _
    e.Graphics.BeginContainer(destRect, srcRect, GraphicsUnit.Pixel)

    ' Fill red rectangle in container.
    e.Graphics.FillRectangle(New SolidBrush(Color.Red), 0, 0, 200, 200)

    ' End graphics container.
    e.Graphics.EndContainer(containerState)

    ' Fill untransformed rectangle with green.
    e.Graphics.FillRectangle(New SolidBrush(Color.Green), 0, 0, _
    200, 200)
End Sub

注解

将此方法与方法一起使用 EndContainer 可创建嵌套图形容器。Use this method with the EndContainer method to create nested graphics containers. 图形容器将保留图形状态,如转换、剪辑区域和呈现属性。Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.

调用的方法时 BeginContainer Graphics ,保存的状态的信息块将 Graphics 放在堆栈上。When you call the BeginContainer method of a Graphics, an information block that holds the state of the Graphics is put on a stack. BeginContainer方法返回 GraphicsContainer 标识该信息块的。The BeginContainer method returns a GraphicsContainer that identifies that information block. 将标识对象传递给 EndContainer 方法时,信息块将从堆栈中移除,并用于将还原 Graphics 到在方法调用时它所处的状态 BeginContainerWhen you pass the identifying object to the EndContainer method, the information block is removed from the stack and is used to restore the Graphics to the state it was in at the time of the BeginContainer method call.

容器可以嵌套;也就是说,您可以在 BeginContainer 调用方法之前多次调用方法 EndContainerContainers can be nested; that is, you can call the BeginContainer method several times before you call the EndContainer method. 每次调用方法时 BeginContainer ,都会将信息块放在堆栈上,并收到 GraphicsContainer 信息块的。Each time you call the BeginContainer method, an information block is put on the stack, and you receive a GraphicsContainer for the information block. 将其中一个对象传递给 EndContainer 方法时,将 Graphics 返回到它在 BeginContainer 方法调用时返回该特定的状态 GraphicsContainerWhen you pass one of those objects to the EndContainer method, the Graphics is returned to the state it was in at the time of the BeginContainer method call that returned that particular GraphicsContainer. 从堆栈中删除由该方法调用放置在堆栈上的信息块 BeginContainer ,并且 BeginContainer 也会删除该方法调用之后置于该堆栈上的所有信息块。The information block placed on the stack by that BeginContainer method call is removed from the stack, and all information blocks placed on that stack after that BeginContainer method call are also removed.

调用方法会 Save 将信息块放在与调用方法相同的堆栈上 BeginContainerCalls to the Save method place information blocks on the same stack as calls to the BeginContainer method. 正如 EndContainer 方法调用与方法调用配对一样 BeginContainerRestore 方法调用与 Save 方法调用配对。Just as an EndContainer method call is paired with a BeginContainer method call, a Restore method call is paired with a Save method call.

当你调用 EndContainer 方法时,将 Save BeginContainer BeginContainer 从堆栈中移除在调用方法后,由方法或方法) 放置在堆栈 (的所有信息块。When you call the EndContainer method, all information blocks placed on the stack (by the Save method or by the BeginContainer method) after the corresponding call to the BeginContainer method are removed from the stack. 同样,在调用方法时 Restore ,通过方法) 或方法调用的堆栈上放置的所有信息块 (Save BeginContainer Save 将从堆栈中移除。Likewise, when you call the Restore method, all information blocks placed on the stack (by the Save method or by the BeginContainer method) after the corresponding call to the Save method are removed from the stack.

此方法为具有和参数的新图形容器指定缩放转换 dstrect srcrectThis method specifies a scale transformation for the new graphics container with the dstrect and srcrect parameters. 刻度等于转换,在应用到后 srcrect ,将生成 dstrectThe scale is equal to the transformation that, when applied to srcrect, results in dstrect.

方法建立的图形状态 BeginContainer 包括默认图形状态的渲染质量; 当调用方法时,任何呈现质量状态更改都将重置为默认值。The graphics state established by the BeginContainer method includes the rendering qualities of the default graphics state; any rendering-quality state changes existing when the method is called are reset to the default values.

适用于

BeginContainer(RectangleF, RectangleF, GraphicsUnit)

保存具有此 Graphics 的当前状态的图形容器,然后打开并使用具有指定缩放变形的新图形容器。Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container with the specified scale transformation.

public:
 System::Drawing::Drawing2D::GraphicsContainer ^ BeginContainer(System::Drawing::RectangleF dstrect, System::Drawing::RectangleF srcrect, System::Drawing::GraphicsUnit unit);
public System.Drawing.Drawing2D.GraphicsContainer BeginContainer (System.Drawing.RectangleF dstrect, System.Drawing.RectangleF srcrect, System.Drawing.GraphicsUnit unit);
member this.BeginContainer : System.Drawing.RectangleF * System.Drawing.RectangleF * System.Drawing.GraphicsUnit -> System.Drawing.Drawing2D.GraphicsContainer
Public Function BeginContainer (dstrect As RectangleF, srcrect As RectangleF, unit As GraphicsUnit) As GraphicsContainer

参数

dstrect
RectangleF

RectangleF 结构,它与 srcrect 参数一起为新的图形容器指定缩放变换。RectangleF structure that, together with the srcrect parameter, specifies a scale transformation for the new graphics container.

srcrect
RectangleF

RectangleF 结构,它与 dstrect 参数一起为新的图形容器指定缩放变换。RectangleF structure that, together with the dstrect parameter, specifies a scale transformation for the new graphics container.

unit
GraphicsUnit

GraphicsUnit 枚举的成员,它指定容器的度量单位。Member of the GraphicsUnit enumeration that specifies the unit of measure for the container.

返回

GraphicsContainer

此方法返回一个 GraphicsContainer,该对象表示该方法调用运行时此 Graphics 的状态。This method returns a GraphicsContainer that represents the state of this Graphics at the time of the method call.

示例

下面的代码示例旨在与 Windows 窗体一起使用,并且它需要作为 PaintEventArgs e Paint 事件处理程序的参数。The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. 此代码执行以下操作:The code performs the following actions:

  • 创建两个矩形,为新容器指定缩放变换。Creates two rectangles to specify a scale transformation for the new container.

  • 打开新的图形容器并保存旧容器。Opens the new graphics container and saves the old container.

  • 填充) 新容器 (缩放坐标中的红色矩形。Fills a red rectangle in the (scaled coordinates of the) new container.

  • 关闭新容器并还原已保存的容器。Closes the new container and restores the saved container.

  • 将绿色矩形 (填充到已保存容器的未缩放坐标) 。Fills a green rectangle (to the unscaled coordinates) of the saved container.

结果是一个绿色矩形,它 overlies 一个较小的红色矩形。The result is a green rectangle that overlies a smaller red rectangle.

private:
   void BeginContainerRectangleF( PaintEventArgs^ e )
   {
      // Define transformation for container.
      RectangleF srcRect = RectangleF(0.0F,0.0F,200.0F,200.0F);
      RectangleF destRect = RectangleF(100.0F,100.0F,150.0F,150.0F);

      // Begin graphics container.
      GraphicsContainer^ containerState = e->Graphics->BeginContainer( destRect, srcRect, GraphicsUnit::Pixel );

      // Fill red rectangle in container.
      e->Graphics->FillRectangle( gcnew SolidBrush( Color::Red ), 0.0F, 0.0F, 200.0F, 200.0F );

      // End graphics container.
      e->Graphics->EndContainer( containerState );

      // Fill untransformed rectangle with green.
      e->Graphics->FillRectangle( gcnew SolidBrush( Color::Green ), 0.0F, 0.0F, 200.0F, 200.0F );
   }
private void BeginContainerRectangleF(PaintEventArgs e)
{
    // Define transformation for container.
    RectangleF srcRect = new RectangleF(0.0F, 0.0F, 200.0F, 200.0F);
    RectangleF destRect = new RectangleF(100.0F, 100.0F, 150.0F, 150.0F);
             
    // Begin graphics container.
    GraphicsContainer containerState = e.Graphics.BeginContainer(
        destRect, srcRect,
        GraphicsUnit.Pixel);
             
    // Fill red rectangle in container.
    e.Graphics.FillRectangle(new SolidBrush(Color.Red), 0.0F, 0.0F, 200.0F, 200.0F);
             
    // End graphics container.
    e.Graphics.EndContainer(containerState);
             
    // Fill untransformed rectangle with green.
    e.Graphics.FillRectangle(new SolidBrush(Color.Green), 0.0F, 0.0F, 200.0F, 200.0F);
}
Private Sub BeginContainerRectangleF(ByVal e As PaintEventArgs)

    ' Define transformation for container.
    Dim srcRect As New RectangleF(0.0F, 0.0F, 200.0F, 200.0F)
    Dim destRect As New RectangleF(100.0F, 100.0F, 150.0F, 150.0F)

    ' Begin graphics container.
    Dim containerState As GraphicsContainer = _
    e.Graphics.BeginContainer(destRect, srcRect, GraphicsUnit.Pixel)

    ' Fill red rectangle in container.
    e.Graphics.FillRectangle(New SolidBrush(Color.Red), 0.0F, 0.0F, _
    200.0F, 200.0F)

    ' End graphics container.
    e.Graphics.EndContainer(containerState)

    ' Fill untransformed rectangle with green.
    e.Graphics.FillRectangle(New SolidBrush(Color.Green), 0.0F, 0.0F, _
    200.0F, 200.0F)
End Sub

注解

将此方法与方法一起使用 EndContainer 可创建嵌套图形容器。Use this method with the EndContainer method to create nested graphics containers. 图形容器将保留图形状态,如转换、剪辑区域和呈现属性。Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.

调用的方法时 BeginContainer Graphics ,保存的状态的信息块将 Graphics 放在堆栈上。When you call the BeginContainer method of a Graphics, an information block that holds the state of the Graphics is put on a stack. BeginContainer方法返回 GraphicsContainer 标识该信息块的。The BeginContainer method returns a GraphicsContainer that identifies that information block. 将标识对象传递给 EndContainer 方法时,信息块将从堆栈中移除,并用于将还原 Graphics 到在方法调用时它所处的状态 BeginContainerWhen you pass the identifying object to the EndContainer method, the information block is removed from the stack and is used to restore the Graphics to the state it was in at the time of the BeginContainer method call.

容器可以嵌套;也就是说,您可以在 BeginContainer 调用方法之前多次调用方法 EndContainerContainers can be nested; that is, you can call the BeginContainer method several times before you call the EndContainer method. 每次调用方法时 BeginContainer ,都会将信息块放在堆栈上,并收到 GraphicsContainer 信息块的。Each time you call the BeginContainer method, an information block is put on the stack, and you receive a GraphicsContainer for the information block. 将其中一个对象传递给 EndContainer 方法时,将 Graphics 返回到它在 BeginContainer 方法调用时返回该特定的状态 GraphicsContainerWhen you pass one of those objects to the EndContainer method, the Graphics is returned to the state it was in at the time of the BeginContainer method call that returned that particular GraphicsContainer. 从堆栈中删除由该方法调用放置在堆栈上的信息块 BeginContainer ,并且 BeginContainer 也会删除该方法调用之后置于该堆栈上的所有信息块。The information block placed on the stack by that BeginContainer method call is removed from the stack, and all information blocks placed on that stack after that BeginContainer method call are also removed.

调用方法会 Save 将信息块放在与调用方法相同的堆栈上 BeginContainerCalls to the Save method place information blocks on the same stack as calls to the BeginContainer method. 正如 EndContainer 方法调用与方法调用配对一样 BeginContainerRestore 方法调用与 Save 方法调用配对。Just as an EndContainer method call is paired with a BeginContainer method call, a Restore method call is paired with a Save method call.

当你调用 EndContainer 方法时,将 Save BeginContainer BeginContainer 从堆栈中移除在调用方法后,由方法或方法) 放置在堆栈 (的所有信息块。When you call the EndContainer method, all information blocks placed on the stack (by the Save method or by the BeginContainer method) after the corresponding call to the BeginContainer method are removed from the stack. 同样,在调用方法时 Restore ,通过方法) 或方法调用的堆栈上放置的所有信息块 (Save BeginContainer Save 将从堆栈中移除。Likewise, when you call the Restore method, all information blocks placed on the stack (by the Save method or by the BeginContainer method) after the corresponding call to the Save method are removed from the stack.

此方法为具有和参数的新图形容器指定缩放转换 dstrect srcrectThis method specifies a scale transformation for the new graphics container with the dstrect and srcrect parameters. 刻度等于转换,在应用到后 srcrect ,将生成 dstrectThe scale is equal to the transformation that, when applied to srcrect, results in dstrect.

方法建立的图形状态 BeginContainer 包括默认图形状态的渲染质量; 当调用方法时,任何呈现质量状态更改都将重置为默认值。The graphics state established by the BeginContainer method includes the rendering qualities of the default graphics state; any rendering-quality state changes existing when the method is called are reset to the default values.

适用于