ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Word Processing functions / Types of variables
  • Properties specific to docElementImage variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The docElementImage type is used to handle the characteristics of an Image element found in a docElement variable.
The characteristics of docElementImage variable can be handled by several WLanguage properties.
ATTENTION: This type must not be used directly. It must be used via the docElement type.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Insère une image à la position du curseur
// Sélection du fichier image
sFichier is string 
sFichier = fImageSelect(fCurrentDir(), "", ...
	"Insérer une image","JPEG (*.JPG)" + TAB + "*.jpg" + CR + ...
	"PNG (*.PNG)" + TAB + "*.png" + CR + "Tous les fichiers (*.*)" + TAB + "*.*")
IF sFichier = "" THEN
	RETURN
END
// Le fichier image est transféré dans une variable de type Image
img is Image
img = sFichier
// Déclaration d'un élément de type Image (à insérer dans le document)
elt is docElement
elt.Type = typeDocElementImage
elt.Image.BufferImage = img
elt.Image.Habillage = docWrappingAlignedOnText

// Calcul des largeurs et hauteurs de l'image présente dans l'élément
// La taille de l'image est en pixels dans la variable de type Image. 
// Cette taille est convertie en mm dans l'élément (unité utilisée dans un document)
elt.Image.Largeur = img.Width * 25.4 / 96.0
elt.Image.Hauteur = img.Height * 25.4 / 96.0
// Position de l'image
elt.Image.X = 0
elt.Image.Y = 0

DocInsert(TT_MonDocument, TT_MonDocument.Curseur, elt)
Properties

Properties specific to docElementImage variables

The following properties can be used to handle docElementImage variables:
Property nameType usedEffect
HeightRealImage height in millimeters.
Please note: the unit used is the millimeter (commonly used in documents) and not the pixel (not precise enough in this case).. Don't forget to convert (if necessary) the image height from pixels to millimeters.
ImageBufferImageImage buffer.
ImageLinkCharacter stringLink to the Image file. The actual image will not be integrated into the document, but only a link to the image.
WidthRealWidth of the image in millimeters.
Please note: the unit used is the millimeter (commonly used in documents) and not the pixel (not precise enough in this case).. Don't forget to convert (if necessary) the image width from pixels to millimeters.
WrappingInteger constantType of image wrap:
  • docHabillageAlignedOnText: The image is inserted on the line and linked to the text location where it was inserted.. It is processed like any character. It moves with the text.
  • docTrimAbove: Allows you to customize the trim..
  • docHabillageDerrièreLeTexte: Watermark the image behind the text.
  • docHabillageDevantLeTexte: Display image over text.
  • docHabillageEncadré: wraps text around image border (recommended for square images).
  • docHabillageHautEBas: The image remains on its line, between two sections of text at the top and bottom.
  • docApproachTrim: Trim the image according to its contours (recommended for round or irregularly shaped images)..
XRealX-position of the image in relation to its anchoring point (in millimeters).
This property is used only for images for which the Wrapping property is set to a constant other than docWrappingAlignedOnText.
YRealY-position of the image in relation to its anchoring point (in millimeters).
This property is used only for images for which the Wrapping property is set to a constant other than docWrappingAlignedOnText.
ZOrderIntegerNumber corresponding to the Z-order of the image.
This property is automatically modified when DocChangeZOrder is used.
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help