Function

outline

(width?: number, color?: Color, opacity?: number, join?: LineJoin, miterLimit?: number, cap?: LineCap): OutlineComp

Give an object an outline. Doesn't support sprite or text components.

param width- The width of the outline.

param color- The color of the outline.

param opacity- The opacity of the outline.

param join- -The line join style.

param miterLimit- The miter limit ratio.

param cap-The line cap style.

// Add an outline to a rectangle

add([
   rect(40, 40),
   outline(4),
]);

returns The outline comp.

since v2000.0

group Components

kaplay logo

Layer

Miscalenous