API Reference
@univerjs
@univerjs/engine-render
functions
Drawlinebybordertype

@univerjs/engine-render v0.4.2Docs


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

submodules/univer/packages/engine-render/src/basics/draw.ts:64 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.