UNPKG

js-draw

Version:

Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript.

20 lines (19 loc) 718 B
import { Mat33, Rect2 } from '@js-draw/math'; import AbstractRenderer from '../renderers/AbstractRenderer'; import { BeforeDeallocCallback, CacheState } from './types'; export default class CacheRecord { private onBeforeDeallocCallback; private cacheState; private renderer; private lastUsedCycle; private allocd; allocCount: number; constructor(onBeforeDeallocCallback: BeforeDeallocCallback | null, cacheState: CacheState); startRender(): AbstractRenderer; dealloc(): void; isAllocd(): boolean; realloc(newDeallocCallback: BeforeDeallocCallback): void; getLastUsedCycle(): number; getTransform(drawTo: Rect2): Mat33; setRenderingRegion(drawTo: Rect2): void; }