|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
Construtor RectangleF (Single, Single, Single, Single)
.NET Framework 4.5
Namespace: System.Drawing
Assembly: System.Drawing (em System.Drawing.dll)
Parâmetros
- x
- Tipo: System.Single
A coordenada x do canto superior esquerdo do retângulo.
- y
- Tipo: System.Single
A coordenada y do canto superior esquerdo do retângulo.
- width
- Tipo: System.Single
A largura do retângulo.
- height
- Tipo: System.Single
A altura do retângulo.
private void RoundingAndTruncatingRectangles(PaintEventArgs e) { // Construct a new RectangleF. RectangleF myRectangleF = new RectangleF(30.6F, 30.7F, 40.8F, 100.9F); // Call the Round method. Rectangle roundedRectangle = Rectangle.Round(myRectangleF); // Draw the rounded rectangle in red. Pen redPen = new Pen(Color.Red, 4); e.Graphics.DrawRectangle(redPen, roundedRectangle); // Call the Truncate method. Rectangle truncatedRectangle = Rectangle.Truncate(myRectangleF); // Draw the truncated rectangle in white. Pen whitePen = new Pen(Color.White, 4); e.Graphics.DrawRectangle(whitePen, truncatedRectangle); // Dispose of the custom pens. redPen.Dispose(); whitePen.Dispose(); }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Função Server Core sem suporte), Windows Server 2008 R2 (Função Server Core com suporte com o SP1 ou posterior, Itanium sem suporte)
O .NET Framework não oferece suporte a todas as versões de cada plataforma. Para obter uma lista das versões com suporte, consulte .Requisitos de sistema do NET Framework.