CreateBlipFill

function CreateBlipFill(sImageUrl: string = null, sBlipFillType: BlipFillType = null): ApiFill

Description

Creates a blip fill to apply to the object using the selected image as the object background.

Parameters

sImageUrlstringdefault: null

The path to the image used for the blip fill (currently only internet URL or Base64 encoded images are supported).

sBlipFillTypeBlipFillTypedefault: null

The type of the fill used for the blip fill (tile or stretch).

Returns

ApiFill

Try It

var oPresentation = Api.GetPresentation();
var oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
var oFill = Api.CreateBlipFill("https://api.onlyoffice.com/content/img/docbuilder/examples/icon_DocumentEditors.png", "tile");
var oStroke = Api.CreateStroke(0, Api.CreateNoFill());
var oDrawing = Api.CreateShape("star10", 300 * 36000, 130 * 36000, oFill, oStroke);
oDrawing.SetPosition(608400, 1267200);
oSlide.AddObject(oDrawing);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).