API referenceRendering & Viewer

rasSetMinLineWidth

Minimum stroke line width — genuinely two separate

C
BOOL32 __stdcall rasSetMinLineWidth(IPGC CachePtr, float Value);
void __stdcall rasSetMinLineWidth2(IRAS RasPtr, float Value);
void __stdcall rasSetScreenRes(IRAS RasPtr, uint32_t Value);
Delphi
function rasSetMinLineWidth(CachePtr: IPGC; Value: Single): LongBool; stdcall;
procedure rasSetMinLineWidth2(RasPtr: IRAS; Value: Single); stdcall;
procedure rasSetScreenRes(RasPtr: IRAS; Value: Cardinal); stdcall;

Purpose. Minimum stroke line width — genuinely two separate settings on two different handle types, plus a screen-resolution hint, both scoped to the IRAS rasterizer rather than the IPGC page cache.

Description. rasSetMinLineWidth (page-cache-scoped, C.MinLineWidth) and rasSetMinLineWidth2 (rasterizer-scoped, R.MinLW2) are two independent stored values on two independent handle types despite the "2" suffix suggesting a simple v2/replacement relationship — a document/viewer using both the tiled page-cache paint path (rasPaint) and a standalone IRAS rasterizer (pdfRenderPage, Rendering Intent and Page Render Entry Points) must set the minimum line width twice, once per mechanism, for consistent results across both. rasSetScreenRes similarly stores R.ScreenRes on the rasterizer only — there is no page-cache-level screen-resolution setting in this ABI surface. This chapter did not trace every consumer of MinLW2/ScreenRes inside the engine stroke rasterizer beyond confirming they are real, retained state (per the "GAP-7 (full): rasterizer-level minimum line width / screen resolution (state the stroke rasteriser + zoom logic consult)" comment).

Parameters.

ParameterDescription
CachePtr*(MinLineWidth only)* Target page cache.
RasPtr*(MinLineWidth2/ScreenRes only)* Target rasterizer — a different handle type from CachePtr above.
ValueNew minimum line width (in device pixels) or screen resolution (DPI).

Return value. rasSetMinLineWidth: True if CachePtr resolves. rasSetMinLineWidth2/rasSetScreenRes: none (procedures).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Rendering & Viewer
Category

Rasterizer/Rendering

Exported names

rasSetMinLineWidth

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.