ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Functions for Image editor and WDPic variables
  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The picText type is used to define all the advanced characteristics of a Text layer. The characteristics of this Text layer can be defined and changed using different WLanguage properties.
Caution: This type of variable is only used with picLayer variables.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
sFile is string = fExeDir() + ["\"] + "SourceImg.jpg"
MyWDPic is WDPic = sFile
 
WatermarkLayer is picLayer
WatermarkLayer.Name = "Watermark"
WatermarkLayer.Width = MyWDPic.Width
WatermarkLayer.Height = MyWDPic.Height
WatermarkLayer.Type = typeLayerText
WatermarkLayer.Text.Font.Name = "Arial"
WatermarkLayer.Text.Font.Size = 100
WatermarkLayer.Text.Font.Orientation = -45
WatermarkLayer.Text.Font.Color = iDarkBlue
WatermarkLayer.Text.HorizontalAlignment = haCenter
WatermarkLayer.Text.VerticalAlignment = vaMiddle
WatermarkLayer.Text = "My test text"
 
ArrayAdd(MyWDPic.Layer, WatermarkLayer)
 
// Display in the Image Editor control
IE_NoName1 = MyWDPic
 
Info("To be continued...")
 
// Retrieve layer and modify text
WatermarkLayer<-MyWDPic.Layer["Watermark"]
WatermarkLayer.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
WatermarkLayer<-MyNewWDPic.Layer["Watermark"]
WatermarkLayer.Text.Font.Orientation = 30
WatermarkLayer.Text.Font.Size = 150
WatermarkLayer.Text.Font.Color = iDarkRed
WatermarkLayer.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
FontFont variableCharacteristics of the font used for the text.
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.
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:
  • 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.
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help