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 picText variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The picText type allows you to define all the advanced characteristics of a Text layer. The characteristics of this Text layer can be defined and modified using different WLanguage properties.
Caution: This type of variable is only used with picLayer variables.
Remark: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Example
sFile is string = fExeDir() + ["\"] + "SourceImg.jpg"
MyWDPic is WDPic = sFile
 
WatermarkLayer is picLayer
CalqueWatermark.Nom = "Watermark"
WatermarkLayer Width = MyWDPic.Width
WatermarkLayer.Height = MyWDPic.Height
WatermarkLayer Type = typeLayerText
LayerWatermark.Text. Font =
LayerWatermark.Text. Font .Size = 100
LayerWatermark.Text. Font .Angle = -45
Watermark.Layer.Text.Font.Color = iDarkBlue
Watermark.Layer.Text.FramingHorizontal = haCenter
Watermark.Layer.Text.FramingVertical = vaMiddle
WatermarkLayer.Text = "My test text"
 
TableAdd(MyWDPic.Layer, WatermarkLayer)
 
// Display in the Image Editor control
IE_NoName1 = MyWDPic
 
Info("To be continued...")
 
// Retrieve layer and modify text
CalqueWatermark<-MonWDPic.Calque["Watermark"]
LayerWatermark.Text = "My Watermark".
 
// Display in the control
IE_NoName1 = MyWDPic
 
Info("To be continued...")
 
// Save the image in a wdpic file
sNewFile is string = fExeDir() + ["\"] + "DestinationImg.wdpic"
MyWDPic.Save(sNewFile)
 
// load new file
MyNewWDPic is WDPic = sNewFile
 
// Retrieve layer and modify text
CalqueWatermark<-MonNouveauWDPic.Calque["Watermark"]
LayerWatermark.Text. Font .Angle = 30
LayerWatermark.Text. Font .Size = 150
Watermark.Layer.Text.Font.Color = iDarkRed
LayerWatermark.Text = "My Watermark version 3".
 
// Display in the control
IE_NoName1 = MyNewWDPic
Remarks

Properties specific to the description of picText variables

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