PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Prerequisite depending on the platform
  • Drawing in PHP
  • Drawing in Browser code
  • Using the drawing functions in Linux
  • How to draw?
  • Drawing in an Image control
  • Drawing in an Image variable
  • Drawing in browser code
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
Drawing in WINDEV, WEBDEV and WINDEV Mobile
Overview
WINDEV, WEBDEV and WINDEV Mobile include several functions for displaying, drawing, copying and saving the drawings and images from your applications or sites.
WINDEV, WEBDEV et WINDEV Mobile propose functions used to:
  • draw several drawings,
  • display any type of image,
  • copy the drawings and the images,
  • save the drawings and the images.
Versions 16 and later
Android Some drawing functions are now available in Android.
WINDEVLinux Some drawing functions are now available in Linux WEBDEV.
Universal Windows 10 App Some drawing functions are now available in Windows Phone.
New in version 16
Android Some drawing functions are now available in Android.
WINDEVLinux Some drawing functions are now available in Linux WEBDEV.
Universal Windows 10 App Some drawing functions are now available in Windows Phone.
Android Some drawing functions are now available in Android.
WINDEVLinux Some drawing functions are now available in Linux WEBDEV.
Universal Windows 10 App Some drawing functions are now available in Windows Phone.
Versions 18 and later
Universal Windows 10 App Some drawing functions are now available in Windows Store Apps mode.
New in version 18
Universal Windows 10 App Some drawing functions are now available in Windows Store Apps mode.
Universal Windows 10 App Some drawing functions are now available in Windows Store Apps mode.
Prerequisite depending on the platform
PHP

Drawing in PHP

In PHP, the drawing functions are based on the graphic library GD. This library is commonly used by the PHP hosting companies and therefore it is always enabled. The version of the GD library must be version 2.0.28 (or later). This library can be downloaded from the PHP site.
To enable (if necessary) this library locally, the following elements are required:
  • PHP installed.
  • the PHP.INI file found in the Windows directory must contain the following line: "extension=php_gd2.dll" (instead of ";extension=php_gd2.dll").
  • the php_gd2.dll file must exist in the directory of PHP extensions. This directory is defined in the PHP.INI file by the "extension_dir" variable.
Versions 16 and later
WEBDEV - Browser code

Drawing in Browser code

Some drawing functions are available in Browser code. The drawing functions in Browser code are based on the HTML 5 standard. More specifically, these functions are based on the "canvas" tag of HTML 5.
The drawing features in browser code are available for the recent browsers only (supporting the HTML 5 standard). To find out whether the drawing features are proposed by your browser, use DrawingAvailable.
Caution: To use the drawing functions with Internet Explorer 9, the project must "include the reference to the DTD file". This option is available in the "Advanced" tab of description window of project ("Project .. Project description"), "Advanced" button, "W3C standard" option.
Caution: To use the drawing functions with Internet Explorer 9, the project must "include the reference to the DTD file". This option is available in the "Advanced" tab of the description window of the project ("Project .. Project description").
Caution: To use the drawing functions with Internet Explorer 9, the project must include the reference to the DTD file. To do so, the HTML mode must be "HTML 4.01 Transitional + DTD". This option is available in the "Advanced" tab of the description window of project.
Reminder: To display the description window of the project, on the "Project" pane, in the "Project" group, click "Description".
Special case: Drawing in the browser of an Android phone: The browser drawing functions are only available starting with version 3 of Android.
New in version 16
WEBDEV - Browser code

Drawing in Browser code

