ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Diagram editor functions
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
DiagramToImage (Function)
In french: DiagrammeVersImage
Exports a diagram to a variable of type Image. The generated image can then be saved or displayed in another control.
Example
// Save a diagram to a PNG file
DiagImage is Image
DiagImage = DiagramToImage(DIAGEDT_MyDiagram.Value)
IF ErrorOccurred THEN
Error()
RETURN
END
dSaveImagePNG(DiagImage, "DiagramExport.png")
MyDiagram is Diagram <- DIAGEDT_MyDiagram
 
// Retrieves the generated image
MyImage is Image <- DiagramToImage(MyDiagram)
 
// Open the image
OpenDocument(MyImage)
Syntax
<Result> = DiagramToImage(<Diagram> [, <Background color>])
<Result>: Image variable
Variable of type Image corresponding to the image of the diagram.
<Diagram>: Name of the control or Diagram variable
Diagram to be used. This parameter corresponds to:
  • the name of a Diagram Editor control.
  • the name of a variable of type Diagram.
<Background color>: Optional integer
Image background color. This color can correspond to:If the background color is not specified, the diagram will be exported as is, with the background color already defined (if any).
Component: wd290mdl.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/23/2023

Send a report | Local help