import type { IRenderContext, OxyColor, OxyRect, OxySize, ScreenPoint } from '../..'; import { EdgeRenderingMode, HorizontalAlignment, LineJoin, type OxyImage, RenderContextBase, VerticalAlignment } from '../..'; /** * Provides a IRenderContext decorator that distorts the rendered output. */ export declare class XkcdRenderingDecorator extends RenderContextBase { /** * The decorated IRenderContext. This is the one that does the actual rendering. */ private readonly rc; /** * Initializes a new instance of the XkcdRenderingDecorator class. * @param rc The decorated render context. */ constructor(rc: IRenderContext); /** * Gets or sets the distortion factor. */ distortionFactor: number; /** * Gets or sets the interpolation distance. */ interpolationDistance: number; /** * Gets or sets the font family. */ fontFamily: string; /** * Gets or sets the thickness scale. */ thicknessScale: number; /** * Gets the clip count. */ get clipCount(): number; /** * Draws the line. */ drawLine(points: ScreenPoint[], stroke: OxyColor, thickness: number, edgeRenderingMode: EdgeRenderingMode, dashArray: number[], lineJoin: LineJoin): Promise; /** * Draws the polygon. */ drawPolygon(points: ScreenPoint[], fill: OxyColor, stroke: OxyColor, thickness: number, edgeRenderingMode: EdgeRenderingMode, dashArray: number[], lineJoin: LineJoin): Promise; /** * Draws the text. */ drawText(p: ScreenPoint, text: string, fill: OxyColor, fontFamily: string, fontSize: number, fontWeight: number, rotate: number, halign: HorizontalAlignment, valign: VerticalAlignment, maxSize?: OxySize): Promise; /** * Measures the text. */ measureText(text: string, fontFamily: string, fontSize: number, fontWeight: number): OxySize; /** * Sets the tool tip for the following items. */ setToolTip(text: string): void; /** * Cleans up resources not in use. */ cleanUp(): void; /** * Draws the image. */ drawImage(source: OxyImage, srcX: number, srcY: number, srcWidth: number, srcHeight: number, destX: number, destY: number, destWidth: number, destHeight: number, opacity: number, interpolate: boolean): Promise; /** * Pushes the clip. */ pushClip(clippingRectangle: OxyRect): void; /** * Pops the clip. */ popClip(): void; /** * Gets the transformed font family name. */ private getFontFamily; /** * Distorts the specified points. * @param points The input points. * @returns The distorted points. */ private distort; /** * Generates an array of random numbers. * @param n The number of numbers to generate. * @returns The random numbers. */ private generateRandomNumbers; /** * Applies a moving average filter to the input values. * @param input The input values. * @param m The number of values to average. * @returns The filtered values. */ private applyMovingAverage; /** * Interpolates the input points. * @param input The input points. * @param dist The interpolation distance. * @returns The interpolated points. */ private interpolate; } //# sourceMappingURL=XkcdRenderingDecorator.d.ts.map