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 / Functions for Image editor and WDPic variables
  • Properties specific to picText variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The picText type is used to define all the advanced characteristics of a Text layer. You can define and change the characteristics of this Text layer using different WLanguage properties.
Warning: This type of variable is only used with picLayer type variables..
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
sFichier is string = fRepExe() + ["\"] + "ImgSource.jpg"
MonWDPic is WDPic = sFichier

CalqueFiligrane is picLayer
CalqueFiligrane.Name = "Filigrane"
CalqueFiligrane.Width = MonWDPic.Width
CalqueFiligrane.Height = MonWDPic.Height
CalqueFiligrane.Type = typeLayerText
CalqueFiligrane.Texte.Police.Nom = "Arial"
CalqueFiligrane.Texte.Police.Taille = 100
CalqueFiligrane.Texte.Police.Angle = -45
CalqueFiligrane.Texte.Police.Couleur = iDarkBlue
CalqueFiligrane.Texte.CadrageHorizontal = haCenter
CalqueFiligrane.Texte.CadrageVertical = vaMiddle
CalqueFiligrane.Text = "Mon texte de test"

ArrayAdd(MonWDPic.Layer, CalqueFiligrane)

// Affichage dans le champ Editeur d'images
EI_SansNom1 = MonWDPic

Info("A suivre ...")

// Récupération du calque et modification du texte
CalqueFiligrane<-MonWDPic.Layer["Filigrane"]
CalqueFiligrane.Text = "Mon filigrane"

// Affichage dans le champ
EI_SansNom1 = MonWDPic

Info("A suivre ...")

// Sauvegarde de l'image dans un fichier wdpic
sNouveauFichier is string = fRepExe() + ["\"] + "ImgDestination.wdpic"
MonWDPic.Sauve(sNouveauFichier)

// chargement du nouveau fichier
MonNouveauWDPic is WDPic = sNouveauFichier

// Récupération du calque et modification du texte
CalqueFiligrane<-MonNouveauWDPic.Layer["Filigrane"]
CalqueFiligrane.Texte.Police.Angle = 30
CalqueFiligrane.Texte.Police.Taille = 150
CalqueFiligrane.Texte.Police.Couleur = iDarkRed
CalqueFiligrane.Text = "Mon filigrane version 3"

// Affichage dans le champ
EI_SansNom1 = MonNouveauWDPic
Remarks

Properties specific to picText variables

The following properties can be used to handle a Text layer:
Property nameType usedEffect
FontFont variableCharacteristics of the font used for the text.
HorizontalAlignmentInteger constantHorizontal alignment of text in the layer:
  • chCentre (Default): Toast message displayed in the center.
  • chRight: Toast message displayed on the right.
  • chLeft: Toast message displayed on the left.
OpacityIntegerText opacity percentage. This percentage goes from 0 (completely invisible) to 100 (completely opaque).
TextCharacter stringText of the text layer.
VerticalAlignmentInteger constantVertical alignment of text in the layer:
  • cvBas (Default): Toast message displayed at bottom.
  • cvHaut: Toast message displayed at the top.
  • cvMilieu: Toast message displayed in the middle.
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help