PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Saving a chart
  • Backup in BMP format
  • Differences between grDestinationBMP and grSaveBMP
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
Saves a chart that was previously drawn in a file in BMP format.
Versions 15 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See The charts for more details.
New in version 15
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See The charts for more details.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See The charts for more details.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Example
// Saves the chart named "MyChart" in the "C:\Charts\Chart.BMP" file
grSaveBMP("MyChart", "C:\Charts\Chart.BMP")
Syntax
<Result> = grSaveBMP(<Chart Name> , <Name of BMP File>)
<Result>: Boolean
  • True if the chart was saved,
  • False otherwise.
<Chart Name>: Character string (with or without quotes)
Name of chart to use. This name corresponds to:
  • the chart name defined by programming with grCreate.
  • the name of Chart control found in the window editor, page editor or report editor.
<Name of BMP File>: Character string (with quotes)
Name and full path of BMP file to create. The extension of the file is mandatory. This BMP file is created during the call to grSaveBMP. The file is overwritten and re-created if it already existed.
Remarks

Saving a chart

  • To save a chart, the chart must have been drawn beforehand (grDraw). The modifications performed since the last call to grDraw will be ignored.
  • The default size of the image is set to 639 x 479. These dimensions are taken into account if the chart was never drawn or if it is not visible. If the chart was created by grCreate, the dimensions can be specified with grWndSize.

Backup in BMP format

  • This file can be read by a tool that recognizes the BMP format.
  • The size of the file is identical to the size of the destination (size of window size, control or file).
  • We recommend that you preview the chart before it is saved in a file.

Differences between grDestinationBMP and grSaveBMP

  • grDestinationBMP is used to define the destination for the next drawing of the chart. When using grDraw, the chart will be drawn in the specified file and all the modifications performed since the last drawing of the chart will be taken into account.
  • grSaveBMP is used to directly save the chart in a file in BMP format. The image saved corresponds to the chart during the last call to grDraw. The modifications performed on the chart since the last call to grDraw will be ignored.
Related Examples:
The Chart functions Unit examples (WINDEV): The Chart functions
[ + ] Using the main chart designer features of WINDEV:
- Create a Pie, Column or Line chart
- Define the display area of a chart
- Define the chart options (legend, percentage, ...)
- Draw a line on a chart
Components
WINDEVWEBDEV - Server codeReports and Queries wd230grf.dll
Windows Mobile wp230grf.dll
Linux wd230grf.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Exemplo GrSaveBmp
Exemplo GrSaveBmp

grSaveBMP(CHART_tecnico,"C:\_Grafico\Grafico_bmp")
IMG_Grafico="C:\_Grafico\Grafico_bmp"

//Blog com Video e Exemplo

http://windevdesenvolvimento.blogspot.com.br/2016/12/aula-987-windev-grafico-006-grava.html

https://www.youtube.com/watch?v=pJtmMWFTokA

De matos
Dec. 06 2016