إدارة تكبير العرض التقديمي في JavaScript

المقدمة

تتيح لك إنتقالات الزوم في PowerPoint التنقل بين الشرائح والأقسام المحددة أثناء عرض الشرائح. باستخدام Aspose.Slides لـ Node.js عبر Java، يمكنك إنشاء زوم للشرائح، زوم للأقسام، وزوم للملخص وتخصيص معايناتهم، حدودهم، وانتقالاتهم.

نظرة عامة على زوم PowerPoint

زوم الشريحة

يمكن أن يجعل زوم الشريحة عرضك التقديمي أكثر ديناميكية، حيث يتيح لك التنقل بحرية بين الشرائح بأي ترتيب تختاره دون إيقاف تدفق العرض. زوم الشرائح مفيد للعروض القصيرة التي لا تحتوي على العديد من الأقسام، ولكن يمكنك أيضًا استخدامه في سيناريوهات عرض مختلفة.

تمكنك زوم الشرائح من استكشاف المعلومات المتعلقة من شريحة نظرة عامة واحدة.

اختيار الشرائح لزوم الشريحة

بالنسبة لكائنات زوم الشرائح، توفر Aspose.Slides التعداد ZoomImageType، الفئة ZoomFrame، والطرق في فئة ShapeCollection.

إنشاء إطارات زوم

استخدم ShapeCollection.addZoomFrame لوضع روابط إلى شرائح فردية على شريحة النظرة العامة. يُنشئ هذا المثال شريحتين هدفيتين بخلفيات وعناوين مختلفة، ثم يضيف معاينة لكل منهما إلى الشريحة الأولى ويحفظ العرض التقديمي كملف PPTX. يتم تحديد موضع الإطار وأبعاده بالنقاط.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation();
try {
    let overviewSlide = presentation.getSlides().get_Item(0);

    let secondSlide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    let thirdSlide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());

    secondSlide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));
    secondSlide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    secondSlide.getBackground().getFillFormat().getSolidFillColor().setColor(java.getStaticFieldValue("java.awt.Color", "CYAN"));

    let textBox = secondSlide.getShapes().addAutoShape(aspose.slides.ShapeType.Rectangle, 100, 200, 500, 200);
    textBox.getTextFrame().setText("Second Slide");

    thirdSlide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));
    thirdSlide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    thirdSlide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 189, 183, 107));

    textBox = thirdSlide.getShapes().addAutoShape(aspose.slides.ShapeType.Rectangle, 100, 200, 500, 200);
    textBox.getTextFrame().setText("Third Slide");

    overviewSlide.getShapes().addZoomFrame(20, 20, 250, 200, secondSlide);
    overviewSlide.getShapes().addZoomFrame(200, 250, 250, 200, thirdSlide);

    presentation.save("presentation.pptx", aspose.slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

إنشاء إطارات زوم بصور مخصصة

مرّر صورة مخصصة إلى ShapeCollection.addZoomFrame لاستبدال المعاينة الافتراضية لشريحة الهدف. يتطلب هذا المثال صورة محلية، يتم تحميلها باستخدام Images.fromFile، وتضيفها إلى العرض عبر ImageCollection.addImage. يعرض الإطار الناتج تلك الصورة مع الاحتفاظ بالرابط إلى الشريحة الثانية.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation();
try {
    let overviewSlide = presentation.getSlides().get_Item(0);

    let slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.getStaticFieldValue("java.awt.Color", "CYAN"));

    let textBox = slide.getShapes().addAutoShape(aspose.slides.ShapeType.Rectangle, 100, 200, 500, 200);
    textBox.getTextFrame().setText("Second Slide");

    let previewImage;
    let image = aspose.slides.Images.fromFile("image.png");
    try {
        previewImage = presentation.getImages().addImage(image);
    } finally {
        image.dispose();
    }

    overviewSlide.getShapes().addZoomFrame(20, 20, 300, 200, slide, previewImage);

    presentation.save("presentation.pptx", aspose.slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

تنسيق إطارات الزوم

يُخصص هذا المثال إطارين من زوم الشرائح. يعيّن صورة محلية للإطار الأول عبر ZoomObject.setZoomImage، ويضبط للإطار الثاني حدًا ورديًا من نوع dash‑dot بسُمك خمس نقاط عبر Shape.getLineFormat. تمرير false إلى ZoomObject.setShowBackground يخفي خلفية الإطار الثاني. يُطلَب وجود صورة محلية للمعاينة المخصصة؛ كلا الإطارين يحتفظان بأهداف الشرائح في ملف PPTX المحفوظ.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation();
try {
    let overviewSlide = presentation.getSlides().get_Item(0);

    let secondSlide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    let thirdSlide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());

    secondSlide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));
    secondSlide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    secondSlide.getBackground().getFillFormat().getSolidFillColor().setColor(java.getStaticFieldValue("java.awt.Color", "CYAN"));

    let textBox = secondSlide.getShapes().addAutoShape(aspose.slides.ShapeType.Rectangle, 100, 200, 500, 200);
    textBox.getTextFrame().setText("Second Slide");

    thirdSlide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));
    thirdSlide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    thirdSlide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 189, 183, 107));

    textBox = thirdSlide.getShapes().addAutoShape(aspose.slides.ShapeType.Rectangle, 100, 200, 500, 200);
    textBox.getTextFrame().setText("Third Slide");

    let firstZoomFrame = overviewSlide.getShapes().addZoomFrame(20, 20, 250, 200, secondSlide);
    let secondZoomFrame = overviewSlide.getShapes().addZoomFrame(200, 250, 250, 200, thirdSlide);

    let previewImage;
    let image = aspose.slides.Images.fromFile("image.png");
    try {
        previewImage = presentation.getImages().addImage(image);
    } finally {
        image.dispose();
    }

    firstZoomFrame.setZoomImage(previewImage);

    secondZoomFrame.getLineFormat().setWidth(5);
    secondZoomFrame.getLineFormat().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    secondZoomFrame.getLineFormat().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 255, 105, 180));
    secondZoomFrame.getLineFormat().setDashStyle(java.newByte(aspose.slides.LineDashStyle.DashDot));

    secondZoomFrame.setShowBackground(false);

    presentation.save("presentation.pptx", aspose.slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

زوم القسم

يُربط زوم القسم بقسم في عرضك التقديمي. استخدمه لإعادة زيارة موضوع أو لإظهار كيف تتصل أجزاء العرض المختلفة.

اختيار قسم لزوم القسم

بالنسبة لكائنات زوم القسم، توفر Aspose.Slides الفئة SectionZoomFrame والطرق على فئة ShapeCollection.

إنشاء إطارات زوم القسم

أنشئ قسمًا باستخدام SectionCollection.addSection، ثم مرّر القسم المُرجع إلى ShapeCollection.addSectionZoomFrame. يضع هذا المثال زوم قسم على الشريحة الأولى ويربطه بقسم يبدأ بشريحة ملونة. يتم تحديد موضع الإطار وأبعاده بالنقاط، ويحفظ العرض كملف PPTX.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation();
try {
    let overviewSlide = presentation.getSlides().get_Item(0);

    let slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 154, 205, 50));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    let section = presentation.getSections().addSection("Section 1", slide);
    let sectionZoomFrame = overviewSlide.getShapes().addSectionZoomFrame(20, 20, 300, 200, section);

    presentation.save("presentation.pptx", aspose.slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

إنشاء إطارات زوم القسم بصور مخصصة

يسمح تحميل صورة مخصصة في ShapeCollection.addSectionZoomFrame بعرض معاينة مخصصة دون تغيير قسم الوجهة. يتطلّب هذا المثال صورة محلية، تُحمَّل عبر Images.fromFile وتُضاف من خلال ImageCollection.addImage. يحتوي العرض المحفوظ على زوم قسم على الشريحة الأولى مرتبطًا بالقسم المُنشأ حديثًا.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation();
try {
    let overviewSlide = presentation.getSlides().get_Item(0);

    let slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 154, 205, 50));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    let previewImage;
    let image = aspose.slides.Images.fromFile("image.png");
    try {
        previewImage = presentation.getImages().addImage(image);
    } finally {
        image.dispose();
    }

    let section = presentation.getSections().addSection("Section 1", slide);
    let sectionZoomFrame = overviewSlide.getShapes().addSectionZoomFrame(20, 20, 300, 200, section, previewImage);

    presentation.save("presentation.pptx", aspose.slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

تغيير القسم الهدف لزوم القسم

استخدم SectionZoomFrame.setTargetSection لإعادة توجيه زوم قسم موجود دون الحاجة لإنشائه من جديد. اختر قسمًا ممتلئًا من مجموعة Presentation.getSections للعرض التقديمي نفسه. ترك القسم فارغًا يترك الهدف الحالي دون تغيير، لذا تحقق من Section.getSlidesListOfSection قبل تعيينه. راجع Manage Slide Sections لمزيد من المعلومات حول الأقسام.

المثال التالي يحمل ملف عرض تقديمي يجب أن يحتوي على أقسام متعددة مُعبأة، وزوم قسم موجود باسم Section navigation، وقسم يحمل الاسم الفريد Results. يبحث في جميع الشرائح عن الزوم ويجد الوجهة بالاسم بدلًا من الفهرس الذي قد يتغيّر عند إعادة ترتيب الأقسام. إذا لم تكن الأسماء فريدة، استخدم Section.getSectionId لتحديد الوجهة بدلاً من ذلك.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation("section-zoom.pptx");
try {
    let zoom = null;
    for (let i = 0; i < presentation.getSlides().size(); i++) {
        const slide = presentation.getSlides().get_Item(i);
        for (let j = 0; j < slide.getShapes().size(); j++) {
            const shape = slide.getShapes().get_Item(j);
            if (java.instanceOf(shape, "com.aspose.slides.ISectionZoomFrame") && shape.getName() === "Section navigation") {
                zoom = shape;
                break;
            }
        }
        if (zoom != null) {
            break;
        }
    }

    let targetSection = null;
    for (let i = 0; i < presentation.getSections().size(); i++) {
        const section = presentation.getSections().get_Item(i);
        if (section.getName() === "Results") {
            targetSection = section;
            break;
        }
    }

    if (zoom == null || targetSection == null) {
        console.log("The section zoom or destination section was not found.");
    } else if (targetSection.getSlidesListOfSection().size() == 0) {
        console.log("The destination section is empty.");
    } else {
        let currentSection = zoom.getTargetSection();
        console.log("Current section: " + (currentSection == null ? "" : currentSection.getName()));
        zoom.setTargetSection(targetSection);
        presentation.save("section-zoom-updated.pptx", aspose.slides.SaveFormat.Pptx);
    }
} finally {
    presentation.dispose();
}

تنسيق إطارات زوم القسم

يُعيد هذا المثال تحريك وتغيير حجم زوم القسم إلى 100 × 75 نقطة، يعيّن صورة محلية عبر ZoomObject.setZoomImage، ويضيف حدًا بنيًا من نوع dash‑dot بسُمك 2.5 نقطة. يُفعِّل ZoomObject.setReturnToParent للعودة إلى الشريحة الأصلية بعد القسم، يعطِّل ZoomObject.setShowBackground، ويضبط ZoomObject.setTransitionDuration إلى 1.5 ثانية. يُطلَب وجود صورة محلية للمعاينة المخصصة.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation();
try {
    let overviewSlide = presentation.getSlides().get_Item(0);

    let slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 154, 205, 50));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    let section = presentation.getSections().addSection("Section 1", slide);

    let sectionZoomFrame = overviewSlide.getShapes().addSectionZoomFrame(20, 20, 300, 200, section);
    sectionZoomFrame.setX(100);
    sectionZoomFrame.setY(300);
    sectionZoomFrame.setWidth(100);
    sectionZoomFrame.setHeight(75);

    let previewImage;
    let image = aspose.slides.Images.fromFile("image.png");
    try {
        previewImage = presentation.getImages().addImage(image);
    } finally {
        image.dispose();
    }

    sectionZoomFrame.setZoomImage(previewImage);

    sectionZoomFrame.setReturnToParent(true);
    sectionZoomFrame.setShowBackground(false);

    sectionZoomFrame.getLineFormat().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    sectionZoomFrame.getLineFormat().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 165, 42, 42));
    sectionZoomFrame.getLineFormat().setDashStyle(java.newByte(aspose.slides.LineDashStyle.DashDot));
    sectionZoomFrame.getLineFormat().setWidth(2.5);

    sectionZoomFrame.setTransitionDuration(java.newFloat(1.5));

    presentation.save("presentation.pptx", aspose.slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

ملخص الزوم

يوفر ملخص الزوم نظرة عامة على أقسام العرض التقديمي. أثناء عرض الشرائح، يمكنك استخدامه للانتقال إلى قسم، تخطي إلى الأمام، أو إعادة زيارة موضوع دون اتباع ترتيب الشرائح.

اختيار الأقسام لملخص الزوم

بالنسبة لكائنات ملخص الزوم، توفر Aspose.Slides الفئات SummaryZoomFrame، SummaryZoomSection، وSummaryZoomSectionCollection والطرق على فئة ShapeCollection.

إنشاء ملخص زوم

استخدم ShapeCollection.addSummaryZoomFrame لإنشاء نظرة عامة على أقسام العرض. يُنشئ هذا المثال أربعة أقسام بخلفيات شرائح مميزة ويضيف ملخص زوم إلى الشريحة الأولى. يتم تحديد موضع الإطار وأبعاده بالنقاط، وتُحفظ النظرة العامة الناتجة في عرض تقديمي بصيغة PPTX.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation();
try {
    let overviewSlide = presentation.getSlides().get_Item(0);

    let slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 165, 42, 42));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    presentation.getSections().addSection("Section 1", slide);

    slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.getStaticFieldValue("java.awt.Color", "CYAN"));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    presentation.getSections().addSection("Section 2", slide);

    slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 127, 255, 0));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    presentation.getSections().addSection("Section 3", slide);

    slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 0, 100, 0));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    presentation.getSections().addSection("Section 4", slide);

    let summaryZoomFrame = overviewSlide.getShapes().addSummaryZoomFrame(150, 50, 300, 200);

    presentation.save("presentation.pptx", aspose.slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

إضافة وإزالة قسم من ملخص الزوم

يخزن ملخص الزوم كائنات SummaryZoomSection في SummaryZoomFrame.getSummaryZoomCollection. يُنشئ هذا المثال نظرة عامة على قسمين، يضيف قسمًا ثالثًا باستخدام SummaryZoomSectionCollection.addSummaryZoomSection، ويزيل إدخال القسم الأول باستخدام SummaryZoomSectionCollection.removeSummaryZoomSection. يبقى القسم والعروض الفرعية الخاصة به سليمين بعد الإزالة.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation();
try {
    let overviewSlide = presentation.getSlides().get_Item(0);

    let slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 165, 42, 42));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    let firstSection = presentation.getSections().addSection("Section 1", slide);

    slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.getStaticFieldValue("java.awt.Color", "CYAN"));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    presentation.getSections().addSection("Section 2", slide);

    let summaryZoomFrame = overviewSlide.getShapes().addSummaryZoomFrame(150, 50, 300, 200);

    slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 127, 255, 0));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    let thirdSection = presentation.getSections().addSection("Section 3", slide);

    summaryZoomFrame.getSummaryZoomCollection().addSummaryZoomSection(thirdSection);

    summaryZoomFrame.getSummaryZoomCollection().removeSummaryZoomSection(firstSection);

    presentation.save("presentation.pptx", aspose.slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

تنسيق أقسام ملخص الزوم

يقوم هذا المثال بتنسيق أول إدخال في SummaryZoomFrame.getSummaryZoomCollection باستخدام الفهرس الصفري 0. يتطلّب صورة محلية لـ ZoomObject.setZoomImage، يضيف حدًا أسودًا من نوع dash‑dot بسُمك 1.5 نقطة، ويضبط ZoomObject.setTransitionDuration إلى 1.5 ثانية. تمرير false إلى ZoomObject.setReturnToParent يُعطِّل العودة التلقائية إلى شريحة الملخص لهذا الإدخال.

const aspose = { slides: require("aspose.slides.via.java") };
const java = require("java");

let presentation = new aspose.slides.Presentation();
try {
    let overviewSlide = presentation.getSlides().get_Item(0);

    let slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.newInstanceSync("java.awt.Color", 165, 42, 42));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    presentation.getSections().addSection("Section 1", slide);

    slide = presentation.getSlides().addEmptySlide(overviewSlide.getLayoutSlide());
    slide.getBackground().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    slide.getBackground().getFillFormat().getSolidFillColor().setColor(java.getStaticFieldValue("java.awt.Color", "CYAN"));
    slide.getBackground().setType(java.newByte(aspose.slides.BackgroundType.OwnBackground));

    presentation.getSections().addSection("Section 2", slide);

    let summaryZoomFrame = overviewSlide.getShapes().addSummaryZoomFrame(150, 50, 300, 200);

    let summarySection = summaryZoomFrame.getSummaryZoomCollection().get_Item(0);

    let previewImage;
    let image = aspose.slides.Images.fromFile("image.png");
    try {
        previewImage = presentation.getImages().addImage(image);
    } finally {
        image.dispose();
    }

    summarySection.setZoomImage(previewImage);
    summarySection.setReturnToParent(false);

    summarySection.getLineFormat().getFillFormat().setFillType(java.newByte(aspose.slides.FillType.Solid));
    summarySection.getLineFormat().getFillFormat().getSolidFillColor().setColor(java.getStaticFieldValue("java.awt.Color", "BLACK"));
    summarySection.getLineFormat().setDashStyle(java.newByte(aspose.slides.LineDashStyle.DashDot));
    summarySection.getLineFormat().setWidth(1.5);

    summarySection.setTransitionDuration(java.newFloat(1.5));

    presentation.save("presentation.pptx", aspose.slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

الأسئلة المتكررة

هل يمكنني التحكم في العودة إلى الشريحة “الأصلية” بعد عرض الهدف؟

نعم. استدعِ ZoomObject.setReturnToParent مع القيمة true للعودة إلى الشريحة الأصلية بعد عرض المحتوى الهدف.

هل يمكنني ضبط “سرعة” أو مدة انتقال الزوم؟

نعم. استخدم ZoomObject.setTransitionDuration للتحكم في مدة الانتقال بالثواني.

هل هناك حدود لعدد كائنات الزوم التي يمكن أن يحتويها العرض التقديمي؟

لا توجد قيود صريحة موثقة في الـ API. تعتمد الحدود العملية على تعقّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـّـية العرض وأداء المشاهد. يمكنك إضافة العديد من إطارات الزوم، لكن يُنصح بمراعاة حجم الملف ووقت التّصيير.