852d7f077728e20959e7ff59afbcf59d99d956dd787bdcad0c0ab4153814891c3d6868e00aea0beecc6654fbbb1dad2d6e5ba1b437503cf2c40afae7b93a8f 939 B

123456789101112131415161718
  1. import * as graphicUtil from '../../util/graphic.js';
  2. import Model from '../Model.js';
  3. import { LabelOption, ColorString } from '../../util/types.js';
  4. export declare type LabelFontOption = Pick<LabelOption, 'fontStyle' | 'fontWeight' | 'fontSize' | 'fontFamily'>;
  5. declare type LabelRectRelatedOption = Pick<LabelOption, 'align' | 'verticalAlign' | 'padding' | 'lineHeight' | 'baseline' | 'rich' | 'width' | 'height' | 'overflow'> & LabelFontOption;
  6. declare class TextStyleMixin {
  7. /**
  8. * Get color property or get color from option.textStyle.color
  9. */
  10. getTextColor(this: Model, isEmphasis?: boolean): ColorString;
  11. /**
  12. * Create font string from fontStyle, fontWeight, fontSize, fontFamily
  13. * @return {string}
  14. */
  15. getFont(this: Model<LabelFontOption>): string;
  16. getTextRect(this: Model<LabelRectRelatedOption> & TextStyleMixin, text: string): graphicUtil.BoundingRect;
  17. }
  18. export default TextStyleMixin;