|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.slides.Shape
com.aspose.slides.GraphicalObject
com.aspose.slides.SmartArt
public class SmartArt
Represents SmartArt object on a slide.
Example:[C#] Presentation pres = new Presentation(); Slide slide = pres.Slides[0]; SmartArt smart = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList);[Visual Basic] Private pres As New Presentation() Private slide As Slide = pres.Slides(0) Private smart As SmartArt = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList)[C#] Presentation pres = new Presentation("demo.pptx"); foreach (Shape shape in pres.Slides[0].Shapes) { if (shape is SmartArt) SmartArt smart = (SmartArt) pres.Slides[0].Shapes[0]; }[Visual Basic] Dim pres As New Presentation("demo.pptx") For Each shape As Shape In pres.Slides(0).Shapes If TypeOf shape Is SmartArt Then Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) End If Next
Method Summary | |
---|---|
ISmartArtNodeCollection |
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.GraphicalObject |
---|
getShapeLock |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.aspose.slides.IGraphicalObject |
---|
getShapeLock |
Methods inherited from interface com.aspose.slides.IShape |
---|
addPlaceholder, createEffectFormatEffective, createFillFormatEffective, createLineFormatEffective, createThreeDFormatEffective, getAlternativeText, getCustomData, getEffectFormat, getFillFormat, getFrame, getHeight, getHidden, getLineFormat, getName, getParentGroup, getPlaceholder, getRawFrame, getRotation, getThreeDFormat, getThumbnail, getThumbnail, getUniqueId, getWidth, getX, getY, getZOrderPosition, isGrouped, isTextHolder, removePlaceholder, setAlternativeText, setFrame, setHeight, setHidden, setName, setRawFrame, setRotation, setWidth, setX, setY |
Methods inherited from interface com.aspose.slides.ISlideComponent |
---|
getSlide |
Methods inherited from interface com.aspose.slides.IPresentationComponent |
---|
getPresentation |
Methods inherited from interface com.aspose.slides.IHyperlinkContainer |
---|
getHyperlinkClick, getHyperlinkManager, getHyperlinkMouseOver, setHyperlinkClick, setHyperlinkMouseOver |
Method Detail |
---|
public ISmartArtNodeCollection getAllNodes()
Returns collections of all nodes in SmartArt object
[C#] Presentation pres = new Presentation("demo.pptx"); SmartArt smart = (SmartArt)pres.Slides[0].Shapes[0]; for ( int i = 0; i < smart.AllNodes.Count; i++) { SmartArtNode 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 Presentation("demo.pptx") Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) Dim i As Integer = 0 While i < smart.AllNodes.Count Dim node As SmartArtNode = 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
getAllNodes
in interface ISmartArt
public int getLayout()
Return layout of smartart object
[C#] Presentation pres = new Presentation("demo.pptx"); foreach (Shape shape in pres.Slides[0].Shapes) { if (shape is SmartArt) { SmartArt smart = (SmartArt) pres.Slides[0].Shapes[0]; if (smart.Layout == SmartArtLayoutType.BasicBlockList) {...do something } } }[Visual Basic] Dim pres As New Presentation("demo.pptx") For Each shape As Shape In pres.Slides(0).Shapes If TypeOf shape Is SmartArt Then Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) If smart.Layout = SmartArtLayoutType.BasicBlockList Then ...do something End If End If Next
getLayout
in interface ISmartArt
public int getQuickStyle()
Return or set quick style of smartart object
[C#] Presentation pres = new Presentation("demo.pptx"); foreach (Shape shape in pres.Slides[0].Shapes) { if (shape is SmartArt) { SmartArt smart = (SmartArt) pres.Slides[0].Shapes[0]; if (smart.QuickStyle == SmartArtQuickStyleType.BirdsEyeScene) {smart.QuickStyle = SmartArtQuickStyleType.Cartoon;} } }[Visual Basic] Dim pres As New Presentation("demo.pptx") For Each shape As Shape In pres.Slides(0).Shapes If TypeOf shape Is SmartArt Then Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) If smart.QuickStyle = SmartArtQuickStyleType.BirdsEyeScene Then smart.QuickStyle = SmartArtQuickStyleType.Cartoon End If End If Next
getQuickStyle
in interface ISmartArt
public void setQuickStyle(int value)
setQuickStyle
in interface ISmartArt
public int getColorStyle()
Return or set color style of smart art object
[C#] Presentation pres = new Presentation("demo.pptx"); foreach (Shape shape in pres.Slides[0].Shapes) { if (shape is SmartArt) { SmartArt smart = (SmartArt) pres.Slides[0].Shapes[0]; if (smart.ColorStyle == SmartArtColorType.ColoredFillAccent1) {smart.ColorStyle =SmartArtColorType.TransparentGradientRangeAccent1;} } }[Visual Basic] Dim pres As New Presentation("demo.pptx") For Each shape As Shape In pres.Slides(0).Shapes If TypeOf shape Is SmartArt Then Dim smart As SmartArt = DirectCast(pres.Slides(0).Shapes(0), SmartArt) If smart.ColorStyle = SmartArtColorType.ColoredFillAccent1 Then smart.ColorStyle = SmartArtColorType.TransparentGradientRangeAccent1 End If End If Next
getColorStyle
in interface ISmartArt
public void setColorStyle(int value)
setColorStyle
in interface ISmartArt
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |