PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV 25 feature!
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
Rotates a WDPic image. All image layers rotate.
Remark: To rotate one single layer, use <Image>.Rotation.
Example
// Open a source image
MyWDPicImage is WDPic
MyWDPicImage..FileName = fExeDir() + ["\"] + "Source.png"
 
// Rotate the image
MyWDPicImage.Rotation(45)
 
// Save the result
MyWDPicImage.Save(fExeDir() + ["\"] + "Result.png")
Syntax

Performing a simple rotation Hide the details

<Result> = <WDPic Image>.Rotation(<Angle> [, <Options>])
<Result>: Boolean
  • True if the rotation was performed,
  • False otherwise.
<WDPic Image>: WDPic variable
Name of the WDPic variable that contains the image to use.
<Angle>: Real
Rotation angle (in degrees).
  • If the angle is positive, the image rotates clockwise.
  • If the angle is negative, the image rotates anticlockwise.
<Options>: Integer constant
Rotation options:
drAdaptThe image is turned while it is enlarged. Then, its size is reduced to correspond to the initial image size.
drDefault
(default value)
Enlarge the image (if necessary) so that it corresponds to the dimensions of rotated image.
drNoEnlargingThe image is turned but it is not enlarged: the image may be truncated.

Performing a rotation while modifying the rotation center Hide the details

<Result> = <WDPic Image>.Rotation(<Angle> , <X> , <Y> [, <Options>])
<Result>: Boolean
  • True if the rotation was performed,
  • False otherwise.
<WDPic Image>: WDPic variable
Name of the WDPic variable that contains the image to use.
<Angle>: Real
Rotation angle (in degrees).
  • If the angle is positive, the image rotates clockwise.
  • If the angle is negative, the image rotates anticlockwise.
<X>: Real
New X coordinate of rotation center.
<Y>: Real
New Y coordinate of rotation center.
<Options>: Optional Integer constant
Rotation options:
drDefault
(Default value)
Enlarge the image (if necessary) so that it corresponds to the dimensions of rotated image.
drNoEnlargingThe image is turned but it is not enlarged.
Component : wd250pic.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment