Graphics.BeginContainer Método

Definição

Salva um contêiner de elementos gráficos com o estado atual deste Graphics e abre e usa um novo contêiner de elementos gráficos.Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container.

Sobrecargas

BeginContainer()

Salva um contêiner de elementos gráficos com o estado atual deste Graphics e abre e usa um novo contêiner de elementos gráficos.Saves a graphics container with the current state of this Graphics and opens and uses a new graphics container.

BeginContainer(Rectangle, Rectangle, GraphicsUnit)

Salva um contêiner gráfico com o estado atual deste Graphics e abre e usa um novo contêiner gráfico com a transformação de escala especificada.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)

Salva um contêiner gráfico com o estado atual deste Graphics e abre e usa um novo contêiner gráfico com a transformação de escala especificada.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()

Salva um contêiner de elementos gráficos com o estado atual deste Graphics e abre e usa um novo contêiner de elementos gráficos.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

Retornos

GraphicsContainer

Esse método retorna um GraphicsContainer que representa o estado deste Graphics no momento da chamada de método.This method returns a GraphicsContainer that represents the state of this Graphics at the time of the method call.

Exemplos

O exemplo de código a seguir foi projetado para uso com Windows Forms, e ele requer PaintEventArgs e , que é um parâmetro do Paint manipulador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. O código executa as seguintes ações:The code performs the following actions:

  • Abre um novo contêiner de gráficos e salva o contêiner antigo.Opens a new graphics container and saves the old container.

  • Traduz as coordenadas mundiais no contêiner.Translates the world coordinates in the container.

  • Preenche um retângulo vermelho nas (coordenadas traduzidas do) novo contêiner.Fills a red rectangle in the (translated coordinates of the) new container.

  • Fecha o novo contêiner e restaura o contêiner salvo.Closes the new container and restores the saved container.

  • Preenche um retângulo verde (para as coordenadas não traduzidas) do contêiner salvo.Fills a green rectangle (to the untranslated coordinates) of the saved container.

O resultado é um retângulo verde que se baseia em um retângulo vermelho do mesmo tamanho.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

Comentários

Use esse método com o EndContainer método para criar contêineres gráficos aninhados.Use this method with the EndContainer method to create nested graphics containers. Os contêineres gráficos retêm o estado gráfico, como transformação, região de recorte e propriedades de renderização.Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.

Quando você chama o BeginContainer método de a Graphics , um bloco de informações que contém o estado de Graphics é colocado em uma pilha.When you call the BeginContainer method of a Graphics, an information block that holds the state of the Graphics is put on a stack. O BeginContainer método retorna um GraphicsContainer que identifica esse bloco de informações.The BeginContainer method returns a GraphicsContainer that identifies that information block. Quando você passa o objeto de identificação para o EndContainer método, o bloco de informações é removido da pilha e é usado para restaurar o Graphics para o estado em que ele estava no momento da BeginContainer chamada do método.When 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.

Os contêineres podem ser aninhados; ou seja, você pode chamar o BeginContainer método várias vezes antes de chamar o EndContainer método.Containers can be nested; that is, you can call the BeginContainer method several times before you call the EndContainer method. Cada vez que você chama o BeginContainer método, um bloco de informações é colocado na pilha e você recebe um GraphicsContainer para o bloco de informações.Each time you call the BeginContainer method, an information block is put on the stack, and you receive a GraphicsContainer for the information block. Quando você passa um desses objetos para o EndContainer método, o Graphics é retornado para o estado em que ele estava no momento da chamada do BeginContainer método que retornou esse específico GraphicsContainer .When 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. O bloco de informações colocado na pilha por essa BeginContainer chamada de método é removido da pilha, e todos os blocos de informações colocados nessa pilha após essa BeginContainer chamada de método também são removidos.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.

