PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV 25 feature!
  • Properties specific to the description of picLayer 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 picLayer type allows you to define all the advanced characteristics of a layer of an image loaded in a WDPic variable. The characteristics of this layer can be defined and modified using different WLanguage properties.
Remark: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Example
// Open a source image
MyImage is WDPic
MyImage..FileName = fExeDir() + ["\"] + "Source.png"
 
// Add a layer containing a rectangle
RectangleLayer is picLayer
RectangleLayer..Name = "Rectangle"
RectangleLayer..Width = 100
RectangleLayer..Height = 100
dRectangle(RectangleLayer, 1, 1, 50, 50, DarkGreen, DarkBlue)
 
RectangleLayer..X = nXLayer
RectangleLayer..Y = nYLayer
Add(MyImage..Layer, RectangleLayer)
 
// Rotate layer
dRotation(MyLayer, 45)
 
// Save the result
PicSave(MyImage, fExeDir() + ["\"] + "Result.png")
Remarks

Properties specific to the description of picLayer variables

The following properties can be used to handle a layer of a WDPic image:
Property nameType usedEffect
HeightIntegerLayer height expressed in pixels.
ImageImage associated with layer.
WidthIntegerLayer width expressed in pixels.
NameCharacter stringLayer name.
VisibleBoolean
  • True if the layer is visible,
  • False if the layer is invisible.
XIntegerHorizontal position of layer on the image, expressed in pixels.
YIntegerVertical position of layer on the image, expressed in pixels.

Remark: These properties can be handled by using one of the following syntaxes:
  • <Variable name>..<Property name>
  • <Variable name>.<Property name>
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment