Label.DrawImage(Graphics, Image, Rectangle, ContentAlignment) Metodo

Definizione

Consente di disegnare un oggetto Image entro i limiti specificati.

protected:
 void DrawImage(System::Drawing::Graphics ^ g, System::Drawing::Image ^ image, System::Drawing::Rectangle r, System::Drawing::ContentAlignment align);
protected void DrawImage (System.Drawing.Graphics g, System.Drawing.Image image, System.Drawing.Rectangle r, System.Drawing.ContentAlignment align);
member this.DrawImage : System.Drawing.Graphics * System.Drawing.Image * System.Drawing.Rectangle * System.Drawing.ContentAlignment -> unit
Protected Sub DrawImage (g As Graphics, image As Image, r As Rectangle, align As ContentAlignment)

Parametri

g
Graphics

La superficie dell'oggetto Graphics su cui disegnare.

image
Image

Classe Image da disegnare.

r
Rectangle

I limiti dell'oggetto Rectangle entro i quali disegnare.

align
ContentAlignment

L’allineamento dell'immagine da disegnare all’interno del controllo Label.

Note per gli eredi

Quando si crea un controllo personalizzato che deriva da Label, è possibile usare questo metodo per disegnare immagini sulla superficie del controllo.

Si applica a

Vedi anche