Freigeben über


PowerPoint.SlideBackgroundPictureOrTextureFillOptions interface

Stellt PowerPoint.SlideBackground-Bild - oder Texturfülloptionen dar.

Hinweise

[ API-Satz: PowerPointApi 1.10 ]

Beispiele

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/slide-management/get-set-background-fill.yaml

// Sets the background of the first selected slide to a picture fill at 60% transparency.
// Uses a sample image from a Base64-encoded string.
await PowerPoint.run(async (context) => {
  const slide: PowerPoint.Slide = context.presentation.getSelectedSlides().getItemAt(0);
  slide.background.fill.setPictureOrTextureFill({
    imageBase64: getSampleImageAsBase64String(),
    transparency: 0.6,
  } as PowerPoint.SlideBackgroundPictureOrTextureFillOptions);
  await context.sync();

  console.log("Background set to picture fill (60% transparent).");
});

Eigenschaften

imageBase64

Wenn angegeben, gibt die Base64-codierten Bilddaten für die Füllung an.

transparency

Wenn angegeben, gibt den Transparenzprozentsatz der Füllung als Wert von 0,0 (undurchsichtig) bis 1,0 (klar) an.

Details zur Eigenschaft

imageBase64

Wenn angegeben, gibt die Base64-codierten Bilddaten für die Füllung an.

imageBase64?: string;

Eigenschaftswert

string

Hinweise

[ API-Satz: PowerPointApi 1.10 ]

transparency

Wenn angegeben, gibt den Transparenzprozentsatz der Füllung als Wert von 0,0 (undurchsichtig) bis 1,0 (klar) an.

transparency: number;

Eigenschaftswert

number

Hinweise

[ API-Satz: PowerPointApi 1.10 ]