Chamadas para o Save método colocam os blocos de informações na mesma pilha como chamadas para o BeginContainer método.Calls to the Save method place information blocks on the same stack as calls to the BeginContainer method. Assim como uma EndContainer chamada de método é emparelhada com uma BeginContainer chamada de método, uma chamada de método Restore é emparelhada com uma Save chamada de método.Just as an EndContainer method call is paired with a BeginContainer method call, a Restore method call is paired with a Save method call.

Quando você chama o EndContainer método, todos os blocos de informações colocados na pilha (pelo Save método ou pelo BeginContainer método) após a chamada correspondente para o BeginContainer método são removidos da pilha.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. Da mesma forma, quando você chama o Restore método, todos os blocos de informações colocados na pilha (pelo Save método ou pelo BeginContainer método) após a chamada correspondente para o Save método são removidos da pilha.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.

O estado de gráficos estabelecido pelo BeginContainer método inclui as qualidades de renderização do estado de gráficos padrão; qualquer estado de qualidade de renderização alterado existente quando o método é chamado é redefinido para os valores padrão.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.

Aplica-se a

BeginContainer(Rectangle, Rectangle, GraphicsUnit)

Salva um contêiner gráfico com o estado atual deste Graphics e abre e usa um novo contêiner gráfico com a transformação de escala especificada.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

Parâmetros

dstrect
Rectangle

A estrutura Rectangle que, juntamente com o parâmetro srcrect, especifica uma transformação de escala para o contêiner.Rectangle structure that, together with the srcrect parameter, specifies a scale transformation for the container.

srcrect
Rectangle

A estrutura Rectangle que, juntamente com o parâmetro dstrect, especifica uma transformação de escala para o contêiner.Rectangle structure that, together with the dstrect parameter, specifies a scale transformation for the container.

unit
GraphicsUnit

Membro da enumeração GraphicsUnit que especifica a unidade de medida para o contêiner.Member of the GraphicsUnit enumeration that specifies the unit of measure for the container.

Retornos

GraphicsContainer

Esse método retorna um GraphicsContainer que representa o estado deste Graphics no momento da chamada de método.This method returns a GraphicsContainer that represents the state of this Graphics at the time of the method call.

Exemplos

O exemplo de código a seguir foi projetado para uso com Windows Forms, e ele requer PaintEventArgs e , que é um parâmetro do Paint manipulador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. O código executa as seguintes ações:The code performs the following actions:

  • Cria dois retângulos para especificar uma transformação de escala para o novo contêiner.Creates two rectangles to specify a scale transformation for the new container.

  • Abre o novo contêiner de gráficos e salva o contêiner antigo.Opens the new graphics container and saves the old container.

  • Preenche um retângulo vermelho nas (coordenadas dimensionadas do) novo contêiner.Fills a red rectangle in the (scaled coordinates of the) new container.

  • Fecha o novo contêiner e restaura o contêiner salvo.Closes the new container and restores the saved container.

  • Preenche um retângulo verde (nas coordenadas não dimensionadas) do contêiner salvo.Fills a green rectangle (to the unscaled coordinates) of the saved container.

O resultado é um retângulo verde que se baseia em um retângulo vermelho menor.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

Comentários

Use esse método com o EndContainer método para criar contêineres gráficos aninhados.Use this method with the EndContainer method to create nested graphics containers. Os contêineres gráficos retêm o estado gráfico, como transformação, região de recorte e propriedades de renderização.Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.

Quando você chama o BeginContainer método de a Graphics , um bloco de informações que contém o estado de Graphics é colocado em uma pilha.When you call the BeginContainer method of a Graphics, an information block that holds the state of the Graphics is put on a stack. O BeginContainer método retorna um GraphicsContainer que identifica esse bloco de informações.The BeginContainer method returns a GraphicsContainer that identifies that information block. Quando você passa o objeto de identificação para o EndContainer método, o bloco de informações é removido da pilha e é usado para restaurar o Graphics para o estado em que ele estava no momento da BeginContainer chamada do método.When 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.

