1import { XYGlyph, XYGlyphView, XYGlyphData } from "./xy_glyph"; 2import { TextVector } from "../../core/property_mixins"; 3import { PointGeometry } from "../../core/geometry"; 4import * as visuals from "../../core/visuals"; 5import * as p from "../../core/properties"; 6import { Context2d } from "../../core/util/canvas"; 7import { Selection } from "../selections/selection"; 8export declare type TextData = XYGlyphData & p.UniformsOf<Text.Mixins> & { 9 readonly text: p.Uniform<string>; 10 readonly angle: p.Uniform<number>; 11 readonly x_offset: p.Uniform<number>; 12 readonly y_offset: p.Uniform<number>; 13 _sxs: number[][][]; 14 _sys: number[][][]; 15}; 16export interface TextView extends TextData { 17} 18export declare class TextView extends XYGlyphView { 19 model: Text; 20 visuals: Text.Visuals; 21 private _rotate_point; 22 private _text_bounds; 23 protected _render(ctx: Context2d, indices: number[], data?: TextData): void; 24 protected _hit_point(geometry: PointGeometry): Selection; 25 scenterxy(i: number): [number, number]; 26} 27export declare namespace Text { 28 type Attrs = p.AttrsOf<Props>; 29 type Props = XYGlyph.Props & { 30 text: p.NullStringSpec; 31 angle: p.AngleSpec; 32 x_offset: p.NumberSpec; 33 y_offset: p.NumberSpec; 34 } & Mixins; 35 type Mixins = TextVector; 36 type Visuals = XYGlyph.Visuals & { 37 text: visuals.TextVector; 38 }; 39} 40export interface Text extends Text.Attrs { 41} 42export declare class Text extends XYGlyph { 43 properties: Text.Props; 44 __view_type__: TextView; 45 constructor(attrs?: Partial<Text.Attrs>); 46 static init_Text(): void; 47} 48//# sourceMappingURL=text.d.ts.map