Interface TextLayerOptions
coverageGamma?: number;
opacity?: number;
order?: number;
positionPx?: { x: number; y: number };
rotationRad?: number;
scale?: number;
visible?: boolean;
}
Properties
Optional Readonlycoverage Gamma
Coverage gamma for anti-aliased edges. Raises per-pixel coverage to 1/coverageGamma
before compositing, darkening/thickening anti-aliased edges to mimic the gamma-space
blending used by native text renderers (DirectWrite/CoreText "stem darkening"). Only
meaningful when rendering into an sRGB (linear-blended) surface, where correct linear
AA otherwise makes text look lighter/thinner than gamma-space rasterizers. Values >1
thicken; 1 (default) is a no-op. Typical text values are ~1.8–2.2.
Optional Readonlyopacity
Alpha multiplier in [0, 1]. Default 1.
Optional Readonlyorder
Sort order within a renderer (lower draws first). Default 0.
Optional Readonlyposition Px
Top-left origin (in canvas pixels) for the layer's local coordinate frame. Default (0, 0).
Optional Readonlyrotation Rad
Z-axis rotation about positionPx, in radians. Default 0.
Optional Readonlyscale
Uniform scale applied to the laid-out text. Default 1.
Optional Readonlyvisible
Default true.
Initial placement and compositing options for a 2D text layer in a standalone text renderer.