34 lines
795 B
TypeScript
34 lines
795 B
TypeScript
import { DIRECTION } from '../../constant';
|
|
import { BBox } from '../../dependents';
|
|
import { Padding } from '../../interface';
|
|
/** @ignore */
|
|
export declare class PaddingCal {
|
|
private top;
|
|
private right;
|
|
private bottom;
|
|
private left;
|
|
/**
|
|
* 初始的 padding 数据
|
|
* @param top
|
|
* @param right
|
|
* @param bottom
|
|
* @param left
|
|
*/
|
|
constructor(top?: number, right?: number, bottom?: number, left?: number);
|
|
/**
|
|
* 四周增加 padding
|
|
* @param padding
|
|
*/
|
|
shrink(padding: number[]): PaddingCal;
|
|
/**
|
|
* 在某一个方向增加 padding
|
|
* @param bbox
|
|
* @param direction
|
|
*/
|
|
inc(bbox: BBox, direction: DIRECTION): PaddingCal;
|
|
/**
|
|
* 获得最终的 padding
|
|
*/
|
|
getPadding(): Padding;
|
|
}
|