UNPKG

textmode.js

Version:

Apply real-time ASCII conversion to any HTML canvas.

21 lines (20 loc) 793 B
import { Shape } from "./Shape"; /** * Rectangle shape implementation that supports both fill and stroke rendering. * Uses the existing Rectangle geometry class for efficient WebGL rendering. */ export declare class RectangleShape extends Shape { private width; private height; constructor(gl: WebGLRenderingContext, x: number, y: number, width: number, height: number); /** * Render the filled rectangle using the existing Rectangle geometry. */ renderFill(): void; /** * Render the stroke rectangle as four separate Rectangle instances for each edge. * This approach ensures clean corners with proper overlap and leverages existing geometry. * @param weight The stroke thickness in pixels */ renderStroke(weight: number): void; }