Some drawing functions are available in Browser code. The drawing functions in Browser code are based on the HTML 5 standard. More specifically, these functions are based on the "canvas" tag of HTML 5.
The drawing features in browser code are available for the recent browsers only (supporting the HTML 5 standard). To find out whether the drawing features are proposed by your browser, use DrawingAvailable.
Caution: To use the drawing functions with Internet Explorer 9, the project must "include the reference to the DTD file". This option is available in the "Advanced" tab of description window of project ("Project .. Project description"), "Advanced" button, "W3C standard" option.
Caution: To use the drawing functions with Internet Explorer 9, the project must "include the reference to the DTD file". This option is available in the "Advanced" tab of the description window of the project ("Project .. Project description").
Caution: To use the drawing functions with Internet Explorer 9, the project must include the reference to the DTD file. To do so, the HTML mode must be "HTML 4.01 Transitional + DTD". This option is available in the "Advanced" tab of the description window of project.
Reminder: To display the description window of the project, on the "Project" pane, in the "Project" group, click "Description".
Special case: Drawing in the browser of an Android phone: The browser drawing functions are only available starting with version 3 of Android.
WEBDEV - Browser code

Drawing in Browser code

Some drawing functions are available in Browser code. The drawing functions in Browser code are based on the HTML 5 standard. More specifically, these functions are based on the "canvas" tag of HTML 5.
The drawing features in browser code are available for the recent browsers only (supporting the HTML 5 standard). To find out whether the drawing features are proposed by your browser, use DrawingAvailable.
Caution: To use the drawing functions with Internet Explorer 9, the project must "include the reference to the DTD file". This option is available in the "Advanced" tab of description window of project ("Project .. Project description"), "Advanced" button, "W3C standard" option.
Caution: To use the drawing functions with Internet Explorer 9, the project must "include the reference to the DTD file". This option is available in the "Advanced" tab of the description window of the project ("Project .. Project description").
Caution: To use the drawing functions with Internet Explorer 9, the project must include the reference to the DTD file. To do so, the HTML mode must be "HTML 4.01 Transitional + DTD". This option is available in the "Advanced" tab of the description window of project.
Reminder: To display the description window of the project, on the "Project" pane, in the "Project" group, click "Description".
Special case: Drawing in the browser of an Android phone: The browser drawing functions are only available starting with version 3 of Android.
Versions 15 and later
WINDEVWEBDEV - Server codeLinux

Using the drawing functions in Linux

To use the drawing function in Linux, the QT library (Core and GUI) version 4.5 (or later) must be installed.
In Ubuntu, this library can be installed with the following commands:
sudo apt-get install libqtcore4
sudo apt-get install libqtgui4
In mandriva 2010 Spring, this library can be installed with the following commands:
urpmi libqtgui4
New in version 15
WINDEVWEBDEV - Server codeLinux

Using the drawing functions in Linux

To use the drawing function in Linux, the QT library (Core and GUI) version 4.5 (or later) must be installed.
In Ubuntu, this library can be installed with the following commands:
sudo apt-get install libqtcore4
sudo apt-get install libqtgui4
In mandriva 2010 Spring, this library can be installed with the following commands:
urpmi libqtgui4
WINDEVWEBDEV - Server codeLinux

Using the drawing functions in Linux

To use the drawing function in Linux, the QT library (Core and GUI) version 4.5 (or later) must be installed.
In Ubuntu, this library can be installed with the following commands:
sudo apt-get install libqtcore4
sudo apt-get install libqtgui4
In mandriva 2010 Spring, this library can be installed with the following commands:
urpmi libqtgui4
How to draw?

Drawing in an Image control

