New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dileep-draw

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dileep-draw

drawing utilities for HTML5 Canvas

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

@daeinc/draw

drawing utilities for HTML5 Canvas.

Install

npm i dileep-draw

then,

import { ... } from "dileep-draw"

Functions

It uses two custom types, Pt and Pts, each representing number[] and Pt[].

import type { Pt, Pts } from "dileep-draw";

drawCircle

const drawCircle: (ctx: CanvasRenderingContext2D, pt: Pt, diam: number) => void;

drawFillText

const drawFillText: (
  ctx: CanvasRenderingContext2D,
  msg: string,
  pt: Pt
) => void;

drawLine

const drawLine: (ctx: CanvasRenderingContext2D, pt1: Pt, pt2: Pt) => void;

drawPath

const drawPath: (
  ctx: CanvasRenderingContext2D,
  path: Pts,
  close?: boolean
) => void;

drawSmoothPath

const drawSmoothPath: (ctx: CanvasRenderingContext2D, path: Pts) => void;

Uses quadratic curves to smoothen hard edges of path. The input path is expected to be generated with generateSmoothPath() from another package dileep-geom.

License

MIT

FAQs

Package last updated on 13 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts