AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones de dibujo
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
Rotates a WDPic image. All image layers rotate.
Remark: To rotate one single layer, use dRotation.
Example
// Open a source image
MyWDPicImage is WDPic
MyWDPicImage.FileName = fExeDir() + ["\"] + "Source.png"
 
// Rotate the image
PicRotation(MyWDPicImage, 45)
 
// Save the result
PicSave(MyWDPicImage, fExeDir() + ["\"] + "Result.png")
Syntax

Performing a simple rotation Hide the details

<Result> = PicRotation(<WDPic image> , <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 counterclockwise.
<Options>: Integer constant
Rotation options:
drAdaptThe image is flipped and 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 flipped but not enlarged: the image may be truncated.

Performing a rotation while modifying the center of rotation Hide the details

<Result> = PicRotation(<WDPic image> , <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 counterclockwise.
<X>: Real
New X-coordinate of the center of rotation.
<Y>: Real
New Y-coordinate of the center of rotation.
<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 flipped but not enlarged
Related Examples:
WDPic type Unit examples (WINDEV): WDPic type
[ + ] This example shows how to use the WDPic WLanguage type.
Component: wd290pic.dll
Versión mínima requerida
  • Versión 25
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 22/06/2023

Señalar un error o enviar una sugerencia | Ayuda local