ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Functions for Image editor and WDPic variables
  • Properties specific to WDPic variables
  • Functions that use WDPic 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 WDPic type is used to define the advanced characteristics of an image in ".wdpic" format. The characteristics of this image can be defined and changed using different WLanguage properties.
This type is mainly used to:
  • make layers visible/invisible through programming (ImageLayerVisible).
  • handle images in WDPic format as well as their layers.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Displays the product image in an Image control
PROCÉDURE DisplayProduct(ImageControl is Control, sWDPicName is string, bPromo is boolean)
 
MyImage is WDPic
MyImage.FileName = sWDPicName
ImageLayerVisible(MyImage, "Promo layer", bPromo)
 
ImageControl.Value = MyImage
Remarks

Properties specific to WDPic variables

The following properties can be used to handle an image in "wdpic" format:
Property nameType usedEffect
FileNameCharacter stringName of the ".wdpic" file.
HeightIntegerHeight of image expressed in pixels.
By default, when assigning an image to the WDPic variable, corresponds to the height of the image.
This property is available in read and write mode.
ImageImage associated with the variable.
This image is updated, for example, when an Image control is assigned to the variable.
This property is available in read and write mode.
LayerArray of picLayerLayers defined on the "wdpic" image. Layers are identified by their names.
WidthIntegerWidth of image expressed in pixels.
By default, when assigning an image to the WDPic variable, corresponds to the width of the image.
This property is available in read and write mode.

Functions that use WDPic 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 that will be used by dText:
  • 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).
dInvertColorInverts 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.
dModifyContrastChanges the contrast of an image contained:
  • in an Image control,
  • in an Image variable.
dModifyHSLModifies the hue, the saturation and the lightness of an image found:
  • in an Image control,
  • in an Image variable.
dModifyHueChanges the hue of an image:
  • 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, a document, a paragraph, a text, an image or a 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 the lines, rectangles, circles, ... found:
  • 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:
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:
  • 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.
dStraightenTransforms an image by applying perspective correction.
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).
ImageLayerVisibleUsed to make a layer found in a WDPIC image visible or invisible.
iPrintImageSends the image file to print to the print buffer.
PicMergeLayerMerges the layers of a WDPic image.
PicResizeResizes a WDPic image.
PicRotationRotates a WDPic image.
PicSaveSaves the image found:
  • in an Image Editor control.
  • in a WDPic variable.
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 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help