Os contêineres podem ser aninhados; ou seja, você pode chamar o BeginContainer método várias vezes antes de chamar o EndContainer método.Containers can be nested; that is, you can call the BeginContainer method several times before you call the EndContainer method. Cada vez que você chama o BeginContainer método, um bloco de informações é colocado na pilha e você recebe um GraphicsContainer para o bloco de informações.Each time you call the BeginContainer method, an information block is put on the stack, and you receive a GraphicsContainer for the information block. Quando você passa um desses objetos para o EndContainer método, o Graphics é retornado para o estado em que ele estava no momento da chamada do BeginContainer método que retornou esse específico GraphicsContainer .When 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. O bloco de informações colocado na pilha por essa BeginContainer chamada de método é removido da pilha, e todos os blocos de informações colocados nessa pilha após essa BeginContainer chamada de método também são removidos.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.

Chamadas para o Save método colocam os blocos de informações na mesma pilha como chamadas para o BeginContainer método.Calls to the Save method place information blocks on the same stack as calls to the BeginContainer method. Assim como uma EndContainer chamada de método é emparelhada com uma BeginContainer chamada de método, uma chamada de método Restore é emparelhada com uma Save chamada de método.Just as an EndContainer method call is paired with a BeginContainer method call, a Restore method call is paired with a Save method call.

Quando você chama o EndContainer método, todos os blocos de informações colocados na pilha (pelo Save método ou pelo BeginContainer método) após a chamada correspondente para o BeginContainer método são removidos da pilha.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. Da mesma forma, quando você chama o Restore método, todos os blocos de informações colocados na pilha (pelo Save método ou pelo BeginContainer método) após a chamada correspondente para o Save método são removidos da pilha.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.

Esse método especifica uma transformação de escala para o novo contêiner de gráficos com os dstrect srcrect parâmetros e.This method specifies a scale transformation for the new graphics container with the dstrect and srcrect parameters. A escala é igual à transformação que, quando aplicada a srcrect , resulta em dstrect .The scale is equal to the transformation that, when applied to srcrect, results in dstrect.

O estado de gráficos estabelecido pelo BeginContainer método inclui as qualidades de renderização do estado de gráficos padrão; qualquer estado de qualidade de renderização alterado existente quando o método é chamado é redefinido para os valores padrão.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.

Aplica-se a

BeginContainer(RectangleF, RectangleF, GraphicsUnit)

Salva um contêiner gráfico com o estado atual deste Graphics e abre e usa um novo contêiner gráfico com a transformação de escala especificada.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

Parâmetros

dstrect
RectangleF

A estrutura RectangleF que, juntamente com o parâmetro srcrect, especifica uma transformação de escala para o novo contêiner de elementos gráficos.RectangleF structure that, together with the srcrect parameter, specifies a scale transformation for the new graphics container.

srcrect
RectangleF

A estrutura RectangleF que, juntamente com o parâmetro dstrect, especifica uma transformação de escala para o novo contêiner de elementos gráficos.RectangleF structure that, together with the dstrect parameter, specifies a scale transformation for the new graphics container.

unit
GraphicsUnit

Membro da enumeração GraphicsUnit que especifica a unidade de medida para o contêiner.Member of the GraphicsUnit enumeration that specifies the unit of measure for the container.

Retornos

GraphicsContainer

Esse método retorna um GraphicsContainer que representa o estado deste Graphics no momento da chamada de método.This method returns a GraphicsContainer that represents the state of this Graphics at the time of the method call.

Exemplos

