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 / Drawing functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Note: These functions are also available in prefix syntax (Image drawing and processing functions (prefix syntax)).
Please note: To find out the prerequisites for drawing on the various platforms used, see Drawing in WINDEV, WEBDEV and WINDEV Mobile..

The drawing functions are as follows:
ArrowEndSets the position of the target end of an arrow in a "Shape" control.
ArrowStartSets the position of the source end of an arrow in a "Shape" control.
BitmapInfoRetrieves the characteristics of an image file or the characteristics of a PDF file:
  • format,
  • width and height,
  • number of bits per pixel.
ColorHueCalculates the hue of a color.
ColorLightnessCalculates the lightness of a color.
ColorSaturationCalculates the saturation of a color.
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.
dClearClears the content of an Image variable or Image control and fills it with the specified color.
dCopyCopies an image to another image.
dCopyControlImageCopies the image of a control in a WINDEV window to a variable of type Image.
dCopyImageCopies an image:
  • from an Image control to another Image control.
  • from an Image variable to another Image variable.
dCopyScreenImageCopies the screen contents to an Image variable or to an Image control.
dCopyWindowImageCopies the image from a WINDEV window to an Image variable or to an Image control.
dCropReturns the cropped part of an image. This image is in an Image variable.
dDisplayDisplays the drawing in the Image control.
dDominantImageColorReturns the dominant (i.e. most frequent) color of an image in an Image variable or in an Image control.
dEncrustColorEncrusts a color in an image found in an Image variable.
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.
dHaloAdds a halo effect on an image found in an Image variable.
dHorizontalSymmetryFlips an image with respect to a horizontal axis (symmetry with respect to a horizontal axis).
dImageToArrayCopies the RGB pixels of the image into a one-dimensional or two-dimensional array. The array of colors is cleared then it is filled with the integers representing the colors (24 bits) of the image.
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.
dLoadImageLoads an image in an Image variable from a memo, a file or a binary buffer.
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.
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.
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.
DrawingAvailableIndicates whether the drawing features are supported by the browser.
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.
dSaveImagedSaveImage is kept for backward compatibility.
dSaveImageBMPSaves an image:
  • in a file in BMP format.
  • in memory.
dSaveImageGIFSaves an image:
  • in a file in GIF format.
  • in memory.
dSaveImageICOSaves an image in icon format either in a file, or in memory.
dSaveImageJPEGSaves an image:
  • in a JPEG file.
  • in memory.
dSaveImagePNGSaves an image:
  • in a PNG file.
  • in memory.
dSaveImageTIFFSaves an image in TIFF format into a file or memory.
dShadowAdds a shadow effect on an image found in an Image variable.
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.
dTextMarkdownDraws Markdown 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.
dTransferToImageCreates an image from a buffer of pixels encoded in a specific format.
This function is an advanced function. This function is mainly used to handle the images returned by external APIs via Image variables.
dVerticalSymmetryFlips an image with respect to a vertical axis (symmetry with respect to a vertical axis).
HSLCreates a color from its hue, saturation and lightness.
HTMLToRGBConverts the HTML color into RGB color.
RGBDefines a color from its Red, Green and Blue components.
RGBBlueReturns the blue component of an RGB color.
RGBGreenReturns the green component of an RGB color.
RGBRedReturns the red component of an RGB color.
RGBToHTMLReturns the HTML color corresponding to the RGB color.
Related Examples:
The drawing functions Unit examples (WINDEV): The drawing functions
[ + ] Using the main drawing functions of WINDEV to:
- Initialize an Image control for drawing
- Draw simple shapes
- Write a text into a drawing
- Change the color in a drawing
Modifying the Hue, Saturation and Lightness Unit examples (WINDEV): Modifying the Hue, Saturation and Lightness
[ + ] Process on the images via the WLanguage dModifyHSL function.
This function is used to modify the hue, the saturation and the lightness of an image.
WD Java Chart Designer Training (WINDEV): WD Java Chart Designer
[ + ] WINDEV enables you to create some Java applications without even knowing Java.
You program with a 5GL (WLanguage) and WINDEV generates the Java code.
The drawing functions of WINDEV are available in Java generation.
This example explains how to create charts with these drawing functions.
Three types of charts are presented in this example:
- the bar chart,
- the scatter chart,
- and the line chart.
WD Magnifier Complete examples (WINDEV): WD Magnifier
[ + ] This example enables you to zoom part of the screen with a magnifier.
The maximum zoom value is set to 8.
Summary of the example supplied with WINDEV:
The WLanguge function named dCopyBlt() and the WLanguage property named ..Opacity allow you to perform a capture of the Windows desktop at the location of a window without this window appearing in the screen shot.
This example uses this tip to zoom the part of the screen found below the magnifier.
WM Notes Cross-platform examples (WINDEV Mobile): WM Notes
[ + ] This example is using the drawing functions of WLanguage for Android and iOS.
It allows you to draw graphic "notes" and to save them.
WM System Cross-platform examples (WINDEV Mobile): WM System
[ + ] This application is an example of some of the features of WINDEV Mobile available for Android/iOS.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- Wi-Fi
- Bluetooth
- Toast
- Compass
- Accelerometer
- Camera control
- LED
- Vibration
- Notifications
- Drawing functions
- Internet
WW_Drawing_HTML5 Training (WEBDEV): WW_Drawing_HTML5
[ + ] WEBDEV includes some drawing functions in browser code, for the browsers that support the HTML5. standard.
This educational example presents:
- an array of drawings,
- and an implementation: the visual choice by the Web user of the categories of seats when making a reservation for a show.
The drawing functions Unit examples (WEBDEV): The drawing functions
[ + ] This example presents the main drawing functions of WEBDEV and it allows you to:
- Initialize an Image control for drawing
- Draw simple shapes
- Write a text in a drawing
- Change the color in a drawing
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help