custom-qrcode-browser
Version:
[](https://github.com/CyrilDesch/custom-qrcode-browser/actions/workflows/continuous-integrations.yaml) [![L
38 lines (37 loc) • 1.69 kB
TypeScript
import { type IQrColor } from "../QrColor";
import type { QrShapesDesigner } from "../QrShapesDesigner";
import type { IQrSVGWithImage } from "../SVGInterfaces";
interface IQrLogoShape extends IQrSVGWithImage {
}
declare abstract class BaseLogoShape implements IQrLogoShape {
imageData: string | null;
sizeRatio: number;
padding: number;
color: IQrColor;
constructor(imageData?: string | null, sizeRatio?: number, padding?: number, color?: IQrColor);
protected addLogoCoordinates(x: number, y: number, width: number, height: number, designer: QrShapesDesigner): void;
protected createImageElement(x: number, y: number, width: number, height: number, clipPathId?: string): SVGElement;
abstract createSvgElement(mainSvg: SVGElement, designer: QrShapesDesigner): SVGElement;
}
declare class SquareShape extends BaseLogoShape {
cornerRadius: number;
constructor(imageData?: string | null, sizeRatio?: number, padding?: number, color?: IQrColor, cornerRadius?: number);
createSvgElement(mainSvg: SVGElement, designer: QrShapesDesigner): SVGElement;
private createClipPath;
}
declare class CircleShape extends BaseLogoShape {
createSvgElement(mainSvg: SVGElement, designer: QrShapesDesigner): SVGElement;
private createClipPath;
private addCircleCoordinates;
}
declare class RhombusShape extends BaseLogoShape {
createSvgElement(mainSvg: SVGElement, designer: QrShapesDesigner): SVGElement;
private createClipPath;
private addRhombusLogoCoordinates;
}
export declare const QrLogoShape: {
Square: typeof SquareShape;
Circle: typeof CircleShape;
Rhombus: typeof RhombusShape;
};
export type { IQrLogoShape };