O exemplo de código a seguir foi projetado para uso com Windows Forms, e ele requer PaintEventArgs e , que é um parâmetro do Paint manipulador de eventos.The following code example is designed for use with Windows Forms, and it requires PaintEventArgse, which is a parameter of the Paint event handler. O código executa as seguintes ações:The code performs the following actions:

  • Cria dois retângulos para especificar uma transformação de escala para o novo contêiner.Creates two rectangles to specify a scale transformation for the new container.

  • Abre o novo contêiner de gráficos e salva o contêiner antigo.Opens the new graphics container and saves the old container.

  • Preenche um retângulo vermelho nas (coordenadas dimensionadas do) novo contêiner.Fills a red rectangle in the (scaled coordinates of the) new container.

  • Fecha o novo contêiner e restaura o contêiner salvo.Closes the new container and restores the saved container.

  • Preenche um retângulo verde (nas coordenadas não dimensionadas) do contêiner salvo.Fills a green rectangle (to the unscaled coordinates) of the saved container.

O resultado é um retângulo verde que se baseia em um retângulo vermelho menor.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

Comentários

Use esse método com o EndContainer método para criar contêineres gráficos aninhados.Use this method with the EndContainer method to create nested graphics containers. Os contêineres gráficos retêm o estado gráfico, como transformação, região de recorte e propriedades de renderização.Graphics containers retain graphics state, such as transformation, clipping region, and rendering properties.

Quando você chama o BeginContainer método de a Graphics , um bloco de informações que contém o estado de Graphics é colocado em uma pilha.When you call the BeginContainer method of a Graphics, an information block that holds the state of the Graphics is put on a stack. O BeginContainer método retorna um GraphicsContainer que identifica esse bloco de informações.The BeginContainer method returns a GraphicsContainer that identifies that information block. Quando você passa o objeto de identificação para o EndContainer método, o bloco de informações é removido da pilha e é usado para restaurar o Graphics para o estado em que ele estava no momento da BeginContainer chamada do método.When 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.

Os contêineres podem ser aninhados; ou seja, você pode chamar o BeginContainer método várias vezes antes de chamar o EndContainer método.Containers can be nested; that is, you can call the BeginContainer method several times before you call the EndContainer method. Cada vez que você chama o BeginContainer método, um bloco de informações é colocado na pilha e você recebe um GraphicsContainer para o bloco de informações.Each time you call the BeginContainer method, an information block is put on the stack, and you receive a GraphicsContainer for the information block. Quando você passa um desses objetos para o EndContainer método, o Graphics é retornado para o estado em que ele estava no momento da chamada do BeginContainer método que retornou esse específico GraphicsContainer .When 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. O bloco de informações colocado na pilha por essa BeginContainer chamada de método é removido da pilha, e todos os blocos de informações colocados nessa pilha após essa BeginContainer chamada de método também são removidos.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.

Chamadas para o Save método colocam os blocos de informações na mesma pilha como chamadas para o BeginContainer método.Calls to the Save method place information blocks on the same stack as calls to the BeginContainer method. Assim como uma EndContainer chamada de método é emparelhada com uma BeginContainer chamada de método, uma chamada de método Restore é emparelhada com uma Save chamada de método.Just as an EndContainer method call is paired with a BeginContainer method call, a Restore method call is paired with a Save method call.

Quando você chama o EndContainer método, todos os blocos de informações colocados na pilha (pelo Save método ou pelo BeginContainer método) após a chamada correspondente para o BeginContainer método são removidos da pilha.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. Da mesma forma, quando você chama o Restore método, todos os blocos de informações colocados na pilha (pelo Save método ou pelo BeginContainer método) após a chamada correspondente para o Save método são removidos da pilha.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.

Esse método especifica uma transformação de escala para o novo contêiner de gráficos com os dstrect srcrect parâmetros e.This method specifies a scale transformation for the new graphics container with the dstrect and srcrect parameters. A escala é igual à transformação que, quando aplicada a srcrect , resulta em dstrect .The scale is equal to the transformation that, when applied to srcrect, results in dstrect.

O estado de gráficos estabelecido pelo BeginContainer método inclui as qualidades de renderização do estado de gráficos padrão; qualquer estado de qualidade de renderização alterado existente quando o método é chamado é redefinido para os valores padrão.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.

Aplica-se a