PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Properties specific to the description of docElementImage variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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.
CAUTION: This type cannot be used directly. It must be used via the docElement type.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Caution: This documentation presents the last features of the Word Processing control. Make sure that all the necessary modules are updated.
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 docElément
elt.Type = typeDocElémentImage
elt.Image.ImageBuffer = img
elt.Image.Wrapping = 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.Width = img.Width * 25.4 / 96.0
elt.Image.Height = 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)
Remarks

Properties specific to the description of docElementImage variables

The following properties can be used to handle a docElementImage variable:
Property nameType usedEffect
Versions 24 and later
ZOrder
New in version 24
ZOrder
ZOrder
IntegerOrder number corresponding to the z-order of the image.
This property is automatically modified when DocChangeZOrder is used.
ImageBufferImageImage buffer.
WrappingInteger constantType of image wrapping:
  • docWrappingAlignedOnText: The image inserted into the line and it is linked to the text location where it was inserted. It is processed like any character. It moves with the text.
  • docWrappingThrough: Used to customize the wrapping.
  • docWrappingBehindTheText: Allows you to use the image in watermark behind the text.
  • docWrappingBeforeTheText: Used to display the image above the text.
  • docWrappingFramed: Wraps the text around the image border (recommended for a square image).
  • docWrappingTopAndBottom: The image remains on its line and it is located between two text sections at the top and at the bottom.
  • docWrappingNear: Wraps the image according to its outlines (recommended for a round image or for an image with an irregular shape).
HeightRealImage height in millimeters.
Caution: the unit used is the millimeter instead of the pixel (not enough precision). Don't forget to convert (if necessary) the image height from pixels to millimeters.
WidthRealWidth of image in millimeters.
Caution: the unit used is the millimeter instead of the pixel (not enough precision). Don't forget to convert (if necessary) the image width from pixels to millimeters.
XRealX position of image in relation to its anchoring point (in millimeters).
This property is used only for images for which the property Dressing is different from the constant docWrappingAlignedOnText.
YRealY position of image in relation to its anchoring point (in millimeters).
This property is used only for images for which the property Dressing is different from the constant docWrappingAlignedOnText.
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment