Browse Source

[优化] 优化字体,防止与字体同色背景无法显示

develop
徐振升 4 years ago
parent
commit
5a921d5bf1
  1. 64
      src/app/working-area/working-area.component.ts

64
src/app/working-area/working-area.component.ts

@ -817,11 +817,27 @@ enum PaintMode {
*
*/
export class SinglePointIcon extends PIXI.Container {
style = new PIXI.TextStyle({
fontFamily: 'Arial',
fontSize: 18,
fontStyle: 'normal',
fontWeight: 'bold',
fill: ['#000000'],
stroke: '#00ff99',
strokeThickness: 3,
dropShadow: true,
dropShadowColor: '#000000',
dropShadowBlur: 3,
dropShadowAngle: Math.PI / 6,
dropShadowDistance: 1,
wordWrap: false,
wordWrapWidth: 100,
});
private text = new PIXI.Text(this.assetData.Name
+ '\r\n'
+ this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue, {
fontFamily: 'Arial', fontSize: 18, fill: 0xffffff, align: 'center'
});
+ this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style);
constructor(public assetData: any, private workingArea: WorkingAreaComponent) {
super();
this.workingArea.backgroundImage.addChild(this);
@ -897,9 +913,26 @@ export class MultipointIcon extends PIXI.Container {
public pointsData: PIXI.Point[];
public pointsGraphics: PIXI.Graphics[] = [];
public iconsTilingSprite: PIXI.TilingSprite[] = [];
private text = new PIXI.Text(this.assetData.Name, {
fontFamily: 'Arial', fontSize: 18, fill: 0xffffff, align: 'center'
style = new PIXI.TextStyle({
fontFamily: 'Arial',
fontSize: 18,
fontStyle: 'normal',
fontWeight: 'bold',
fill: ['#000000'],
stroke: '#00ff99',
strokeThickness: 3,
dropShadow: true,
dropShadowColor: '#000000',
dropShadowBlur: 3,
dropShadowAngle: Math.PI / 6,
dropShadowDistance: 1,
wordWrap: false,
wordWrapWidth: 100,
});
private text = new PIXI.Text(this.assetData.Name
+ '\r\n'
+ this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style);
/**
*
* @param texture
@ -1097,9 +1130,26 @@ export class PolygonIcon extends PIXI.Container {
public pointsGraphics: PIXI.Graphics[] = [];
public polygonGraphics: PIXI.Graphics = new PIXI.Graphics();
public polygonLineGraphics: PIXI.Graphics = new PIXI.Graphics();
private text = new PIXI.Text(this.assetData.Name, {
fontFamily: 'Arial', fontSize: 18, fill: 0xffffff, align: 'center'
style = new PIXI.TextStyle({
fontFamily: 'Arial',
fontSize: 18,
fontStyle: 'normal',
fontWeight: 'bold',
fill: ['#000000'],
stroke: '#00ff99',
strokeThickness: 3,
dropShadow: true,
dropShadowColor: '#000000',
dropShadowBlur: 3,
dropShadowAngle: Math.PI / 6,
dropShadowDistance: 1,
wordWrap: false,
wordWrapWidth: 100,
});
private text = new PIXI.Text(this.assetData.Name
+ '\r\n'
+ this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style);
/**
*
* @param points

Loading…
Cancel
Save