|
@@ -59,7 +59,7 @@ export class STextItem extends SObjectItem {
|
|
|
}
|
|
|
|
|
|
/** 边框色 */
|
|
|
- private _strokeColor: SColor = SColor.Black;
|
|
|
+ private _strokeColor: SColor = SColor.Transparent;
|
|
|
get strokeColor(): SColor {
|
|
|
return this._strokeColor;
|
|
|
}
|
|
@@ -132,23 +132,21 @@ export class STextItem extends SObjectItem {
|
|
|
protected drawShowText(painter: SPainter): void {
|
|
|
//绘制矩形轮廓
|
|
|
if (this.selected) {
|
|
|
- this.borderStyle = SLineStyle.Dashed;
|
|
|
+ painter.shadow.shadowBlur = 10;
|
|
|
+ painter.shadow.shadowColor = new SColor(`#00000060`);
|
|
|
+ painter.shadow.shadowOffsetX = 5;
|
|
|
+ painter.shadow.shadowOffsetY = 5;
|
|
|
} else {
|
|
|
- this.borderStyle = SLineStyle.None;
|
|
|
- }
|
|
|
- if (this.borderStyle == SLineStyle.Dashed) {
|
|
|
- painter.pen.lineDash = [
|
|
|
- this.lineWidth * 3,
|
|
|
- this.lineWidth * 7
|
|
|
- ];
|
|
|
- painter.pen.lineWidth = this.lineWidth;
|
|
|
- painter.brush.color = this.backgroundColor;
|
|
|
- painter.pen.color = this.strokeColor;
|
|
|
- painter.drawRect(this.boundingRect());
|
|
|
+ painter.shadow.shadowColor = SColor.Transparent;
|
|
|
}
|
|
|
+ painter.brush.color = this.backgroundColor;
|
|
|
+ painter.pen.lineWidth = this.lineWidth;
|
|
|
+ painter.pen.color = this.strokeColor;
|
|
|
+ painter.drawRect(this.boundingRect());
|
|
|
|
|
|
//绘制文本
|
|
|
painter.brush.color = new SColor(this.color);
|
|
|
+ painter.shadow.shadowColor = SColor.Transparent;
|
|
|
painter.font = this.font;
|
|
|
this._textArr.forEach((text: string, index: number) => {
|
|
|
painter.drawText(
|