@univerjs/engine-render v0.5.0-beta.1Docs


Function: drawLineByBorderType()

function drawLineByBorderType(
   ctx, 
   type, 
   lineWidthBuffer, 
   position): void

Parameters

ParameterTypeDescription
ctxUniverRenderingContextcanvas context
typeBORDER_TYPEtop bottom left right
lineWidthBuffernumberSolving the problem of mitered corners in the drawing of borders thicker than 2 pixels, caused by the line segments being centered.
positionIPositionborder draw position

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/draw.ts:64