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 picLayer variables
  • WLanguage functions that use picLayer variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The picLayer type is used to define all the advanced characteristics of a layer of an image loaded in a WDPic variable. You can define and change the characteristics of this layer using different WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Ouverture d'une image source
MonImage is WDPic
MonImage.FileName = fExeDir() + ["\"] + "Source.png"
// Ajout d'un calque contenant un rectangle
CalqueRectangle is picLayer
CalqueRectangle.Name = "Rectangle"
CalqueRectangle.Width = 100
CalqueRectangle.Height = 100
dRectangle(CalqueRectangle, 1, 1, 50, 50, DarkGreen, DarkBlue)
// Rotation du calque
dRotation(CalqueRectangle, 45, drAdapt)
CalqueRectangle.X = nXCalque
CalqueRectangle.Y = nYCalque
Add(MonImage.Layer, CalqueRectangle)
// Sauvegarde du résultat
PicSave(MonImage, fExeDir() + ["\"] + "Resultat.png")
Properties

Properties specific to 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.
If this property is specified, the Type property will correspond to the typeLayerImage constant.
NameCharacter stringLayer name.
RTFpicRTF variableString in Rich Text Format.
TextpicText variableLayer text. The properties of the picText variable are used to find out and define the options of the text (font, opacity, alignment, etc.).
TypeInteger constantType of layer:
  • typeImageLayer: Image type layer. The Image property gets and sets the image associated with the layer.
  • typeLayerRTF: RTF-type layer. The RTF property gets and sets the content of the layer.
  • typeTextLayer: Text layer. The Text property gets and sets the text associated with the layer.
VisibleBoolean
  • True if the layer is visible,
  • False if the layer is invisible.
WidthIntegerLayer width expressed in pixels.
XIntegerHorizontal position of layer on the image, expressed in pixels.
YIntegerVertical position of layer on the image, expressed in pixels.
Remarks

WLanguage functions that use picLayer variables

AlbumSaveSaves an image, a photo or a video in the photo album of the mobile device.
ClipboardRetrieves the text or image found in the system clipboard.
dAlphaBlendBlends two images together. This allows you to create fade-in effects between 2 images.
dArcDraws an arc of circle or an arc of ellipse:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dBackgroundDeclares the default background color for the rectangles, circles, etc::
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dBlurBlurs the entire given area:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dBorderDraws the borders.
dChangeModeChanges the drawing mode used by the drawing functions (dLine, dRectangle, ....).
dChordDraws the chord of a circle (intersection between an ellipse and a straight line):
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dCircleDraws a circle or an ellipse:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dCopyCopies an image to another image.
dCopyImageCopies an image:
  • from an Image control to another Image control.
  • from an Image variable to another Image variable.
dDominantImageColorReturns the dominant (i.e. most frequent) color of an image in an Image variable or in an Image control.
dEndDrawingDeletes all the drawings made since the last call to dStartDrawing.
dFillColors an area:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dFontDeclares the font to be used by the dText function:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dHorizontalSymmetryFlips an image with respect to a horizontal axis (symmetry with respect to a horizontal axis).
dInvertColorReverses the colors:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dLineDraws a line:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dModifyHSLModifies the hue, the saturation and the lightness of an image found:
  • in an Image control,
  • in an Image variable.
dModifyHueModifies the hue of an image found:
  • in an Image control,
  • in an Image variable.
dModifyLightnessChanges the lightness of an image found:
  • in an Image control,
  • in an Image variable.
dModifyOpacityModifies the opacity of an image (which means the alpha channel of the image).
dModifySaturationModifies the saturation of an image found:
  • in an Image control,
  • in an Image variable.
DocAddAdds:
  • at the end of a word processing document: an element, document, paragraph, text, image or fragment..
  • at the end of a fragment: an element, a text or an image.
DocInsertInserts an object into a Word Processing document or replaces the content of the current fragment. The objects that can be used are:
  • an element,
  • a document,
  • a paragraph,
  • a text,
  • an image,
  • a fragment.
dPenDeclares the default color and style for lines, rectangles, circles, etc. contained in:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dPixelColorIdentifies the color of a pixel found:
dPixelOpacityIdentifies the opacity of a pixel in an image that has an Alpha channel. This image can be:
  • an Image control,
  • an Image variable,
  • a WDPic variable (on the background layer),
  • a picLayer variable.
dPointDraws a point:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dPolygonDraws a polygon:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dPolylineDraws a line composed of multiple segments.
dRectangleDraws a rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dRectangleGradientDraws a rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dResizeResizes an image found:
  • in an Image control.
  • in an Image variable.
  • in a picLayer variable].
dRotationPerforms a rotation:
dRoundedRectangleDraws a rounded rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dSaveImageBMPSaves an image:
  • in a file in BMP format.
  • in memory.
dSaveImageGIFSaves an image:
  • in a file in GIF format.
  • in memory.
dSaveImageJPEGSaves an image:
  • in a JPEG file.
  • in memory.
dSaveImagePNGSaves an image:
  • in a PNG file.
  • in memory.
dSliceDraws a circle section or an ellipse section:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dStartDrawingIndicates that the drawing functions that will be used are intended for:
  • the specified Image control,
  • the specified Image variable,
  • the specified Image variable,
  • the specified WDPic variable (on the background layer),
  • the specified picLayer variable.
dTextDraws a text:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dTextRTFDraws RTF text:
  • in an Image control,
  • in an Image variable.
dVerticalSymmetryFlips an image with respect to a vertical axis (symmetry with respect to a vertical axis).
grDestinationImageDefines an Image variable as destination of a chart.
iImageHeightCalculates the height of the image to print (in millimeters).
iImageWidthCalculates the width of the image to print (in millimeters).
iPrintImageSends the image file to print to the print buffer.
ToClipboardWrites text or image information into the system clipboard.
Related Examples:
WDPic type Unit examples (WINDEV): WDPic type
[ + ] This example shows how to use the WDPic WLanguage type.
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help