namespace NetCorePptxTest.Modules;
using NetCorePpt;
using NetCorePpt.CoreInterfaces;
using static Constants;
public class DemoText
{
///
/// SLIDE 1= text alignment, percent x/y, etc.
///
///
public static void genSlide01(PptxGen pptx)
{
var slide = pptx.addSlide(new AddSlideProps { sectionTitle = "text" });
//// Slide title
slide.addTable(new List { new TableRow { new TableCell { text = "Text Examples: Text alignment, percent x/y, etc.", options = BASE_TEXT_OPTS_L }, BASE_TEXT_OPTS_R } }, BASE_TABLE_OPTS);
// Slide colors= bkgd/fore
slide.background = new BackgroundProps { color = "030303" };
slide.color = "9F9F9F";
// Slide notes
slide.addNotes("API Docs: https://gitbrent.github.io/PptxGenJS/docs/api-text.html");
// Actual Textbox shape(can have any Height, can wrap text, etc.)
slide.addText(new List {
new TextProps { text= "Textbox align (center/middle)", options= new TextPropsOptions{ fontSize= 32, breakLine= true } },
new TextProps{ text= "Character Spacing 16", options= new TextPropsOptions{ fontSize= 16, charSpacing= 16, breakLine= true } },
new TextProps{ text= "Transparency 50%", options= new TextPropsOptions{ fontSize= 16, transparency= 50 } },
},
new TextPropsOptions { x = 0.5, y = 0.75, w = 8.5, h = 2.5, color = "FFFFFF", fill = "0000FF", valign = VAlign.middle, align = HAlign.center, isTextBox = true }
);
slide.addText(new List {
new TextProps { text= "(left/top)", options= new TextPropsOptions { fontSize= 12, breakLine= true } },
new TextProps { text= "Textbox", options= new TextPropsOptions { bold= true } },
},
new TextPropsOptions { x = 10, y = 0.75, w = 3.0, h = 1.0, color = "FFFFFF", fill = "00B050", valign = VAlign.top, align = HAlign.left, margin = 15 }
);
slide.addText(new List {
new TextProps { text= "Textbox", options= new TextPropsOptions { breakLine= true } },
new TextProps { text= "(right/bottom)", options= new TextPropsOptions { fontSize= 12 } } ,
},
new TextPropsOptions { x = 10, y = 2.25, w = 3.0, h = 1.0, color = "FFFFFF", fill = "C00000", valign = VAlign.bottom, align = HAlign.right, margin = 0 }
);
slide.addText("^ (50%/50%)", new TextPropsOptions { x = "50%", y = "50%", w = 2 });
slide.addText("Plain x/y coords", new TextPropsOptions { x = 10, y = 4.35, w = 3 });
slide.addText("Escaped chars: ' \" & < >", new TextPropsOptions { x = 10, y = 5.35, w = 3 });
slide.addText(new List{
new TextProps { text= "Sub" },
new TextProps { text= "Subscript", options= new TextPropsOptions { subscript= true } },
new TextProps { text= " // Super" },
new TextProps { text= "Superscript", options= new TextPropsOptions { superscript= true } },
},
new TextPropsOptions { x = 10, y = 6.3, w = 3.3 }
);
// TEST= using {option}= Add text box with multiline options=
slide.addText(new List {
new TextProps
{
text= "word-level\nformatting",
options= new TextPropsOptions { fontSize= 32, fontFace= "Courier New", color= "99ABCC", align= HAlign.right, breakLine= true },
},
new TextProps { text= "...in the same textbox", options= new TextPropsOptions { fontSize= 48, fontFace= "Arial", color= "FFFF00", align= HAlign.center } },
},
new TextPropsOptions { x = 0.5, y = 4.3, w = 8.5, h = 2.5, margin = 0.1, fill = "232323" }
);
var objOptions = new TextPropsOptions
{
x = 0,
y = 7,
w = "100%",
h = 0.5,
align = HAlign.center,
fontFace = "Arial",
fontSize = 24,
color = "00EC23",
bold = true,
italic = true,
underline = true,
margin = 0,
isTextBox = true,
};
slide.addText("Text: Arial, 24, green, bold, italic, underline, margin:0", objOptions);
}
///
/// SLIDE 2= Multi-line Formatting, line Breaks, line Spacing
///
///
public static void genSlide02(PptxGen pptx)
{
var slide = pptx.addSlide(new AddSlideProps { sectionTitle = "text" });
slide.addNotes("API Docs: https://gitbrent.github.io/PptxGenJS/docs/api-text.html");
slide.addTable(new List { new TableRow { new TableCell { text = "text Examples: Multi-line Formatting, line Breaks, line Spacing", options = BASE_TEXT_OPTS_L }, BASE_TEXT_OPTS_R } },
BASE_TABLE_OPTS
);
// LEFT COLUMN ------------------------------------------------------------
// 1= Multi-line Formatting
slide.addText("Word-Level Formatting:", new TextPropsOptions { x = 0.5, y = 0.6, w = "40%", h = 0.3, margin = 0, color = SCHEME_COLORS.accent1 });
slide.addText(new List {
new TextProps { text= "Courier New ", options= new TextPropsOptions { fontSize= 36, fontFace= "Courier New", color= SCHEME_COLORS.accent6 } },
new TextProps { text= "36", options= new TextPropsOptions { fontSize= 36, fontFace= "Courier New", color= SCHEME_COLORS.accent1, breakLine= true } },
new TextProps { text= "Arial ", options= new TextPropsOptions { fontSize= 48, fontFace= "Arial", color= SCHEME_COLORS.accent2 } },
new TextProps { text= "48", options= new TextPropsOptions { fontSize= 48, fontFace= "Courier New", color= SCHEME_COLORS.accent1, breakLine= true } },
new TextProps { text= "Verdana 48", options= new TextPropsOptions { fontSize= 48, fontFace= "Verdana", color= SCHEME_COLORS.accent3, align= HAlign.left, breakLine= true } },
new TextProps
{
text= "\nStrikethrough",
options= new TextPropsOptions { fontSize= 36, fontFace= "Arial", color= SCHEME_COLORS.accent6, align= HAlign.center, strike= true, breakLine= true },
},
new TextProps
{
text= "Underline",
options= new TextPropsOptions { fontSize= 36, fontFace= "Arial", color= SCHEME_COLORS.accent2, align= HAlign.center,
underline= true,
breakLine= true },
},
new TextProps
{
text= "FUN",
options= new TextPropsOptions
{
fontFace= "Arial",
fontSize= 48,
color= SCHEME_COLORS.accent6,
align= HAlign.center,
underline= new TextUnderlineOption(TextUnderlineStyle.wavy, SCHEME_COLORS.accent4),
},
},
new TextProps
{
text= "derline",
options= new TextPropsOptions
{
fontFace= "Arial",
fontSize= 48,
color= SCHEME_COLORS.accent4,
align= HAlign.center,
underline= new TextUnderlineOption (TextUnderlineStyle.wavy, SCHEME_COLORS.accent5),
breakLine= true,
},
},
new TextProps { text= " ", options= new TextPropsOptions { breakLine= true } },
new TextProps { text= "Also: ", options= new TextPropsOptions { fontSize= 36, fontFace= "Arial", color= SCHEME_COLORS.accent5, align= HAlign.right } },
new TextProps { text= "highlighted", options= new TextPropsOptions { fontSize= 36, fontFace= "Arial", color= SCHEME_COLORS.accent5, align= HAlign.right, highlight= "FFFF00" } },
new TextProps { text= " text!", options= new TextPropsOptions { fontSize= 36, fontFace= "Arial", color= SCHEME_COLORS.accent5, align= HAlign.right } },
},
new TextPropsOptions { x = 0.5, y = 1.0, w = 5.75, h = 6.0, margin = 5, fill = (SCHEME_COLORS.tx1) }
);
// RIGHT COLUMN ------------------------------------------------------------
// 1= line-Breaks
slide.addText("line-Breaks:", new TextPropsOptions { x = 7.0, y = 0.6, w = "40%", h = 0.3, margin = 0, color = SCHEME_COLORS.accent1 });
slide.addText("***line Breaks / Multi Lines***\nFirst line\nSecond line\nThird line", new TextPropsOptions {
x = 7.0,
y = 1.0,
w = 5.75,
h = 1.6,
valign = VAlign.middle,
align = HAlign.center,
color = "6c6c6c",
fontSize = 16,
fill = "F2F2F2",
line = new ShapeLineProps { color = "C7C7C7", width = 2 },
});
// 2= line-Spacing (exact)
slide.addText("line-Spacing (text):", new TextPropsOptions { x = 7.0, y = 2.7, w = "40%", h = 0.3, margin = 0, color = SCHEME_COLORS.accent1 });
slide.addText("lineSpacing (Exactly)\n40pt", new TextPropsOptions {
x = 7.0, y = 3.1, w = 5.75, h = 1.17, align = HAlign.center, fill = "F1F1F1", color = "363636", lineSpacing = 39.9 } // TEST-CASE= `lineSpacing` decimal value
);
// 3= line-Spacing (multiple)
slide.addText("lineSpacing (Multiple)\n1.5",
new TextPropsOptions
{
x = 7.0,
y = 4.5,
w = 5.75,
h = 1.0,
align = HAlign.center,
fill = "E6E9EC",
color = "363636",
lineSpacingMultiple = 1.5,
}
);
// 4= line-Spacing (bullets)
slide.addText("line-Spacing (bullets):", new TextPropsOptions { x = 7.0, y = 5.6, w = "40%", h = 0.3, margin = 0, color = SCHEME_COLORS.accent1 });
slide.addText(new TextProps { text = "lineSpacing\n35pt", options = new TextPropsOptions { fontSize = 24, bullet = true, color = "99ABCC", lineSpacing = 35 } },
new TextPropsOptions
{
x = 7.0,
y = 6.0,
w = 5.75,
h = 1,
margin = (0, 0, 0, 10),
fill = "F1F1F1",
});
}
///
/// SLIDE 3= Bullets
///
///
public static void genSlide03(PptxGen pptx)
{
var slide = pptx.addSlide(new AddSlideProps { sectionTitle= "text" });
slide.addNotes("API Docs: https://gitbrent.github.io/PptxGenJS/docs/api-text.html");
slide.addTable(new List { new TableRow { new TableCell { text= "text Examples: Bullets", options= BASE_TEXT_OPTS_L }, BASE_TEXT_OPTS_R}}, BASE_TABLE_OPTS);
// LEFT COLUMN ------------------------------------------------------------
// 1= Bullets with indent levels
slide.addText("Bullet Indent-Levels:", new TextPropsOptions { x= 0.5, y= 0.6, w= "40%", h= 0.3, margin= 0, color= SCHEME_COLORS.accent1 });
slide.addText(new List
{
new TextProps { text= "Root-Level ", options= new TextPropsOptions { fontSize= 32, bullet= true, color= SCHEME_COLORS.accent3, indentLevel= 0 } },
new TextProps { text= "Indent-Level 1", options= new TextPropsOptions { fontSize= 32, bullet= true, color= SCHEME_COLORS.accent4, indentLevel= 1 } },
new TextProps { text= "Indent-Level 2", options= new TextPropsOptions { fontSize= 32, bullet= true, color= SCHEME_COLORS.accent5, indentLevel= 2 } },
new TextProps { text= "Indent-Level 3", options= new TextPropsOptions { fontSize= 32, bullet= true, color= SCHEME_COLORS.accent6, indentLevel= 3 } },
},
new TextPropsOptions { x = 0.5, y= 1.0, w= 5.75, h= 2.4, fill= "232323" }
);
slide.addText("Bullet Spacing (Indentation):", new TextPropsOptions { x= 0.5, y= 3.5, w= "40%", h= 0.3, margin= 0, color= SCHEME_COLORS.accent1 });
slide.addText(new List
{
new TextProps { text= "bullet indent: 10", options= new TextPropsOptions { bullet= new CustomTextBullet { indent= 10 } } },
new TextProps { text= "bullet indent: 30", options= new TextPropsOptions { bullet= new CustomTextBullet { indent= 30 } } },
},
new TextPropsOptions { x= 0.5, y= 3.9, w= 5.75, h= 0.5, color= "393939", fontFace= "Arial", fontSize= 12, fill= (SCHEME_COLORS.bg2) }
);
slide.addText("Bullet Styles:", new TextPropsOptions { x = 0.5, y= 4.6, w= "40%", h= 0.3, margin= 0, color= SCHEME_COLORS.accent1 });
slide.addText(new List
{
new TextProps { text= "style: arabicPeriod", options= new TextPropsOptions { color= SCHEME_COLORS.accent2,
bullet= new CustomTextBullet { type= BulletType.number, numberType= TextBulletNumberType.arabicPeriod } } },
new TextProps { text= "style: arabicPeriod", options= new TextPropsOptions { color= SCHEME_COLORS.accent2,
bullet= new CustomTextBullet{ type= BulletType.number, numberType= TextBulletNumberType.arabicPeriod } } },
new TextProps { text= "style: alphaLcPeriod", options= new TextPropsOptions { color= SCHEME_COLORS.accent5,
bullet= new CustomTextBullet { type= BulletType.number, numberType= TextBulletNumberType.alphaLcPeriod }, indentLevel= 1 },
},
new TextProps{ text= "style: alphaLcPeriod", options= new TextPropsOptions { color= SCHEME_COLORS.accent5,
bullet= new CustomTextBullet { type= BulletType.number, numberType= TextBulletNumberType.alphaLcPeriod }, indentLevel= 1 },
},
new TextProps{ text= "style: romanLcPeriod",options= new TextPropsOptions { color= SCHEME_COLORS.accent6,
bullet= new CustomTextBullet { type= BulletType.number, numberType= TextBulletNumberType.romanLcPeriod }, indentLevel= 2 },
},
new TextProps{ text= "style: romanLcPeriod", options= new TextPropsOptions { color= SCHEME_COLORS.accent6,
bullet= new CustomTextBullet { type= BulletType.number, numberType= TextBulletNumberType.romanLcPeriod }, indentLevel= 2 },
},
},
new TextPropsOptions { x= 0.5, y= 5.0, w= 5.75, h= 2.0, fill= (SCHEME_COLORS.bg2), color= SCHEME_COLORS.accent1 }
);
// RIGHT COLUMN ------------------------------------------------------------
// 1= Regular bullets
slide.addText(@"Bullet ""Start At"" number option:", new TextPropsOptions { x= 7.0, y= 0.6, w= 5.75, h= 0.3, margin= 0, color= SCHEME_COLORS.accent1 });
slide.addText("type:'number'\nnumberStartAt:'5'", new TextPropsOptions
{
x= 7.0,
y= 1.0,
w= 5.75,
h= 0.75,
fill= (SCHEME_COLORS.bg2),
color= SCHEME_COLORS.accent6,
fontFace= "Courier New",
bullet= new CustomTextBullet { type= BulletType.number, numberStartAt= 5 },
});
// 2= Bullets= text With line-Breaks
slide.addText("Bullets made with line breaks:", new TextPropsOptions { x= 7.0, y= 1.95, w= 5.75, h= 0.3, margin= 0, color= SCHEME_COLORS.accent1 });
slide.addText("line 1\nLine 2\nLine 3", new TextPropsOptions
{
x= 7.0,
y= 2.35,
w= 5.75,
h= 1.0,
color= "393939",
fontSize= 16,
fill= (SCHEME_COLORS.bg2),
bullet= new CustomTextBullet { type= BulletType.number },
});
// 3= Bullets= Soft-line-Breaks
slide.addText("Bullets and soft-line-break (shift+enter):", new TextPropsOptions { x= 7.0, y= 3.5, w= 5.75, h= 0.3, margin= 0, color= SCHEME_COLORS.accent1 });
slide.addText(new List
{
new TextProps { text= "First line", options= new TextPropsOptions { bullet= true, breakLine= true } },
new TextProps { text= "Second line", options= new TextPropsOptions { bullet= true } },
new TextProps { text= "Third line via `softBreakBefore:true`", options= new TextPropsOptions { softBreakBefore= true } },
},
new TextPropsOptions { x= 7.0, y= 3.9, w= 5.75, h= 1.0, color= "393939", fontSize= 16, fill= (SCHEME_COLORS.bg2) }
);
// 3= Bullets= With custom unicode bullet characters
slide.addText("Bullets with text objects:", new TextPropsOptions { x= 7.0, y= 5.05, w= 5.75, h= 0.3, margin= 0, color= SCHEME_COLORS.accent1 });
slide.addText(new List
{
new TextProps { text= "`bullet: { code: '25BA' }`", options= new TextPropsOptions { fontSize= 18, color= SCHEME_COLORS.accent1, bullet= new CustomTextBullet { characterCode= "25BA" } } },
new TextProps { text= "`bullet: { code: '25D1' }`", options= new TextPropsOptions { fontSize= 18, color= SCHEME_COLORS.accent5, bullet= new CustomTextBullet{ characterCode= "25D1" } } },
new TextProps { text= "`bullet: { code: '25CC' }`", options= new TextPropsOptions { fontSize= 18, color= SCHEME_COLORS.accent6, bullet= new CustomTextBullet{ characterCode= "25CC" } } },
new TextProps { text= "Mix and... ", options= new TextPropsOptions { fontSize= 24, color= "FF0000", bullet= new CustomTextBullet { characterCode= "25BA" } } },
new TextProps { text= "match formatting as well.", options= new TextPropsOptions { fontSize= 16, color= "00CD00" } },
},
new TextPropsOptions { x= 7.0, y= 5.5, w= 5.75, h= 1.5, fontFace= "Arial", fill= (SCHEME_COLORS.bg2) }
);
}
///
/// SLIDE 4= Hyperlinks, text shadow, text outline, text glow
///
///
public static void genSlide04(PptxGen pptx)
{
var slide = pptx.addSlide(new AddSlideProps { sectionTitle= "text" });
slide.addTable(new List {
new TableRow { new TableCell { text = "text Examples: Hyperlinks, Tab Stops, text Effects: shadow, outline, and glow", options= BASE_TEXT_OPTS_L },
BASE_TEXT_OPTS_R}},
BASE_TABLE_OPTS
);
slide.addNotes("API Docs: https://gitbrent.github.io/PptxGenJS/docs/api-text.html");
// 1= TOP_ROW= Hyperlinks
slide.addText("Hyperlinks:", new TextPropsOptions { x = 0.5, y = 0.6, w = "90%", h = 0.3, margin = 0.123, color = SCHEME_COLORS.accent1 });
var textProps = new TextProps {
text = "Link with Tooltip", options = new TextPropsOptions { hyperlink = new HyperlinkProps("https://github.com/gitbrent/pptxgenjs", "Visit Homepage") }
};
slide.addText(textProps,
new TextPropsOptions { x = 0.5, y = 1.0, w = 2.5, h = 0.6, margin = 10, fill = "F1F1F1", fontSize = 14, align = HAlign.center }
);
slide.addText(new List { new TextProps { text = "Link without Tooltip", options = new TextPropsOptions { hyperlink = ("https://github.com/gitbrent") } } },
new TextPropsOptions
{
x = 3.78,
y = 1.0,
w = 2.5,
h = 0.6,
margin = 10,
fill = "F1F1F1",
fontSize = 14,
align = HAlign.center,
});
slide.addText(new TextProps
{
text = "Link with custom color",
options = new TextPropsOptions { hyperlink = ("https://github.com/gitbrent"), color = "EE40EE" }
},
new TextPropsOptions
{
x = 7.05,
y = 1.0,
w = 2.5,
h = 0.6,
margin = 10,
fill = "F1F1F1",
fontSize = 14,
align = HAlign.center,
});
slide.addText(new TextProps { text = "Link to Slide #5", options = new TextPropsOptions { hyperlink = 5 } },
new TextPropsOptions
{
x = 10.33,
y = 1.0,
w = 2.5,
h = 0.6,
margin = 10,
fill = "E2F0D9",
fontSize = 14,
align = HAlign.center,
});
// 2= CTR_ROW= Tab Stops= Set tab points (inches), then use "\t" to add tab characters in your text string
slide.addText("Tab Stops:", new TextPropsOptions { x = 0.5, y = 2.1, w = 12.0, h = 0.3, margin = 0, color = SCHEME_COLORS.accent1 });
slide.addText(new TextProps
{
text = "text...\tTab1\tTab2\tTab3",
options = new TextPropsOptions
{
tabStops = new List { 1 , 3, 7 }
}
},
new TextPropsOptions
{
x = 0.5,
y = 2.5,
w = 12.3,
h = 0.6,
fill = (SCHEME_COLORS.bg2),
});
slide.addText(
"// Code for example above\n" +
"{\n" +
" text: 'text...\\tTab1\\tTab2\\tTab3',\n" +
" options: { tabStops: [{ position: 1 }, { position: 3 }, { position: 7 }] },\n" +
"};",
new TextPropsOptions { x = 0.5, y = 3.3, w = 12.3, h = 2.0, fontFace = "Courier", fontSize = 13, fill = "D1E1F1", color = "363636" }
);
// 3a= BTM_ROW= text Effects= outline
slide.addText("text outline:", new TextPropsOptions { x = 0.5, y = 5.8, w = 3.0, h = 0.3, margin = 0, color = SCHEME_COLORS.accent1 });
slide.addText("size:2", new TextPropsOptions
{
x= 0.5,
y= 6.2,
w= 3.0,
h= 1.1,
fontSize= 72,
bold= true,
color= SCHEME_COLORS.accent1,
outline= new TextOutlineOption(SCHEME_COLORS.accent4, 2),
});
// 3b= text Effects= glow
slide.addText("text glow:", new TextPropsOptions { x = 3.9, y = 5.8, w = 5.0, h = 0.3, margin = 0, color = SCHEME_COLORS.accent1 });
slide.addText("size:10", new TextPropsOptions
{
x = 3.9,
y = 6.2,
w = 3.0,
h = 1.1,
fontSize = 72,
color = SCHEME_COLORS.accent1,
glow = new TextGlowProps(10, SCHEME_COLORS.accent2, 0.25),
});
// 3c= text Effects= shadow
var shadowOpts = new ShadowProps { type = ShadowType.outer, color = "696969", blur = 3, offset = 10, angle = 45, opacity = 0.6 };
slide.addText("text shadow:", new TextPropsOptions { x = 7.5, y = 5.8, w = 5.0, h = 0.3, margin = 0, color = SCHEME_COLORS.accent1 });
slide.addText("type:outer, offset:10, blur:3", new TextPropsOptions { x = 7.5, y = 6.2, w = 5.5, h = 1.1, fontSize = 32, color = "0088cc", shadow = shadowOpts });
}
///
/// SLIDE 5= text Fit= Shrink/Resize
///
///
public static void genSlide05(PptxGen pptx)
{
var slide = pptx.addSlide(new AddSlideProps { sectionTitle = "text" });
slide.addTable(new List { new TableRow { new TableCell { text = "text Examples: text Fit", options = BASE_TEXT_OPTS_L }, BASE_TEXT_OPTS_R } }, BASE_TABLE_OPTS);
slide.addNotes("API Docs: https://gitbrent.github.io/PptxGenJS/docs/api-text.html");
slide.addText(LOREM_IPSUM_ENG.JsSubstring(0, 1200), new TextPropsOptions { x = 0.5, y = 1.3, w = 4, h = 4, fontSize = 12, fit = TextFitType.none });
slide.addText(LOREM_IPSUM_ENG.JsSubstring(0, 1200), new TextPropsOptions { x = 4.5, y = 1.3, w = 4, h = 4, fontSize = 12, fit = TextFitType.shrink });
slide.addText(LOREM_IPSUM_ENG.JsSubstring(0, 1200), new TextPropsOptions { x = 8.5, y = 1.3, w = 4, h = 4, fontSize = 12, fit = TextFitType.resize });
// titles last so they overlay the overflowing text from above
slide.addText("fit:'none' ", new TextPropsOptions { x = 0.5, y = 0.6, w = 4, h = 0.3, color = SCHEME_COLORS.accent1, fill = "ffffff" });
slide.addText("fit:'shrink'", new TextPropsOptions { x = 4.5, y = 0.6, w = 4, h = 0.3, color = SCHEME_COLORS.accent1, fill = "ffffff" });
slide.addText("fit:'resize'", new TextPropsOptions { x = 8.5, y = 0.6, w = 4, h = 0.3, color = SCHEME_COLORS.accent1, fill = "ffffff" });
slide.addText(new List
{
new TextProps { text= "NOTE", options= new TextPropsOptions { fontSize= 16, bold= true, breakLine= true } },
new TextProps{
text= "- both 'Shrink' and 'Resize' are only applied once text is editted or the shape is resized after creation using PowerPoint/Keynote/et al.",
options= new TextPropsOptions { breakLine= true },
},
new TextProps
{
text= "- PowerPoint calculates a scaling factor and applies it dynamically when a shape is updated - something that cannot be triggered by PptxGenJS",
options= new TextPropsOptions { breakLine= true },
},
new TextProps
{
text= "- the textboxes above have their shrink & resize props set already, just add a space or resize them to trigger shrink and resize behavior",
},
},
new TextPropsOptions { x = 0.5, y = 6.0, w = 12, h = 1.1, margin = 10, fontSize = 12, color = "393939", fill = "fffccc" }
);
}
///
/// SLIDE 6= Scheme Colors
///
///
public static void genSlide06(PptxGen pptx)
{
var slide = pptx.addSlide(new AddSlideProps { sectionTitle = "text" });
slide.addNotes("API Docs: https://gitbrent.github.io/PptxGenJS/docs/api-text.html");
slide.addTable(new List { new TableRow { new TableCell { text = "text Examples: Scheme Colors", options = BASE_TEXT_OPTS_L }, BASE_TEXT_OPTS_R } }, BASE_TABLE_OPTS);
// MISC ------------------------------------------------------------
slide.addText("TEXT1 on BACKGROUND2", new TextPropsOptions { x = 0.5, y = 0.7, w = 6.0, h = 2.0, color = SCHEME_COLORS.tx1, fill = (SCHEME_COLORS.bg2) });
slide.addText("TEXT2 on BACKGROUND1", new TextPropsOptions { x = 7.0, y = 0.7, w = 6.0, h = 2.0, color = SCHEME_COLORS.tx2, fill = (SCHEME_COLORS.bg1) });
slide.addText("ACCENT1", new TextPropsOptions { x = 0.5, y = 3.25, w = 6.0, h = 1.0, color = "FFFFFF", fill = (SCHEME_COLORS.accent1) });
slide.addText("ACCENT2", new TextPropsOptions { x = 7.0, y = 3.25, w = 6.0, h = 1.0, color = "FFFFFF", fill = (SCHEME_COLORS.accent2) });
slide.addText("ACCENT3", new TextPropsOptions { x = 0.5, y = 4.7, w = 6.0, h = 1.0, color = "FFFFFF", fill = (SCHEME_COLORS.accent3) });
slide.addText("ACCENT4", new TextPropsOptions { x = 7.0, y = 4.7, w = 6.0, h = 1.0, color = "FFFFFF", fill = (SCHEME_COLORS.accent4) });
slide.addText("ACCENT5", new TextPropsOptions { x = 0.5, y = 6.15, w = 6.0, h = 1.0, color = "FFFFFF", fill = (SCHEME_COLORS.accent5) });
slide.addText("ACCENT6", new TextPropsOptions { x = 7.0, y = 6.15, w = 6.0, h = 1.0, color = "FFFFFF", fill = (SCHEME_COLORS.accent6) });
// NEGATIVE TEST=
//slide.addText("NEGTEST / NEGTEST", { x=0.5, y=0.5, w='40%', h=0.38, color=pptx.colors.NEGTEST01, fill={color=pptx.colors.NEGTEST02} });
}
}