# PointF.SubtractPointF.SubtractPointF.SubtractPointF.Subtract Method

## Definizione

Converte un elemento PointF in base al valore negativo di specifiche dimensioni.Translates a PointF by the negative of a specified size.

 Subtract(PointF, Size) Subtract(PointF, Size) Subtract(PointF, Size) Subtract(PointF, Size) Converte un elemento PointF in base al valore negativo di specifiche dimensioni.Translates a PointF by the negative of a specified size. Subtract(PointF, SizeF) Subtract(PointF, SizeF) Subtract(PointF, SizeF) Subtract(PointF, SizeF) Converte un elemento PointF in base al valore negativo di specifiche dimensioni.Translates a PointF by the negative of a specified size.

## Subtract(PointF, Size)Subtract(PointF, Size)Subtract(PointF, Size)Subtract(PointF, Size)

Converte un elemento PointF in base al valore negativo di specifiche dimensioni.Translates a PointF by the negative of a specified size.

``````public:
static System::Drawing::PointF Subtract(System::Drawing::PointF pt, System::Drawing::Size sz);``````
``public static System.Drawing.PointF Subtract (System.Drawing.PointF pt, System.Drawing.Size sz);``
``static member Subtract : System.Drawing.PointF * System.Drawing.Size -> System.Drawing.PointF``
``Public Shared Function Subtract (pt As PointF, sz As Size) As PointF``

#### Parametri

pt
PointF PointF PointF PointF

PointF da convertire.The PointF to translate.

sz
Size Size Size Size

Struttura Size che specifica i numeri da sottrarre dalle coordinate di `pt`.The Size that specifies the numbers to subtract from the coordinates of `pt`.

#### Restituisce

Elemento PointF convertito.The translated PointF.

### Commenti

Il Subtract metodo sottrae l' Width oggetto della dimensione specificata dalla Height coordinata x dell'oggetto PointF e dalla coordinata y dell'oggetto PointF.The Subtract method subtracts the Width of the specified size from the x-coordinate of the PointF and the Height from the y-coordinate of the PointF.

Vedi anche

## Subtract(PointF, SizeF)Subtract(PointF, SizeF)Subtract(PointF, SizeF)Subtract(PointF, SizeF)

Converte un elemento PointF in base al valore negativo di specifiche dimensioni.Translates a PointF by the negative of a specified size.

``````public:
static System::Drawing::PointF Subtract(System::Drawing::PointF pt, System::Drawing::SizeF sz);``````
``public static System.Drawing.PointF Subtract (System.Drawing.PointF pt, System.Drawing.SizeF sz);``
``static member Subtract : System.Drawing.PointF * System.Drawing.SizeF -> System.Drawing.PointF``
``Public Shared Function Subtract (pt As PointF, sz As SizeF) As PointF``

#### Parametri

pt
PointF PointF PointF PointF

PointF da convertire.The PointF to translate.

sz
SizeF SizeF SizeF SizeF

Struttura SizeF che specifica i numeri da sottrarre dalle coordinate di `pt`.The SizeF that specifies the numbers to subtract from the coordinates of `pt`.

#### Restituisce

Elemento PointF convertito.The translated PointF.

### Esempi

Nell'esempio di codice riportato di seguito viene illustrato Subtract come utilizzare l'operatore.The following code example demonstrates how to use the Subtract operator. Per eseguire questo esempio, incollare il codice seguente in un Windows Form.To run this example, paste the following code into a Windows Form. Gestire l' Paint evento e la chiamata `SubtractExample`del form, `e` passando PaintEventArgscome.Handle the form's Paint event and call `SubtractExample`, passing `e` as PaintEventArgs.

``````private void SubtractExample(PaintEventArgs e)
{
PointF point1 = new PointF(120.5F, 120F);
SizeF size1 = new SizeF(120.5F, 30.5F);
PointF point2 = PointF.Subtract(point1, size1);
e.Graphics.DrawLine(Pens.Blue, point1, point2);
}
``````
``````Private Sub SubtractExample(ByVal e As PaintEventArgs)
Dim point1 As New PointF(120.5F, 120F)
Dim size1 As New SizeF(120.5F, 30.5F)
Dim point2 As PointF = PointF.Subtract(point1, size1)
e.Graphics.DrawLine(Pens.Blue, point1, point2)

End Sub
``````

### Commenti

Il Subtract metodo sottrae l' Width oggetto della dimensione specificata dalla Height coordinata x dell'oggetto PointF e dalla coordinata y dell'oggetto PointF.The Subtract method subtracts the Width of the specified size from the x-coordinate of the PointF and the Height from the y-coordinate of the PointF.

Vedi anche