You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
1020 B

4 months ago
import type { AABB, TextStyleProps } from '@antv/g';
import type { PathArray } from '@antv/util';
import type { CardinalPlacement } from '../types';
/**
* <zh/>
*
* <en/> Calculate text position style
* @param bounds - <zh/> | <en/> contour bounds
* @param placement - <zh/> | <en/> placement
* @param offsetX - <zh/> x轴偏移 | <en/> x-axis offset
* @param offsetY - <zh/> y轴偏移 | <en/> y-axis offset
* @param closeToContour - <zh/> | <en/> whether the label position is close to the contour
* @param path - <zh/> | <en/> path
* @param autoRotate - <zh/> | <en/> whether to rotate with the contour
* @returns <zh/> | <en/> text style
*/
export declare function getPolygonTextStyleByPlacement(bounds: AABB, placement: CardinalPlacement | 'center', offsetX: number, offsetY: number, closeToContour: boolean, path: PathArray | string, autoRotate: boolean): Partial<TextStyleProps>;