|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.slides.ShapeEx
com.aspose.slides.GraphicalObjectEx
com.aspose.slides.SmartArtEx
public class SmartArtEx
Represents SmartArt object on a slide.
Example:[C#] PresentationEx pres = new PresentationEx(); SlideEx slide = pres.Slides[0]; SmartArtEx smart = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.BasicBlockList);[Visual Basic] Private pres As New PresentationEx() Private slide As SlideEx = pres.Slides(0) Private smart As SmartArtEx = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutTypeEx.BasicBlockList)[C#] PresentationEx pres = new PresentationEx("demo.pptx"); foreach (ShapeEx shape in pres.Slides[0].Shapes) { if (shape is SmartArtEx) SmartArtEx smart = (SmartArtEx) pres.Slides[0].Shapes[0]; }[Visual Basic] Dim pres As New PresentationEx("demo.pptx") For Each shape As ShapeEx In pres.Slides(0).Shapes If TypeOf shape Is SmartArtEx Then Dim smart As SmartArtEx = DirectCast(pres.Slides(0).Shapes(0), SmartArtEx) End If Next
Method Summary | |
---|---|
SmartArtNodeExCollection |
getAllNodes()
Returns collections of all nodes in SmartArt object |
int |
getColorStyle()
Return or set color style of smart art object |
int |
getLayout()
Return layout of smartart object |
int |
getQuickStyle()
Return or set quick style of smartart object |
void |
setColorStyle(int value)
|
void |
setQuickStyle(int value)
|
Methods inherited from class com.aspose.slides.GraphicalObjectEx |
---|
getShapeLock |
Methods inherited from class com.aspose.slides.ShapeEx |
---|
addPlaceholder, createEffectFormatData, createFillFormatData, createLineFormatData, createThreeDFormatData, getAlternativeText, getEffectFormat, getFillFormat, getFrame, getHeight, getHidden, getHLinkClick, getHLinkMouseOver, getLineFormat, getName, getParent, getPlaceholder, getPresentation, getRawFrame, getRotation, getSlide, getTags, getThreeDFormat, getWidth, getX, getY, getZOrderPosition, isTextHolder, removePlaceholder, setAlternativeText, setFrame, setHeight, setHidden, setHLinkClick, setHLinkMouseOver, setName, setRawFrame, setRotation, setWidth, setX, setY |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public SmartArtNodeExCollection getAllNodes()
Returns collections of all nodes in SmartArt object
[C#] PresentationEx pres = new PresentationEx("demo.pptx"); SmartArtEx smart = (SmartArtEx)pres.Slides[0].Shapes[0]; for ( int i = 0; i < smart.AllNodes.Count; i++) { SmartArtNodeEx node = smart.AllNodes[i]; string outString = string.Format("i = {0}, Text = {1}, Level = {2}, Position = {3}", i, node.TextFrame.Text, node.Level, node.Position); Console.WriteLine(outString); }[Visual Basic] Dim pres As New PresentationEx("demo.pptx") Dim smart As SmartArtEx = DirectCast(pres.Slides(0).Shapes(0), SmartArtEx) Dim i As Integer = 0 While i < smart.AllNodes.Count Dim node As SmartArtNodeEx = smart.AllNodes(i) Dim outString As String = String.Format("i = {0}, Text = {1}, Level = {2}, Position = {3}", i, node.TextFrame.Text, node.Level, node.Position) Console.WriteLine(outString) System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1) End While
public int getLayout()
Return layout of smartart object
[C#] PresentationEx pres = new PresentationEx("demo.pptx"); foreach (ShapeEx shape in pres.Slides[0].Shapes) { if (shape is SmartArtEx) { SmartArtEx smart = (SmartArtEx) pres.Slides[0].Shapes[0]; if (smart.Layout == SmartArtLayoutTypeEx.BasicBlockList) {...do something } } }[Visual Basic] Dim pres As New PresentationEx("demo.pptx") For Each shape As ShapeEx In pres.Slides(0).Shapes If TypeOf shape Is SmartArtEx Then Dim smart As SmartArtEx = DirectCast(pres.Slides(0).Shapes(0), SmartArtEx) If smart.Layout = SmartArtLayoutTypeEx.BasicBlockList Then ...do something End If End If Next
public int getQuickStyle()
Return or set quick style of smartart object
[C#] PresentationEx pres = new PresentationEx("demo.pptx"); foreach (ShapeEx shape in pres.Slides[0].Shapes) { if (shape is SmartArtEx) { SmartArtEx smart = (SmartArtEx) pres.Slides[0].Shapes[0]; if (smart.QuickStyle == SmartArtQuickStyleTypeEx.BirdsEyeScene) {smart.QuickStyle = SmartArtQuickStyleTypeEx.Cartoon;} } }[Visual Basic] Dim pres As New PresentationEx("demo.pptx") For Each shape As ShapeEx In pres.Slides(0).Shapes If TypeOf shape Is SmartArtEx Then Dim smart As SmartArtEx = DirectCast(pres.Slides(0).Shapes(0), SmartArtEx) If smart.QuickStyle = SmartArtQuickStyleTypeEx.BirdsEyeScene Then smart.QuickStyle = SmartArtQuickStyleTypeEx.Cartoon End If End If Next
public void setQuickStyle(int value)
public int getColorStyle()
Return or set color style of smart art object
[C#] PresentationEx pres = new PresentationEx("demo.pptx"); foreach (ShapeEx shape in pres.Slides[0].Shapes) { if (shape is SmartArtEx) { SmartArtEx smart = (SmartArtEx) pres.Slides[0].Shapes[0]; if (smart.ColorStyle == SmartArtColorTypeEx.ColoredFillAccent1) {smart.ColorStyle =SmartArtColorTypeEx.TransparentGradientRangeAccent1;} } }[Visual Basic] Dim pres As New PresentationEx("demo.pptx") For Each shape As ShapeEx In pres.Slides(0).Shapes If TypeOf shape Is SmartArtEx Then Dim smart As SmartArtEx = DirectCast(pres.Slides(0).Shapes(0), SmartArtEx) If smart.ColorStyle = SmartArtColorTypeEx.ColoredFillAccent1 Then smart.ColorStyle = SmartArtColorTypeEx.TransparentGradientRangeAccent1 End If End If Next
public void setColorStyle(int value)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |