import { ShapeArrowSizeEnum, ShapeArrowTypeEnum, ShapeFillEnum, ShapeGradientTypeEnum, ShapeLineCapEnum, ShapeLineDashEnum, ShapeLineJoinEnum, ShapeLineTypeEnum, ShapeTypeEnum } from '@univerjs-pro/engine-shape'; /** * @ignore */ export interface IShapeEnumMixin { /** * Represents the type of the shape. {@link ShapeTypeEnum} * @description This enum defines almost all Excel supported shape types, including basic shapes, block arrows, flowchart shapes, callouts, stars and banners, symbols, and lines. * * @example * ```ts * const fWorkbook = univerAPI.getActiveWorkbook(); * const fWorksheet = fWorkbook.getActiveSheet(); * * // Create a rectangle shape. * const shapeInfo = fWorksheet.newShape() * .setShapeType(univerAPI.Enum.ShapeTypeEnum.Diamond) * .setPosition(1, 1, 0, 0) * .build(); * await fWorksheet.insertShape(shapeInfo); * ``` */ ShapeTypeEnum: typeof ShapeTypeEnum; /** * Represents the fill type of the shape. {@link ShapeFillEnum} * The possible values are: NoFill, SolidFil, GradientFill, PatternFill, PictureFill. * * @example * ```ts * const fWorkbook = univerAPI.getActiveWorkbook(); * const fWorksheet = fWorkbook.getActiveSheet(); * * // Create a rectangle shape with solid fill. * const shapeInfo = fWorksheet.newShape() * .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect) * .setShapeSolidFill('#ff0000') * .setPosition(1, 1, 0, 0) * .build(); * await fWorksheet.insertShape(shapeInfo); * ``` */ ShapeFillEnum: typeof ShapeFillEnum; /** * Represents the gradient type of the shape fill. {@link ShapeGradientTypeEnum} * The possible values are: Linear, Radial, Angular, Diamond. * * @example * ```ts * const fWorkbook = univerAPI.getActiveWorkbook(); * const fWorksheet = fWorkbook.getActiveSheet(); * * // Create a rectangle shape with linear gradient fill. * const shapeInfo = fWorksheet.newShape() * .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect) * .setShapeGradientFill(univerAPI.Enum.ShapeGradientTypeEnum.Linear, [{ * position: 0, * color: '#ff0000' * }, { * position: 0.5, * color: '#00ff00' * }, { * position: 1, * color: '#0000ff' * }], 90 ) * .setPosition(1, 1, 0, 0) * .build(); * await fWorksheet.insertShape(shapeInfo); * ``` */ ShapeGradientTypeEnum: typeof ShapeGradientTypeEnum; /** * Represents the line fill type of the shape stroke. {@link ShapeLineTypeEnum} * The possible values are: NoLine, SolidLine, GradientLine. * * @example * ```ts * const fWorkbook = univerAPI.getActiveWorkbook(); * const fWorksheet = fWorkbook.getActiveSheet(); * * // Create a rectangle shape with solid line stroke type. * const shapeInfo = fWorksheet.newShape() * .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect) * .setStrokeLineType(univerAPI.Enum.ShapeLineTypeEnum.SolidLine) * .setStrokeColor('#000000') * .setPosition(1, 1, 0, 0) * .build(); * await fWorksheet.insertShape(shapeInfo); * ``` */ ShapeLineTypeEnum: typeof ShapeLineTypeEnum; /** * Represents the line dash type of the shape stroke. {@link ShapeLineDashEnum} * The possible values are: Solid, RoundDot, SquareDot, Dash, DashDot, LongDash, LongDashDot, LongDashDotDot. * * @example * ```ts * const fWorkbook = univerAPI.getActiveWorkbook(); * const fWorksheet = fWorkbook.getActiveSheet(); * * // Create a rectangle shape with dashed stroke. * const shapeInfo = fWorksheet.newShape() * .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect) * .setStrokeLineDashType(univerAPI.Enum.ShapeLineDashEnum.Dash) * .setPosition(1, 1, 0, 0) * .build(); * await fWorksheet.insertShape(shapeInfo); * ``` */ ShapeLineDashEnum: typeof ShapeLineDashEnum; /** * Represents the line cap type of the shape stroke. {@link ShapeLineCapEnum} * The possible values are: Flat, Round, Square. * * @example * ```ts * const fWorkbook = univerAPI.getActiveWorkbook(); * const fWorksheet = fWorkbook.getActiveSheet(); * * // Create a rectangle shape with round line cap. * const shapeInfo = fWorksheet.newShape() * .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect) * .setStrokeLineCapType(univerAPI.Enum.ShapeLineCapEnum.Round) * .setPosition(1, 1, 0, 0) * .build(); * await fWorksheet.insertShape(shapeInfo); * ``` */ ShapeLineCapEnum: typeof ShapeLineCapEnum; /** * Represents the line join type of the shape stroke. {@link ShapeLineJoinEnum} * The possible values are: Miter, Round, Bevel. * * @example * ```ts * const fWorkbook = univerAPI.getActiveWorkbook(); * const fWorksheet = fWorkbook.getActiveSheet(); * * // Create a rectangle shape with round line join. * const shapeInfo = fWorksheet.newShape() * .setShapeType(univerAPI.Enum.ShapeTypeEnum.Rect) * .setStrokeLineJoinType(univerAPI.Enum.ShapeLineJoinEnum.Round) * .setPosition(1, 1, 0, 0) * .build(); * await fWorksheet.insertShape(shapeInfo); * ``` */ ShapeLineJoinEnum: typeof ShapeLineJoinEnum; /** * Represents the arrow type of connector line shape. {@link ShapeArrowTypeEnum} * The possible values are: None, Arrow, OpenArrow, DiamondArrow, StealthArrow, OvalArrow. * * @example * ```ts * const fWorkbook = univerAPI.getActiveWorkbook(); * const fWorksheet = fWorkbook.getActiveSheet(); * * // Create a line shape with arrow type. * const shapeInfo = fWorksheet.newConnector() * .setShapeType(univerAPI.Enum.ShapeTypeEnum.StraightConnector1) * .setPosition(1, 1, 0, 0) * .setStartArrowType(univerAPI.Enum.ShapeArrowTypeEnum.Arrow) * .setStrokeWidth(3) * .build(); * await fWorksheet.insertShape(shapeInfo); * ``` */ ShapeArrowTypeEnum: typeof ShapeArrowTypeEnum; /** * Represents the arrow size of connector line shape. {@link ShapeArrowSizeEnum} * The possible values are:Small, Medium, Large. * * @example * ```ts * const fWorkbook = univerAPI.getActiveWorkbook(); * const fWorksheet = fWorkbook.getActiveSheet(); * // Create a line shape with arrow size. * const shapeInfo = fWorksheet.newConnector() * .setShapeType(univerAPI.Enum.ShapeTypeEnum.BentConnector3) * .setPosition(1, 1, 0, 0) * .setStartArrowSize(univerAPI.Enum.ShapeArrowSizeEnum.Medium) * .setStrokeWidth(3) * .build(); * await fWorksheet.insertShape(shapeInfo); * ``` */ ShapeArrowSizeEnum: typeof ShapeArrowSizeEnum; } /** * @ignore */ declare module '@univerjs/core/facade' { interface FEnum extends IShapeEnumMixin { } }