aspose.diagram
Class Master

Contains elements that define a master for the document. A master is a shape on a stencil that you use repeatedly to create drawings. When you drag a shape from a stencil onto the drawing page, the shape becomes an instance of that master, and a local copy of the master is included in the document.

Constructor Summary
Master()
           Constructor.
 
Property Getters/Setters Summary
functiongetAlignName()
functionsetAlignName(value)
           Specifies whether the master's text in the stencil window is aligned left, right, or center. The value of the property is AlignNameValue integer constant.
functiongetBaseID()
           A GUID (globally unique identifier) that identifies the master across documents.
functiongetConnects()
           Contains a Connect element for each connection between two shapes in a drawing.
functiongetHidden()
functionsetHidden(value)
           Specifies whether the master is hidden in the user interface. The value of the property is BOOL integer constant.
functiongetIcon()
functionsetIcon(value)
           Specifies a MIME (Multipurpose Internet Mail Extensions) encoded binary icon (in .ico format) for a Master or MasterShortcut element in a document.
functiongetIconSize()
functionsetIconSize(value)
           The size of the element's icon. The value of the property is IconSizeValue integer constant.
functiongetIconUpdate()
functionsetIconUpdate(value)
           Specifies whether the icon is automatically generated from the master itself. The value of the property is BOOL integer constant.
functiongetID()
functionsetID(value)
           The unique ID of the element within its parent element.
functiongetMatchByName()
functionsetMatchByName(value)
           The MatchByName attribute determines how Microsoft Visio decides if a document master is already present when an instance of a master is dropped on the drawing page. It allows changes made to a document master to apply to new instances of the master, even if the instances are dragged from a stand-alone stencil file. The value of the property is BOOL integer constant.
functiongetName()
functionsetName(value)
           The name of the element.
functiongetNameU()
functionsetNameU(value)
           The universal name of the element.
functiongetPageSheet()
           Contains elements that define the page sheet for a Page or Master element.
functiongetPatternFlags()
functionsetPatternFlags(value)
           The PatternFlags attribute determines whether a master behaves as a custom pattern.
functiongetPrompt()
functionsetPrompt(value)
           The status bar and tool tip prompt for the element.
functiongetShapes()
           Collection of Shape objects.
functiongetUniqueID()
           A GUID that identifies the master within the document.
 
Method Summary
functiondeepClone()
           Creates deep copy of this instance.
functiondispose()
           Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 

Constructor Detail

Master

function Master()
Constructor.

Property Getters/Setters Detail

getID/setID : Number 

function getID() / function setID(value)
The unique ID of the element within its parent element.

getBaseID : UUID 

function getBaseID()
A GUID (globally unique identifier) that identifies the master across documents.

getUniqueID : UUID 

function getUniqueID()
A GUID that identifies the master within the document.

getMatchByName/setMatchByName : Number 

function getMatchByName() / function setMatchByName(value)
The MatchByName attribute determines how Microsoft Visio decides if a document master is already present when an instance of a master is dropped on the drawing page. It allows changes made to a document master to apply to new instances of the master, even if the instances are dragged from a stand-alone stencil file. The value of the property is BOOL integer constant.

getName/setName : String 

function getName() / function setName(value)
The name of the element.

getNameU/setNameU : String 

function getNameU() / function setNameU(value)
The universal name of the element.

getIconSize/setIconSize : Number 

function getIconSize() / function setIconSize(value)
The size of the element's icon. The value of the property is IconSizeValue integer constant.

getPatternFlags/setPatternFlags : Number 

function getPatternFlags() / function setPatternFlags(value)
The PatternFlags attribute determines whether a master behaves as a custom pattern.

getPrompt/setPrompt : String 

function getPrompt() / function setPrompt(value)
The status bar and tool tip prompt for the element.

getHidden/setHidden : Number 

function getHidden() / function setHidden(value)
Specifies whether the master is hidden in the user interface. The value of the property is BOOL integer constant.

getIconUpdate/setIconUpdate : Number 

function getIconUpdate() / function setIconUpdate(value)
Specifies whether the icon is automatically generated from the master itself. The value of the property is BOOL integer constant.

getAlignName/setAlignName : Number 

function getAlignName() / function setAlignName(value)
Specifies whether the master's text in the stencil window is aligned left, right, or center. The value of the property is AlignNameValue integer constant.

getShapes : ShapeCollection 

function getShapes()
Collection of Shape objects.

getConnects : ConnectCollection 

function getConnects()
Contains a Connect element for each connection between two shapes in a drawing.

getIcon/setIcon : byte[] 

function getIcon() / function setIcon(value)
Specifies a MIME (Multipurpose Internet Mail Extensions) encoded binary icon (in .ico format) for a Master or MasterShortcut element in a document.

Example:

var aspose = aspose || {};
aspose.diagram = require("aspose.diagram");
fs = require("fs");

stencil = new aspose.diagram.Diagram("Timeline.vss");

// get master
master = stencil.getMasters().getMasterByName("Diamond milestone");
// get byte array
bytes = master.getIcon();
// create an image file and write byte array to the image
fs.writeFileSync("out-MasterIcon.png", bytes);

getPageSheet : PageSheet 

function getPageSheet()
Contains elements that define the page sheet for a Page or Master element.

Method Detail

dispose

function dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

deepClone

function deepClone()
Creates deep copy of this instance.
Returns:

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.