Label.CalcImageRenderBounds(Image, Rectangle, ContentAlignment) Méthode
Définition
protected:
System::Drawing::Rectangle CalcImageRenderBounds(System::Drawing::Image ^ image, System::Drawing::Rectangle r, System::Drawing::ContentAlignment align);
protected System.Drawing.Rectangle CalcImageRenderBounds (System.Drawing.Image image, System.Drawing.Rectangle r, System.Drawing.ContentAlignment align);
member this.CalcImageRenderBounds : System.Drawing.Image * System.Drawing.Rectangle * System.Drawing.ContentAlignment -> System.Drawing.Rectangle
Paramètres
- image
- Image
Image utilisée pour déterminer la taille et l'emplacement lorsqu'elle est dessinée dans ce contrôle.The Image used to determine size and location when drawn within the control.
Rectangle représentant la zone dans laquelle dessiner l'image.A Rectangle that represents the area to draw the image in.
- align
- ContentAlignment
L'alignement du contenu dans le contrôle.The alignment of content within the control.
Retours
Rectangle représentant la taille et l'emplacement de l'image spécifiée dans le contrôle.A Rectangle that represents the size and location of the specified image within the control.
Remarques
Vous pouvez utiliser cette méthode dans une classe dérivée de Labelpour déterminer la taille et l’emplacement d’une image à dessiner dans le contrôle Label en fonction de son emplacement dans le contrôle.You can use this method within a derived class of Label, to determine the size and location of an image to draw within the Label control based on its location within the control. L’emplacement de l’image est basé sur la valeur de la propriété ImageAlign du contrôle.The location of the image is based on the value of the control's ImageAlign property.