Apply first texture when filling shape/slide/textart

This commit is contained in:
Julia Radzhabova
2024-04-18 17:00:16 +03:00
parent 8b8d63af9c
commit a40911c55c
8 changed files with 93 additions and 8 deletions

View File

@ -226,7 +226,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.put_fill(fill);
this.imgprops.put_ShapeProperties(props);
this.api.ImgApply(this.imgprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;

View File

@ -214,7 +214,17 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.put_fill(fill);
this.api.ShapeApply(props);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;

View File

@ -202,7 +202,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
this.api.ShapeApply(this.shapeprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;

View File

@ -214,7 +214,17 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.put_fill(fill);
this.api.ShapeApply(props);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;

View File

@ -313,7 +313,17 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.CAscSlideProps();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.put_background(fill);
this.api.SetSlideProps(props);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;

View File

@ -202,7 +202,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.put_type(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.put_fill( new Asc.asc_CFillBlip());
fill.get_fill().put_type(Asc.c_oAscFillBlipType.TILE);
fill.get_fill().put_texture_id(this._texturearray[0].type);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
this.api.ShapeApply(this.shapeprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;

View File

@ -217,7 +217,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_CShapeProperty();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putTextureId(this._texturearray[0].type);
props.asc_putFill(fill);
this.imgprops.asc_putShapeProperties(props);
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;

View File

@ -203,7 +203,18 @@ define([
}
break;
case Asc.c_oAscFill.FILL_TYPE_BLIP:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP;
if (this._state.FillType !== Asc.c_oAscFill.FILL_TYPE_BLIP && !this._noApply && this._texturearray && this._texturearray.length>0) {
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_BLIP
var props = new Asc.asc_TextArtProperties();
var fill = new Asc.asc_CShapeFill();
fill.asc_putType(Asc.c_oAscFill.FILL_TYPE_BLIP);
fill.asc_putFill( new Asc.asc_CFillBlip());
fill.asc_getFill().asc_putType(Asc.c_oAscFillBlipType.TILE);
fill.asc_getFill().asc_putTextureId(this._texturearray[0].type);
props.asc_putFill(fill);
this.shapeprops.put_TextArtProperties(props);
this.api.asc_setGraphicObjectProps(this.imgprops);
}
break;
case Asc.c_oAscFill.FILL_TYPE_PATT:
this._state.FillType = Asc.c_oAscFill.FILL_TYPE_PATT;