ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV 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
GenerateGeometricImage (Function)
In french: GénèreImageGéométrique
Randomly generates an image with geometric shapes. This image can be used to temporarily fill an Image control, for example. This allows you to fill a user's "photo" field, while the user uploads one of their own.
Example
// Generate a geometric image
MyImage is Image = GenerateGeometricImage()
Syntax
<Result> = GenerateGeometricImage([<Width> [, <Height> [, <Color> [, <Background color>]]]])
<Result>: Image variable
Image variable that contains the generated image.
<Width>: Optional integer
Width of the generated image, in pixels. By default, the width of the generated image is 80 pixels.
<Height>: Optional integer
Height of the generated image, in pixels. By default, the height of the generated image is the same as the width.
<Color>: Optional integer
Default background color of the different geometric shapes. This color can correspond to:
  • an RGB color (returned by RGB),
  • an HSL color (returned by HSL),
  • a WLanguage preset color.
  • a variable of type Color. In this case, the opacity specified in the variable is taken into account.
If this parameter is not specified, a random color will be used.
<Background color>: Optional integer
Default background color of the different geometric shapes. This color can correspond to:
  • an RGB color (returned by RGB),
  • an HSL color (returned by HSL),
  • a WLanguage preset color.
  • a variable of type Color. In this case, the opacity specified in the variable is taken into account.
If this parameter is not specified, a transparent background will be used.
Remarks
The randomness of the image generation is based on the Random function. To avoid getting the same images each time the program is run, call InitRandom in the project initialization event.
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/08/2022

Send a report | Local help