To draw in an Image control:
  1. Initialize the drawing in the Image control (dStartDrawing). This initialization is used to allocate a specific memory zone for the management of drawings.
  2. Draw with the drawing functions.
  3. Insert (if necessary) text into your drawings with dText.
  4. Perform (if necessary) zooms and copies of images with dCopyBlt.
  5. Save the drawing (if necessary) with the backup functions (dSaveImageBMP, dSaveImageGIF, dSaveImageJPEG, dSaveImagePNG.
  6. Print (if necessary) the created file with iPrintImage.
  7. Destroy (if necessary) the drawing found in memory with dEndDrawing.
WEBDEV - Server code Note: Before handling the Image control, check whether the type of the Image or Clickable Image control is "Generated image".
Versions 17 and later

Drawing in an Image variable

To draw in an Image variable, some rules must be complied with:
  1. Declare an Image variable.
  2. Initialize the drawing in the variable (dStartDrawing). This initialization is used to allocate a specific memory zone for the management of drawings.
  3. Draw with the drawing functions.
  4. Insert (if necessary) text into your drawings with dText.
  5. Save the drawing (if necessary) with the backup functions (dSaveImageBMP, dSaveImageGIF, dSaveImageJPEG, dSaveImagePNG.
  6. Print (if necessary) the created file with iPrintImage.
  7. Destroy (if necessary) the drawing found in memory with dEndDrawing.
New in version 17

Drawing in an Image variable

To draw in an Image variable, some rules must be complied with:
  1. Declare an Image variable.
  2. Initialize the drawing in the variable (dStartDrawing). This initialization is used to allocate a specific memory zone for the management of drawings.
  3. Draw with the drawing functions.
  4. Insert (if necessary) text into your drawings with dText.
  5. Save the drawing (if necessary) with the backup functions (dSaveImageBMP, dSaveImageGIF, dSaveImageJPEG, dSaveImagePNG.
  6. Print (if necessary) the created file with iPrintImage.
  7. Destroy (if necessary) the drawing found in memory with dEndDrawing.

Drawing in an Image variable

To draw in an Image variable, some rules must be complied with:
  1. Declare an Image variable.
  2. Initialize the drawing in the variable (dStartDrawing). This initialization is used to allocate a specific memory zone for the management of drawings.
  3. Draw with the drawing functions.
  4. Insert (if necessary) text into your drawings with dText.
  5. Save the drawing (if necessary) with the backup functions (dSaveImageBMP, dSaveImageGIF, dSaveImageJPEG, dSaveImagePNG.
  6. Print (if necessary) the created file with iPrintImage.
  7. Destroy (if necessary) the drawing found in memory with dEndDrawing.
Versions 16 and later
WEBDEV - Browser code

Drawing in browser code

In browser code, transferring the drawing into the image can be quite long (several drawing functions will be used).
To optimize the drawing in the image, the drawing can be displayed once the drawing functions have been used. To do so, you must:
  1. Start drawing with dStartDrawing by using the dForceDisplay constant.
  2. Use the drawing functions to create the drawing.
  3. Use dDisplay to display the drawing in the image.
New in version 16
WEBDEV - Browser code

Drawing in browser code

In browser code, transferring the drawing into the image can be quite long (several drawing functions will be used).
To optimize the drawing in the image, the drawing can be displayed once the drawing functions have been used. To do so, you must:
  1. Start drawing with dStartDrawing by using the dForceDisplay constant.
  2. Use the drawing functions to create the drawing.
  3. Use dDisplay to display the drawing in the image.
WEBDEV - Browser code

Drawing in browser code

In browser code, transferring the drawing into the image can be quite long (several drawing functions will be used).
To optimize the drawing in the image, the drawing can be displayed once the drawing functions have been used. To do so, you must:
  1. Start drawing with dStartDrawing by using the dForceDisplay constant.
  2. Use the drawing functions to create the drawing.
  3. Use dDisplay to display the drawing in the image.
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.
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.
Android System Android (WINDEV Mobile): Android System
[ + ] This application is a tutorial example presenting some of the new features of WINDEV Mobile for Android.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- WIFI
- Bluetooth
- Toast
- Progress Bar control
- 9-image mode
- Compass
- Accelerometer
- Camera control
- LED
- Vibrations
- Notifications
- Drawing functions
- Internet
Pocket Notes Mobile (WINDEV Mobile): Pocket Notes
[ + ] This example is using the drawing functions of WLanguage.
Summary of the example supplied with WINDEV Mobile:
This example allows you to draw graphic "notes" and to save them. You have the ability to enter keywords in order to easily find your notes.
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
The drawing functions Unit examples (WINDEV Mobile): The drawing functions
[ + ] Using the main drawing functions:
- Initialize an Image control for drawing
- Draw simple shapes
- Write a text into a drawing
- Define the color in a drawing
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment