API referenceRendering & Viewer

rasSetRotate

Get/set the cache's view rotation (on top of, not

C
int32_t __stdcall rasGetRotate(IPGC CachePtr);
void __stdcall rasSetRotate(IPGC CachePtr, int32_t Value);
Delphi
function rasGetRotate(CachePtr: IPGC): Integer; stdcall;
procedure rasSetRotate(CachePtr: IPGC; Value: Integer); stdcall;

Purpose. Get/set the cache's view rotation (on top of, not replacing, each page's own stored /Rotate).

Description. rasSetRotate normalizes Value into 0..359 via mod 360 (with a correction for negative results), and clears the render cache (a rotation change invalidates cached bitmaps, same as a zoom change). This is the view-wide rotation consumed by rasClientToPage's inverse-rotation hit-test math (below) and by the buffer-level RotateRGB used in the actual paint path (Rendering, Painting, and the Tile Pipeline).

Parameters.

ParameterDescription
CachePtrTarget page cache.
ValueRotation in degrees; normalized into 0..359 (any multiple of 90 is meaningful to the rest of the pipeline; non-multiples are stored as-is but not specially handled).

Return value. rasGetRotate: current rotation (0 if CachePtr doesn't resolve).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern void rasSetRotate(IntPtr CachePtr, int Value);
Area
Rendering & Viewer
Category

Rasterizer/Rendering

Exported names

rasSetRotate

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.