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

Definicja

Rysuje element Image w określonych granicach.

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)

Parametry

g
Graphics

Powierzchnia Graphics , na której należy rysować.

image
Image

Element Image do rysowania.

r
Rectangle

Granice Rectangle do rysowania w obrębie.

align
ContentAlignment

Wyrównanie obrazu do rysowania w obiekcie Label.

Uwagi dotyczące dziedziczenia

Podczas tworzenia własnej kontrolki pochodzącej z Labelmetody można użyć tej metody do rysowania obrazów na powierzchni kontrolki.

Dotyczy

Zobacz też