Constructor Summary |
---|
Page()
Constructor. |
Page(ID)
Constructor. |
Property Getters/Setters Summary | ||
---|---|---|
method | getAssociatedPage() | |
method | setAssociatedPage(value) | |
The ID of the original drawing page that was marked up on separate markup overlays by reviewers of the drawing. | ||
method | getBackground() | |
method | setBackground(value) | |
A flag indicating if the page is a background page. The value of the property is BOOL integer constant. | ||
method | getBackPage() | |
method | setBackPage(value) | |
The page's background page. | ||
method | getConnects() | |
Contains a Connect element for each connection between two shapes in a drawing.
|
||
method | getID() | |
method | setID(value) | |
The unique ID of the element within its parent element. | ||
method | getName() | |
method | setName(value) | |
The name of the element. | ||
method | getNameU() | |
method | setNameU(value) | |
The universal name of the element. | ||
method | getPages() | |
method | setPages(value) | |
Page collection. | ||
method | getPageSheet() | |
Contains elements that define the page sheet for a Page or Master element.
|
||
void | setPresetTheme(value) | |
Apply a preset theme to this page
The value of the property is PresetThemeValue integer constant. |
||
void | setPresetThemeQuickStyle(value) | |
Apply a preset theme variant quickstyle to this page
The value of the property is PresetQuickStyleValue integer constant. |
||
void | setPresetThemeVariant(value) | |
Apply a preset theme variant to this page
The value of the property is PresetThemeVariantValue integer constant. |
||
method | getReviewerID() | |
method | setReviewerID(value) | |
The ID of the reviewer associated with the markup overlay. | ||
method | getShapes() | |
Shape collection.
|
||
method | getViewCenterX() | |
method | setViewCenterX(value) | |
ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially. | ||
method | getViewCenterY() | |
method | setViewCenterY(value) | |
ViewCenterX and ViewCenterY specify a center point on a page that a new view (window) assumes when it is opened initially. | ||
method | getViewScale() | |
method | setViewScale(value) | |
The default magnification factor to use when a new view (window) of the page is opened. For example, 1 = 100%; 1.5 = 150%, and so on. |
Method Summary | ||
---|---|---|
method | addComment(shape, comment) | |
Adds comment to a shape.
|
||
method | addComment(pinX, pinY, comment) | |
Adds comment with defined PinX and PinY.
|
||
method | addComment(shapeID, comment) | |
Adds comment to a shape with shape's id.
|
||
method | addShape(newShape, masterName) | |
Adds shape created by master to specific page.
|
||
method | addShape(pinX, pinY, width, height, masterName) | |
Adds shape created by master on page with defined PinX,PinY,Width and Height.
|
||
method | addShape(pinX, pinY, masterName) | |
Adds shape created by master on page with defined PinX and PinY.
|
||
method | addText(pinX, pinY, width, height, text) | |
Adds Text with defined PinX and PinY.
|
||
method | addText(pinX, pinY, width, height, text, fontName, fontColor, size) | |
Adds Text with defined PinX and PinY.
|
||
method | applyStyle(textStyle, lineStyle, fillStyle) | |
Applies style for full page.
|
||
method | autoSpaceShapes(shapes, options) | |
Auto space shapes
|
||
method | bringForward(shapeId) | |
Brings a shape,defined by ID, forward one position in the z-order.
|
||
method | bringToFront(shapeId) | |
Brings a shape,defined by ID, to the front of the z-order.
|
||
method | centerDrawing() | |
Centers a page's shapes with respect to the extent of the page.
Centering shapes does not change their position relative to each other.
|
||
method | connectShapesViaConnector(shapeFromId, fromConnectionName, shapeToId, toConnectionName, connectorId) | |
Connect shapes via connector.
|
||
method | connectShapesViaConnectorIndex(shapeFrom, fromIndex, shapeTo, toIndex, connector) | |
Connect shapes via connector index.
|
||
method | connectShapesViaConnectorIndex(shapeFromId, fromIndex, shapeToId, toIndex, connectorId) | |
Connect shapes via connector index.
|
||
method | copy(source) | |
method | dispose() | |
Performs application-defined tasks associated with freeing, releasing, or
resetting unmanaged resources.
|
||
method | drawEllipse(pinX, pinY, width, height) | |
The process of drawing Ellipse.
|
||
method | drawLine(beginX, beginY, endX, endY) | |
The process of drawing a single line.
|
||
method | drawLine(pinX, pinY, width, height, xyArray) | |
The process of drawing line.
|
||
method | drawPolyline(pinX, pinY, width, height, xyArray) | |
The process of drawing Polyline.
|
||
method | drawRectangle(pinX, pinY, width, height) | |
The process of drawing rectangle.
|
||
method | glueShapesInContainer(shapeFromId, shapeToBeginConnectionIndex, shapeToEndConnectionIndex, shapeToId) | |
Glue shapes in container
|
||
method | glueShapesInContainer(shapeFromId, shapeToBeginConnectionName, shapeToEndConnectionName, shapeToId) | |
Glue shapes in container using connection name
|
||
method | glueShapesInContainerByID(shapeFromId, shapeToBeginConnectionID, shapeToEndConnectionID, shapeToId) | |
Glue shapes by connection id in container
|
||
method | glueShapeToConnectorBeginX(shapeFromId, connectionName, connectorId) | |
Glue shape to Connector's BeginX
|
||
method | glueShapeToConnectorEndX(shapeToId, connectionName, connectorId) | |
Glue shape to Connector's EndX
|
||
method | moveTo(index) | |
Moves the page to another location in the pages.
|
||
method | sendBackward(shapeId) | |
Moves a shape,defined by ID, back one position in the z-order.
|
||
method | sendToBack(shapeId) | |
Moves a shape,defined by ID, to the back of the z-order.
|
PageCollection getPages() / setPages(value)
ShapeCollection getShapes()
PageSheet getPageSheet()
ConnectCollection getConnects()
Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("RetrieveConnectorInfo.vsd"); connects = diagram.getPages().getPage(0).getConnects(); for (var it = connects.iterator(); it.hasNext();) { connector = it.next(); // Display information about the Connectors console.log("From Shape ID : " + connector.getFromSheet()); console.log("To Shape ID : " + connector.getToSheet()); }
int getID() / setID(value)
String getName() / setName(value)
String getNameU() / setNameU(value)
int getBackground() / setBackground(value)
Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("RetrievePageInfo.vdx"); for (var it = diagram.getPages().iterator(); it.hasNext();) { page = it.next(); // Checks if current page is a background page if (page.getBackground() == aspose.diagram.BOOL.TRUE) { // Display information about the background page console.log("Background Page ID : " + page.getID()); console.log("Background Page Name : " + page.getName()); } else { // Display information about the foreground page console.log("\nPage ID : " + page.getID()); console.log("Universal Name : " + page.getNameU()); console.log("ID of the Background Page : " + page.getBackPage()); } }
float getViewScale() / setViewScale(value)
float getViewCenterX() / setViewCenterX(value)
float getViewCenterY() / setViewCenterY(value)
int getReviewerID() / setReviewerID(value)
Page getAssociatedPage() / setAssociatedPage(value)
setPresetTheme(value)
setPresetThemeVariant(value)
setPresetThemeQuickStyle(value)
centerDrawing()
copy(source)
dispose()
applyStyle(textStyle, lineStyle, fillStyle)
textStyle: int
- text Style id.lineStyle: int
- line Style id.fillStyle: int
- fill Style id.Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram("ReadDiagramFile.vsd"); //Define a new StyleSheet st = new aspose.diagram.StyleSheet(); st.setID(diagram.getStyleSheets().getCount() + 1); ch = new aspose.diagram.Char(); ch.getColor().setValue("#00ff00"); ch.setIX(0); st.getChars().add(ch); st.getLine().getLineColor().setValue("#ff0000"); st.getLine().getLinePattern().setValue(1); st.getLine().getLineWeight().setValue(0.01); st.getFill().getFillForegnd().setValue("#0000ff"); st.getFill().getFillPattern().setValue(1); st.getFill().getShdwPattern().setValue(0); //Add the stylesheet to Stylesheets collection diagram.getStyleSheets().add(st); shapes = diagram.getPages().get(0).getShapes(); for (var it = shapes.iterator(); it.hasNext();) { shape = it.next(); shape.getLine().getLinePattern().setValue(1); shape.getFill().getFillPattern().setValue(1); } //Apply the stylesheet diagram.getPages().get(0).applyStyle(st.getID(), st.getID(), st.getID()); diagram.save("out-ApplyStyleToVisioDiagramPage.vsdx", aspose.diagram.SaveFileFormat.VSDX);
moveTo(index)
index: int
- Destination page index.long addShape(pinX, pinY, masterName)
pinX: float
- Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.pinY: float
- Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.masterName: String
- Master's name.long addShape(pinX, pinY, width, height, masterName)
pinX: float
- Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.pinY: float
- Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.width: float
- Specifies the width of the shape in inches.height: float
- Specifies the height of the shape in inches.masterName: String
- Master's name.long addShape(newShape, masterName)
newShape: Shape
- New shape objectmasterName: String
- Master's name.connectShapesViaConnector(shapeFromId, fromConnectionName, shapeToId, toConnectionName, connectorId)
shapeFromId: long
- The ID of shape where the connector begins fromConnectionName: String
- The connection name on the first shape where connector will be connected .shapeToId: long
- The ID of shape where the connector ends toConnectionName: String
- The connection name on the second shape where connector will be connected .connectorId: long
- The ID of shape with type Dynamic connector glueShapeToConnectorBeginX(shapeFromId, connectionName, connectorId)
glueShapeToConnectorEndX(shapeToId, connectionName, connectorId)
connectShapesViaConnectorIndex(shapeFromId, fromIndex, shapeToId, toIndex, connectorId)
shapeFromId: long
- The ID of shape where the connector begins fromIndex: int
- The index of the connection on the first shapeshapeToId: long
- The ID of shape where the connector ends toIndex: int
- he index of the connection on the second shape connectorId: long
- The ID of shape with type Dynamic connector connectShapesViaConnectorIndex(shapeFrom, fromIndex, shapeTo, toIndex, connector)
shapeFrom: Shape
- The shape where the connector begins fromIndex: int
- The index of the connection on the first shapeshapeTo: Shape
- The shape where the connector ends toIndex: int
- he index of the connection on the second shape connector: Shape
- The shape with type Dynamic connector glueShapesInContainerByID(shapeFromId, shapeToBeginConnectionID, shapeToEndConnectionID, shapeToId)
glueShapesInContainer(shapeFromId, shapeToBeginConnectionName, shapeToEndConnectionName, shapeToId)
shapeFromId: long
- The ID of shape which is glue from shapeToBeginConnectionName: String
- The location on the first connection name where to glue .shapeToEndConnectionName: String
- The location on the end connection name where to glue .shapeToId: long
- The ID of shape where to glue to glueShapesInContainer(shapeFromId, shapeToBeginConnectionIndex, shapeToEndConnectionIndex, shapeToId)
shapeFromId: long
- The ID of shape which is glue from shapeToBeginConnectionIndex: int
- The location on the first connection index where to glue .shapeToEndConnectionIndex: int
- The location on the end connection index where to glue .shapeToId: long
- The ID of shape where to glue to bringForward(shapeId)
shapeId: long
- ID of shape.sendBackward(shapeId)
shapeId: long
- ID of shape.bringToFront(shapeId)
shapeId: long
- ID of shape.sendToBack(shapeId)
shapeId: long
- ID of shape.addComment(shapeID, comment)
shape
- The ID of shape which is adding comment.comment: String
- Comment's string.addComment(shape, comment)
shape: Shape
- Specifies the shape which is adding comment .comment: String
- Comment's string.addComment(pinX, pinY, comment)
pinX: float
- Specifies the x-coordinate of the comment's pin (center of rotation) in relation to the page.pinY: float
- Specifies the y-coordinate of the comment's pin (center of rotation) in relation to the page.comment: String
- Comment's string.Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); var diagram = new aspose.diagram.Diagram("Drawing1.vsdx"); // Add comment diagram.getPages().getPage(0).addComment(7.205905511811023, 3.880708661417323, "test@"); // Save diagram diagram.save("out-AddPageLevelCommentInVisio.vsdx", aspose.diagram.SaveFileFormat.VSDX);
autoSpaceShapes(shapes, options)
shapes: ShapeCollection
- Specifies the shapes be auto spaced.Shape addText(pinX, pinY, width, height, text, fontName, fontColor, size)
pinX: float
- Specifies the x-coordinate of the text's pin (center of rotation) in relation to the page.pinY: float
- Specifies the y-coordinate of the text's pin (center of rotation) in relation to the page.width: float
- Specifies the width of the text.height: float
- Specifies the height of the text.text: String
- text string.fontName: String
- text font name.fontColor: String
- text font color.size: float
- text font size.Shape addText(pinX, pinY, width, height, text)
pinX: float
- Specifies the x-coordinate of the text's pin (center of rotation) in relation to the page.pinY: float
- Specifies the y-coordinate of the text's pin (center of rotation) in relation to the page.text: String
- text string.Example:
var aspose = aspose || {}; aspose.diagram = require("aspose.diagram"); diagram = new aspose.diagram.Diagram(); // set parameters PinX = 1, PinY = 1, Width = 1, Height = 1; text = "Test text"; // add text to a Visio page diagram.getPages().getPage(0).addText(PinX, PinY, Width, Height, text); diagram.save("out-InsertTextShape.vsdx", aspose.diagram.SaveFileFormat.VSDX);
long drawLine(beginX, beginY, endX, endY)
beginX: float
- Specifies the begin x-coordinate of the shape's position in relation to the page.beginY: float
- Specifies the begin y-coordinate of the shape's position in relation to the page.endX: float
- Specifies the end x-coordinate of the shape's position in relation to the page.endY: float
- Specifies the end y-coordinate of the shape's position in relation to the page.long drawRectangle(pinX, pinY, width, height)
pinX: float
- Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.pinY: float
- Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.width: float
- Specifies the width of the shapeheight: float
- Specifies the height of the shapelong drawLine(pinX, pinY, width, height, xyArray)
pinX: float
- Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.pinY: float
- Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.width: float
- Specifies the width of the shapeheight: float
- Specifies the height of the shapexyArray: Number Array
- An array of alternating x and y values that defines points in the new shapelong drawEllipse(pinX, pinY, width, height)
pinX: float
- Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.pinY: float
- Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.width: float
- Specifies the width of the shapeheight: float
- Specifies the height of the shapelong drawPolyline(pinX, pinY, width, height, xyArray)
pinX: float
- Specifies the x-coordinate of the shape's pin (center of rotation) in relation to the page.pinY: float
- Specifies the y-coordinate of the shape's pin (center of rotation) in relation to the page.width: float
- Specifies the width of the shapeheight: float
- Specifies the height of the shapexyArray: Number Array
- An array of alternating x and y values that defines points in the new shape