drawio-offline
Version:
diagrams.net desktop
1,868 lines (1,642 loc) • 268 kB
JavaScript
/**
* $Id: mxAws3d.js,v 1.0 2015/10/11 07:05:39 mate Exp $
* Copyright (c) 2006-2015, JGraph Ltd
*/
//**********************************************************************************************************************************************************
//Arrow NE
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dArrowNE(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dArrowNE, mxShape);
mxShapeAws3dArrowNE.prototype.cst = {
ARROW_NE : 'mxgraph.aws3d.arrowNE'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dArrowNE.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.begin();
c.moveTo(w - 17, 8);
c.lineTo(w - 21, 5.5);
c.lineTo(w, 0);
c.lineTo(w - 9.7, 12.2);
c.lineTo(w - 13.9, 9.8);
c.lineTo(9.7, h - 3.5);
c.arcTo(6, 3, 0, 0, 1, 9, h - 0.4);
c.arcTo(5.2, 3, 0, 0, 1, 1, h - 1.4);
c.arcTo(6, 2.8, 0, 0, 1, 3, h - 5.4);
c.arcTo(5, 3, 0, 0, 1, 6.7, h - 5.2);
c.close();
c.fillAndStroke();
};
mxCellRenderer.registerShape(mxShapeAws3dArrowNE.prototype.cst.ARROW_NE, mxShapeAws3dArrowNE);
//**********************************************************************************************************************************************************
//Arrow SE
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dArrowSE(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dArrowSE, mxShape);
mxShapeAws3dArrowSE.prototype.cst = {
ARROW_SE : 'mxgraph.aws3d.arrowSE'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dArrowSE.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.begin();
c.moveTo(w - 17, h - 8);
c.lineTo(w - 21, h - 5.5);
c.lineTo(w, h);
c.lineTo(w - 9.7, h - 12.2);
c.lineTo(w - 13.9, h - 9.8);
c.lineTo(9.7, 3.5);
c.arcTo(6, 3, 0, 0, 0, 9, 0.4);
c.arcTo(5.2, 3, 0, 0, 0, 1, 1.4);
c.arcTo(6, 2.8, 0, 0, 0, 3, 5.4);
c.arcTo(5, 3, 0, 0, 0, 6.7, 5.2);
c.close();
c.fillAndStroke();
};
mxCellRenderer.registerShape(mxShapeAws3dArrowSE.prototype.cst.ARROW_SE, mxShapeAws3dArrowSE);
//**********************************************************************************************************************************************************
//Arrow SW
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dArrowSW(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dArrowSW, mxShape);
mxShapeAws3dArrowSW.prototype.cst = {
ARROW_SW : 'mxgraph.aws3d.arrowSW'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dArrowSW.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.begin();
c.moveTo(17, h - 8);
c.lineTo(21, h - 5.5);
c.lineTo(0, h);
c.lineTo(9.7, h - 12.2);
c.lineTo(13.9, h - 9.8);
c.lineTo(w - 9.7, 3.5);
c.arcTo(6, 3, 0, 0, 1, w - 9, 0.4);
c.arcTo(5.2, 3, 0, 0, 1, w - 1, 1.4);
c.arcTo(6, 2.8, 0, 0, 1, w - 3, 5.4);
c.arcTo(5, 3, 0, 0, 1, w - 6.7, 5.2);
c.close();
c.fillAndStroke();
};
mxCellRenderer.registerShape(mxShapeAws3dArrowSW.prototype.cst.ARROW_SW, mxShapeAws3dArrowSW);
//**********************************************************************************************************************************************************
//Arrow NW
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dArrowNW(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dArrowNW, mxShape);
mxShapeAws3dArrowNW.prototype.cst = {
ARROW_NW : 'mxgraph.aws3d.arrowNW'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dArrowNW.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.begin();
c.moveTo(17, 8);
c.lineTo(21, 5.5);
c.lineTo(0, 0);
c.lineTo(9.7, 12.2);
c.lineTo(13.9, 9.8);
c.lineTo(w - 9.7, h - 3.5);
c.arcTo(6, 3, 0, 0, 0, w - 9, h - 0.4);
c.arcTo(5.2, 3, 0, 0, 0, w - 1, h - 1.4);
c.arcTo(6, 2.8, 0, 0, 0, w - 3, h - 5.4);
c.arcTo(5, 3, 0, 0, 0, w - 6.7, h - 5.2);
c.close();
c.fillAndStroke();
};
mxCellRenderer.registerShape(mxShapeAws3dArrowNW.prototype.cst.ARROW_NW, mxShapeAws3dArrowNW);
//**********************************************************************************************************************************************************
//Arrowless NE
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dArrowlessNE(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dArrowlessNE, mxShape);
mxShapeAws3dArrowlessNE.prototype.cst = {
ARROWLESS_NE : 'mxgraph.aws3d.arrowlessNE'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dArrowlessNE.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.begin();
c.moveTo(w - 3.1, 0);
c.lineTo(w, 1.8);
c.lineTo(9.7, h - 3.5);
c.arcTo(6, 3, 0, 0, 1, 9, h - 0.4);
c.arcTo(5.2, 3, 0, 0, 1, 1, h - 1.4);
c.arcTo(6, 2.8, 0, 0, 1, 3, h - 5.4);
c.arcTo(5, 3, 0, 0, 1, 6.7, h - 5.2);
c.close();
c.fillAndStroke();
};
mxCellRenderer.registerShape(mxShapeAws3dArrowlessNE.prototype.cst.ARROWLESS_NE, mxShapeAws3dArrowlessNE);
//**********************************************************************************************************************************************************
//Dashed edge with double arrow
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dDashedEdgeDouble(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dDashedEdgeDouble, mxShape);
mxShapeAws3dDashedEdgeDouble.prototype.cst = {
DASHED_EDGE_DOUBLE : 'mxgraph.aws3d.dashedEdgeDouble'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dDashedEdgeDouble.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.setFillColor('#2D6195');
c.save();
c.setStrokeColor('none');
c.begin();
c.moveTo(21, 5.5);
c.lineTo(0, 0);
c.lineTo(9.7, 12.2);
c.fillAndStroke();
c.begin();
c.moveTo(w - 21, h - 5.5);
c.lineTo(w, h);
c.lineTo(w - 9.7, h - 12.2);
c.fillAndStroke();
c.restore();
c.setStrokeColor('#2D6195');
c.setStrokeWidth('4');
c.setDashed('true');
c.setLineCap('round');
c.begin();
c.moveTo(7.675, 4.425);
c.lineTo(w - 7.675, h - 4.425);
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dDashedEdgeDouble.prototype.cst.DASHED_EDGE_DOUBLE, mxShapeAws3dDashedEdgeDouble);
//**********************************************************************************************************************************************************
//Dashed arrowless edge
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dDashedArrowlessEdge(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dDashedArrowlessEdge, mxShape);
mxShapeAws3dDashedArrowlessEdge.prototype.cst = {
DASHED_ARROWLESS_EDGE : 'mxgraph.aws3d.dashedArrowlessEdge'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dDashedArrowlessEdge.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.setStrokeColor('#2D6195');
c.setStrokeWidth('4');
c.setDashed('true');
c.setLineCap('round');
c.begin();
c.moveTo(0, 0);
c.lineTo(w, h);
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dDashedArrowlessEdge.prototype.cst.DASHED_ARROWLESS_EDGE, mxShapeAws3dDashedArrowlessEdge);
//**********************************************************************************************************************************************************
//Dashed edge
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dDashedEdge(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dDashedEdge, mxShape);
mxShapeAws3dDashedEdge.prototype.cst = {
DASHED_EDGE : 'mxgraph.aws3d.dashedEdge'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dDashedEdge.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.setFillColor('#2D6195');
c.save();
c.setStrokeColor('none');
c.begin();
c.moveTo(w - 21, 5.5);
c.lineTo(w, 0);
c.lineTo(w - 9.7, 12.2);
c.fillAndStroke();
c.restore();
c.setStrokeColor('#2D6195');
c.setStrokeWidth('4');
c.setDashed('true');
c.setLineCap('round');
c.begin();
c.moveTo(w - 7.675, 4.425);
c.lineTo(0, h);
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dDashedEdge.prototype.cst.DASHED_EDGE, mxShapeAws3dDashedEdge);
//**********************************************************************************************************************************************************
//Flat edge
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dFlatEdge(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dFlatEdge, mxShape);
mxShapeAws3dFlatEdge.prototype.cst = {
FLAT_EDGE : 'mxgraph.aws3d.flatEdge'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dFlatEdge.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.setFillColor('#F4B934');
c.setStrokeColor('none');
c.begin();
c.moveTo(w - 46, 8.8);
c.lineTo(w - 61.2, 0);
c.lineTo(w, 0);
c.lineTo(w, 35.5);
c.lineTo(w - 15.4, 26.5);
c.lineTo(30.7, h);
c.lineTo(0, h - 17.7);
c.fillAndStroke();
};
mxCellRenderer.registerShape(mxShapeAws3dFlatEdge.prototype.cst.FLAT_EDGE, mxShapeAws3dFlatEdge);
//**********************************************************************************************************************************************************
//Flat double edge
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dFlatDoubleEdge(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dFlatDoubleEdge, mxShape);
mxShapeAws3dFlatDoubleEdge.prototype.cst = {
FLAT_DOUBLE_EDGE : 'mxgraph.aws3d.flatDoubleEdge'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dFlatDoubleEdge.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
c.setFillColor('#F4B934');
c.setStrokeColor('none');
c.begin();
c.moveTo(15.3, 61.9);
c.lineTo(30.8, 53.2);
c.lineTo(15.4, 44.2);
c.lineTo(0, 53.2);
c.lineTo(15.4, 8.8);
c.lineTo(92.1, 0);
c.lineTo(76.5, 8.8);
c.lineTo(92.1, 17.7);
c.lineTo(107.4, 8.8);
c.lineTo(w - 15.3, h - 61.9);
c.lineTo(w - 30.8, h - 53.2);
c.lineTo(w - 15.4, h - 44.2);
c.lineTo(w, h - 53.2);
c.lineTo(w - 15.4, h - 8.8);
c.lineTo(w - 92.1, h);
c.lineTo(w - 76.5, h - 8.8);
c.lineTo(w - 92.1, h - 17.7);
c.lineTo(w - 107.4, h - 8.8);
c.fillAndStroke();
};
mxCellRenderer.registerShape(mxShapeAws3dFlatDoubleEdge.prototype.cst.FLAT_DOUBLE_EDGE, mxShapeAws3dFlatDoubleEdge);
//**********************************************************************************************************************************************************
//AMI
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dAMI(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dAMI, mxShape);
mxShapeAws3dAMI.prototype.cst = {
AMI : 'mxgraph.aws3d.ami',
SHADING_COLORS : 'shadingCols'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dAMI.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
var strokeWidth = parseFloat(mxUtils.getValue(this.state.style, 'strokeWidth', '1'));
var isShadow = parseFloat(mxUtils.getValue(this.state.style, 'shadow', '0'));
var strokeWidth1 = strokeWidth * w / 92;
var strokeWidth2 = strokeWidth * h / 60;
strokeWidth = Math.min(strokeWidth1, strokeWidth2);
c.setStrokeWidth(strokeWidth);
c.setShadow(false);
c.save();
c.save();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
if (isShadow == 1)
{
c.setShadow(true);
}
c.begin();
c.moveTo(0, h * 0.6483);
c.lineTo(w * 0.0684, h * 0.4133);
c.lineTo(w * 0.5326, 0);
c.lineTo(w * 0.6685, 0);
c.lineTo(w * 0.9359, h * 0.2367);
c.lineTo(w, h * 0.465);
c.lineTo(w * 0.4, h);
c.close();
c.fillAndStroke();
c.restore();
c.setFillColor('#000000');
var shading = mxUtils.getValue(this.state.style, mxShapeAws3dAMI.prototype.cst.SHADING_COLORS, '0.1,0.3').toString().split(',');
var flipH = mxUtils.getValue(this.state.style, 'flipH', '0');
(flipH == '0') ? c.setAlpha(shading[0]) : c.setAlpha(shading[1]);
c.begin();
c.moveTo(0, h * 0.65);
c.lineTo(w * 0.0652, h * 0.5);
c.lineTo(w * 0.3326, h * 0.7667);
c.lineTo(w * 0.4663, h * 0.7667);
c.lineTo(w * 0.4, h);
c.close();
c.fill();
(flipH == '0') ? c.setAlpha(shading[1]) : c.setAlpha(shading[0]);
c.begin();
c.moveTo(w * 0.4, h);
c.lineTo(w * 0.4641, h * 0.77);
c.lineTo(w * 0.9326, h * 0.355);
c.lineTo(w * 0.9347, h * 0.24);
c.lineTo(w, h * 0.4667);
c.close();
c.fill();
c.restore();
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.65);
c.lineTo(w * 0.0652, h * 0.5);
c.lineTo(w * 0.3326, h * 0.7667);
c.lineTo(w * 0.4663, h * 0.7667);
c.lineTo(w * 0.4, h);
c.close();
c.stroke();
c.begin();
c.moveTo(w * 0.4, h);
c.lineTo(w * 0.4641, h * 0.77);
c.lineTo(w * 0.9326, h * 0.355);
c.lineTo(w * 0.9347, h * 0.24);
c.lineTo(w, h * 0.4667);
c.close();
c.stroke();
c.begin();
c.moveTo(w * 0.0652, h * 0.42);
c.lineTo(w * 0.0652, h * 0.5);
c.moveTo(w * 0.3337, h * 0.7667);
c.lineTo(w * 0.4, h);
c.moveTo(w * 0.9348, h * 0.355);
c.lineTo(w, h * 0.4733);
c.stroke();
c.setLineJoin('miter');
var strokeColor = mxUtils.getValue(this.state.style, 'strokeColor', '#000000');
c.setFillColor(strokeColor);
c.begin();
c.moveTo(w * 0.1935, h * 0.42);
c.lineTo(w * 0.5543, h * 0.0967);
c.lineTo(w * 0.6652, h * 0.1967);
c.lineTo(w * 0.3, h * 0.5133);
c.close();
c.moveTo(w * 0.2967, h * 0.4633);
c.lineTo(w * 0.3837, h * 0.3883);
c.lineTo(w * 0.3326, h * 0.3417);
c.lineTo(w * 0.2467, h * 0.42);
c.close();
c.moveTo(w * 0.362, h * 0.32);
c.lineTo(w * 0.412, h * 0.3633);
c.lineTo(w * 0.5054, h * 0.2867);
c.lineTo(w * 0.4522, h * 0.24);
c.close();
c.moveTo(w * 0.5293, h * 0.26);
c.lineTo(w * 0.6109, h * 0.1933);
c.lineTo(w * 0.5511, h * 0.145);
c.lineTo(w * 0.4739, h * 0.2133);
c.close();
c.moveTo(w * 0.3528, h * 0.557);
c.lineTo(w * 0.7137, h * 0.2337);
c.lineTo(w * 0.8246, h * 0.3337);
c.lineTo(w * 0.4593, h * 0.6503);
c.close();
c.moveTo(w * 0.4561, h * 0.6003);
c.lineTo(w * 0.543, h * 0.5253);
c.lineTo(w * 0.492, h * 0.4787);
c.lineTo(w * 0.4061, h * 0.557);
c.close();
c.moveTo(w * 0.5213, h * 0.457);
c.lineTo(w * 0.5713, h * 0.5003);
c.lineTo(w * 0.6648, h * 0.4237);
c.lineTo(w * 0.6115, h * 0.377);
c.close();
c.moveTo(w * 0.6887, h * 0.397);
c.lineTo(w * 0.7702, h * 0.3303);
c.lineTo(w * 0.7104, h * 0.282);
c.lineTo(w * 0.6333, h * 0.3503);
c.close();
c.fill();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.6483);
c.lineTo(w * 0.0684, h * 0.4133);
c.lineTo(w * 0.5326, 0);
c.lineTo(w * 0.6685, 0);
c.lineTo(w * 0.9359, h * 0.2367);
c.lineTo(w, h * 0.465);
c.lineTo(w * 0.4, h);
c.close();
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dAMI.prototype.cst.AMI, mxShapeAws3dAMI);
//**********************************************************************************************************************************************************
//Snapshot
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dSnapshot(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dSnapshot, mxShape);
mxShapeAws3dSnapshot.prototype.cst = {
SNAPSHOT : 'mxgraph.aws3d.snapshot',
SHADING_COLORS : 'shadingCols'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dSnapshot.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
var strokeWidth = parseFloat(mxUtils.getValue(this.state.style, 'strokeWidth', '1'));
var strokeWidth1 = strokeWidth * w / 92;
var strokeWidth2 = strokeWidth * h / 60;
var isShadow = parseFloat(mxUtils.getValue(this.state.style, 'shadow', '0'));
strokeWidth = Math.min(strokeWidth1, strokeWidth2);
c.setStrokeWidth(strokeWidth);
c.setShadow(false);
c.save();
c.save();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
if(isShadow == 1)
{
c.setShadow(true);
}
c.begin();
c.moveTo(w, h * 0.6483);
c.lineTo(w * 0.9316, h * 0.4133);
c.lineTo(w * 0.4674, 0);
c.lineTo(w * 0.3315, 0);
c.lineTo(w * 0.0641, h * 0.2367);
c.lineTo(0, h * 0.465);
c.lineTo(w * 0.6, h);
c.close();
c.fillAndStroke();
c.restore();
c.setFillColor('#000000');
var shading = mxUtils.getValue(this.state.style, mxShapeAws3dSnapshot.prototype.cst.SHADING_COLORS, '0.1,0.3').toString().split(',');
var flipH = mxUtils.getValue(this.state.style, 'flipH', '0');
(flipH == '0') ? c.setAlpha(shading[1]) : c.setAlpha(shading[0]);
c.begin();
c.moveTo(w, h * 0.65);
c.lineTo(w * 0.9348, h * 0.52);
c.lineTo(w * 0.6674, h * 0.7667);
c.lineTo(w * 0.5337, h * 0.7667);
c.lineTo(w * 0.6, h);
c.close();
c.fill();
(flipH == '0') ? c.setAlpha(shading[0]) : c.setAlpha(shading[1]);
c.begin();
c.moveTo(w * 0.6, h);
c.lineTo(w * 0.5359, h * 0.77);
c.lineTo(w * 0.0674, h * 0.355);
c.lineTo(w * 0.0653, h * 0.24);
c.lineTo(0, h * 0.4667);
c.close();
c.fill();
c.restore();
c.setLineJoin('round');
c.begin();
c.moveTo(w, h * 0.65);
c.lineTo(w * 0.9348, h * 0.52);
c.lineTo(w * 0.6674, h * 0.7667);
c.lineTo(w * 0.5337, h * 0.7667);
c.lineTo(w * 0.6, h);
c.close();
c.stroke();
c.begin();
c.moveTo(w * 0.6, h);
c.lineTo(w * 0.5359, h * 0.77);
c.lineTo(w * 0.0674, h * 0.355);
c.lineTo(w * 0.0653, h * 0.24);
c.lineTo(0, h * 0.4667);
c.close();
c.stroke();
c.begin();
c.moveTo(w * 0.9348, h * 0.42);
c.lineTo(w * 0.9348, h * 0.52);
c.moveTo(w * 0.6663, h * 0.7667);
c.lineTo(w * 0.6, h);
c.moveTo(w * 0.0652, h * 0.355);
c.lineTo(0, h * 0.4733);
c.stroke();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
c.begin();
c.moveTo(w, h * 0.6483);
c.lineTo(w * 0.9316, h * 0.4133);
c.lineTo(w * 0.4674, 0);
c.lineTo(w * 0.3315, 0);
c.lineTo(w * 0.0641, h * 0.2367);
c.lineTo(0, h * 0.465);
c.lineTo(w * 0.6, h);
c.close();
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dSnapshot.prototype.cst.SNAPSHOT, mxShapeAws3dSnapshot);
//**********************************************************************************************************************************************************
//Application
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dApplication(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dApplication, mxShape);
mxShapeAws3dApplication.prototype.cst = {
APPLICATION : 'mxgraph.aws3d.application',
SHADING_COLORS : 'shadingCols'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dApplication.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
var strokeWidth = parseFloat(mxUtils.getValue(this.state.style, 'strokeWidth', '1'));
var strokeWidth1 = strokeWidth * w / 62;
var strokeWidth2 = strokeWidth * h / 68.8;
var isShadow = parseFloat(mxUtils.getValue(this.state.style, 'shadow', '0'));
strokeWidth = Math.min(strokeWidth1, strokeWidth2);
c.setShadow(false);
c.setStrokeWidth(strokeWidth);
c.save();
c.save();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
if (isShadow == 1)
{
c.setShadow(true);
}
c.begin();
c.moveTo(0, h * 0.2544);
c.lineTo(w * 0.5, 0);
c.lineTo(w, h * 0.2544);
c.lineTo(w, h * 0.7485);
c.lineTo(w * 0.5, h);
c.lineTo(0, h * 0.7485);
c.close();
c.fillAndStroke();
c.restore();
c.setFillColor('#000000');
var shading = mxUtils.getValue(this.state.style, mxShapeAws3dApplication.prototype.cst.SHADING_COLORS, '0.1,0.3').toString().split(',');
var flipH = mxUtils.getValue(this.state.style, 'flipH', '0');
(flipH == '0') ? c.setAlpha(shading[0]) : c.setAlpha(shading[1]);
c.begin();
c.moveTo(0, h * 0.2544);
c.lineTo(w * 0.5, h * 0.5015);
c.lineTo(w * 0.5, h);
c.lineTo(0, h * 0.7485);
c.close();
c.fill();
(flipH == '0') ? c.setAlpha(shading[1]) : c.setAlpha(shading[0]);
c.begin();
c.moveTo(w * 0.5, h * 0.5015);
c.lineTo(w, h * 0.2544);
c.lineTo(w, h * 0.7485);
c.lineTo(w * 0.5, h);
c.close();
c.fill();
c.restore();
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.2544);
c.lineTo(w * 0.5, h * 0.5015);
c.lineTo(w * 0.5, h);
c.lineTo(0, h * 0.7485);
c.close();
c.stroke();
c.begin();
c.moveTo(w * 0.5, h * 0.5015);
c.lineTo(w, h * 0.2544);
c.lineTo(w, h * 0.7485);
c.lineTo(w * 0.5, h);
c.close();
c.stroke();
c.setLineJoin('miter');
var strokeColor = mxUtils.getValue(this.state.style, 'strokeColor', '#000000');
c.setFillColor(strokeColor);
c.begin();
c.moveTo(w * 0.6694, h * 0.0872);
c.lineTo(w * 0.7629, h * 0.1337);
c.lineTo(w * 0.2661, h * 0.3882);
c.lineTo(w * 0.2661, h * 0.5407);
c.lineTo(w * 0.1742, h * 0.4953);
c.lineTo(w * 0.1742, h * 0.3459);
c.close();
c.moveTo(w * 0.8629, h * 0.1846);
c.lineTo(w * 0.379, h * 0.4331);
c.lineTo(w * 0.379, h * 0.5945);
c.lineTo(w * 0.2855, h * 0.5494);
c.lineTo(w * 0.2855, h * 0.3953);
c.lineTo(w * 0.7839, h * 0.1439);
c.close();
c.fill();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.2544);
c.lineTo(w * 0.5, 0);
c.lineTo(w, h * 0.2544);
c.lineTo(w, h * 0.7485);
c.lineTo(w * 0.5, h);
c.lineTo(0, h * 0.7485);
c.close();
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dApplication.prototype.cst.APPLICATION, mxShapeAws3dApplication);
//**********************************************************************************************************************************************************
//Application Server
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dApplicationServer(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dApplicationServer, mxShape);
mxShapeAws3dApplicationServer.prototype.cst = {
APPLICATION_SERVER : 'mxgraph.aws3d.application_server',
SHADING_COLORS : 'shadingCols'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dApplicationServer.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
var strokeWidth = parseFloat(mxUtils.getValue(this.state.style, 'strokeWidth', '1'));
var strokeWidth1 = strokeWidth * w / 123;
var strokeWidth2 = strokeWidth * h / 124;
strokeWidth = Math.min(strokeWidth1, strokeWidth2);
this.background(c, 0, 0, w, h, strokeWidth);
c.setShadow(false);
this.foreground(c, 0, 0, w, h, strokeWidth);
};
mxShapeAws3dApplicationServer.prototype.background = function(c, x, y, w, h, strokeWidth)
{
c.setStrokeWidth(strokeWidth);
c.save();
c.save();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.7236);
c.lineTo(0, h * 0.2863);
c.lineTo(w * 0.5, 0);
c.lineTo(w, h * 0.2863);
c.lineTo(w, h * 0.7236);
c.lineTo(w * 0.5, h);
c.close();
c.fillAndStroke();
};
mxShapeAws3dApplicationServer.prototype.foreground = function(c, x, y, w, h, strokeWidth)
{
c.restore();
c.setShadow(false);
c.setFillColor('#000000');
var shading = mxUtils.getValue(this.state.style, mxShapeAws3dApplicationServer.prototype.cst.SHADING_COLORS, '0.1,0.3').toString().split(',');
var flipH = mxUtils.getValue(this.state.style, 'flipH', '0');
(flipH == '0') ? c.setAlpha(shading[0]) : c.setAlpha(shading[1]);
c.begin();
c.moveTo(0, h * 0.2863);
c.lineTo(w * 0.5, h * 0.5726);
c.lineTo(w * 0.5, h);
c.lineTo(0, h * 0.7177);
c.close();
c.fill();
(flipH == '0') ? c.setAlpha(shading[1]) : c.setAlpha(shading[0]);
c.begin();
c.moveTo(w, h * 0.2863);
c.lineTo(w * 0.5, h * 0.5726);
c.lineTo(w * 0.5, h);
c.lineTo(w, h * 0.7177);
c.close();
c.fill();
c.restore();
c.setShadow(false);
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.2863);
c.lineTo(w * 0.5, h * 0.5726);
c.lineTo(w * 0.5, h);
c.lineTo(0, h * 0.7177);
c.close();
c.stroke();
c.begin();
c.moveTo(w, h * 0.2863);
c.lineTo(w * 0.5, h * 0.5726);
c.lineTo(w * 0.5, h);
c.lineTo(w, h * 0.7177);
c.close();
c.stroke();
c.setLineJoin('miter');
var strokeColor = mxUtils.getValue(this.state.style, 'strokeColor', '#000000');
c.setFillColor(strokeColor);
c.begin();
c.moveTo(w * 0.374, h * 0.4435);
c.arcTo(w * 0.0325, h * 0.0202, 0, 0, 1, w * 0.374, h * 0.4153);
c.lineTo(w * 0.4797, h * 0.3548);
c.arcTo(w * 0.0325, h * 0.0161, 0, 0, 1, w * 0.5203, h * 0.3548);
c.lineTo(w * 0.626, h * 0.4153);
c.arcTo(w * 0.0325, h * 0.0202, 0, 0, 1, w * 0.626, h * 0.4411);
c.lineTo(w * 0.5203, h * 0.5016);
c.arcTo(w * 0.0325, h * 0.0161, 0, 0, 1, w * 0.4797, h * 0.5016);
c.close();
c.fill();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.7236);
c.lineTo(0, h * 0.2863);
c.lineTo(w * 0.5, 0);
c.lineTo(w, h * 0.2863);
c.lineTo(w, h * 0.7236);
c.lineTo(w * 0.5, h);
c.close();
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dApplicationServer.prototype.cst.APPLICATION_SERVER, mxShapeAws3dApplicationServer);
//**********************************************************************************************************************************************************
//CloudFront
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dCloudFront(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dCloudFront, mxShape);
mxShapeAws3dCloudFront.prototype.cst = {
CLOUDFRONT : 'mxgraph.aws3d.cloudfront',
SHADING_COLORS : 'shadingCols'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dCloudFront.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
var strokeWidth = parseFloat(mxUtils.getValue(this.state.style, 'strokeWidth', '1'));
var strokeWidth1 = strokeWidth * w / 103.8;
var strokeWidth2 = strokeWidth * h / 169.8;
var isShadow = parseFloat(mxUtils.getValue(this.state.style, 'shadow', '0'));
strokeWidth = Math.min(strokeWidth1, strokeWidth2);
c.setShadow(false);
c.setStrokeWidth(strokeWidth);
c.save();
c.save();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
if (isShadow == 1)
{
c.setShadow(true);
}
c.begin();
c.moveTo(0, h * 0.7915);
c.lineTo(0, h * 0.7491);
c.lineTo(w * 0.0588, h * 0.7279);
c.lineTo(w * 0.0588, h * 0.1036);
c.lineTo(w * 0.3526, 0);
c.lineTo(w * 0.9422, h * 0.2073);
c.lineTo(w * 0.9422, h * 0.8316);
c.lineTo(w, h * 0.8539);
c.lineTo(w, h * 0.894);
c.lineTo(w * 0.7013, h);
c.lineTo(w * 0.5877, h);
c.close();
c.fillAndStroke();
c.restore();
c.setFillColor('#000000');
var shading = mxUtils.getValue(this.state.style, mxShapeAws3dCloudFront.prototype.cst.SHADING_COLORS, '0.1,0.3').toString().split(',');
var flipH = mxUtils.getValue(this.state.style, 'flipH', '0');
(flipH == '0') ? c.setAlpha(shading[0]) : c.setAlpha(shading[1]);
c.begin();
c.moveTo(w * 0.0588, h * 0.106);
c.lineTo(w * 0.6474, h * 0.3121);
c.lineTo(w * 0.6474, h * 0.9352);
c.lineTo(w * 0.7052, h);
c.lineTo(w * 0.5915, h);
c.lineTo(0, h * 0.7915);
c.lineTo(0, h * 0.7491);
c.lineTo(w * 0.0588, h * 0.7279);
c.close();
c.fill();
(flipH == '0') ? c.setAlpha(shading[1]) : c.setAlpha(shading[0]);
c.begin();
c.moveTo(w * 0.6474, h * 0.3121);
c.lineTo(w * 0.9422, h * 0.2073);
c.lineTo(w * 0.9422, h * 0.8363);
c.lineTo(w, h * 0.8539);
c.lineTo(w, h * 0.894);
c.lineTo(w * 0.7013, h);
c.lineTo(w * 0.6474, h * 0.9305);
c.close();
c.fill();
c.restore();
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.7915);
c.lineTo(w * 0.0559, h * 0.7291);
c.lineTo(w * 0.6474, h * 0.9364);
c.lineTo(w * 0.5896, h);
c.moveTo(w * 0.6493, h * 0.9364);
c.lineTo(w * 0.9412, h * 0.8333);
c.lineTo(w, h * 0.894);
c.stroke();
c.begin();
c.moveTo(w * 0.0588, h * 0.106);
c.lineTo(w * 0.6474, h * 0.3121);
c.lineTo(w * 0.6474, h * 0.9352);
c.lineTo(w * 0.7052, h);
c.lineTo(w * 0.5915, h);
c.lineTo(0, h * 0.7915);
c.lineTo(0, h * 0.7491);
c.lineTo(w * 0.0588, h * 0.7279);
c.close();
c.stroke();
c.begin();
c.moveTo(w * 0.6474, h * 0.3121);
c.lineTo(w * 0.9422, h * 0.2073);
c.lineTo(w * 0.9422, h * 0.8363);
c.lineTo(w, h * 0.8539);
c.lineTo(w, h * 0.894);
c.lineTo(w * 0.7013, h);
c.lineTo(w * 0.6474, h * 0.9305);
c.close();
c.stroke();
var strokeColor = mxUtils.getValue(this.state.style, 'strokeColor', '#000000');
c.setFillColor(strokeColor);
c.begin();
c.moveTo(w * 0.3333, h * 0.6643);
c.arcTo(w * 0.3372, h * 0.2061, 0, 0, 1, w * 0.2351, h * 0.6042);
c.arcTo(w * 0.4528, h * 0.2768, 0, 0, 1, w * 0.1724, h * 0.523);
c.lineTo(w * 0.2428, h * 0.5677);
c.lineTo(w * 0.2427, h * 0.5895);
c.lineTo(w * 0.2765, h * 0.5995);
c.close();
c.moveTo(w * 0.1599, h * 0.4935);
c.arcTo(w * 0.3372, h * 0.2061, 0, 0, 1, w * 0.1522, h * 0.4146);
c.arcTo(w * 0.1156, h * 0.0883, 0, 0, 1, w * 0.2071, h * 0.3486);
c.lineTo(w * 0.2013, h * 0.4187);
c.lineTo(w * 0.1859, h * 0.4146);
c.lineTo(w * 0.1859, h * 0.4464);
c.lineTo(w * 0.1907, h * 0.4493);
c.close();
c.moveTo(w * 0.2235, h * 0.3445);
c.arcTo(w * 0.1927, h * 0.1767, 0, 0, 1, w * 0.368, h * 0.361);
c.arcTo(w * 0.3854, h * 0.2356, 0, 0, 1, w * 0.468, h * 0.4299);
c.lineTo(w * 0.368, h * 0.4034);
c.lineTo(w * 0.368, h * 0.394);
c.lineTo(w * 0.3256, h * 0.3799);
c.lineTo(w * 0.3256, h * 0.3887);
c.close();
c.moveTo(w * 0.4855, h * 0.4499);
c.arcTo(w * 0.3854, h * 0.2356, 0, 0, 1, w * 0.5337, h * 0.5395);
c.arcTo(w * 0.3854, h * 0.2356, 0, 0, 1, w * 0.5328, h * 0.6302);
c.lineTo(w * 0.4952, h * 0.5589);
c.lineTo(w * 0.5019, h * 0.5595);
c.lineTo(w * 0.5019, h * 0.5265);
c.lineTo(w * 0.4855, h * 0.5194);
c.close();
c.moveTo(w * 0.5241, h * 0.6455);
c.arcTo(w * 0.0963, h * 0.0589, 0, 0, 1, w * 0.4663, h * 0.682);
c.arcTo(w * 0.1445, h * 0.0883, 0, 0, 1, w * 0.3642, h * 0.6761);
c.lineTo(w * 0.4239, h * 0.6525);
c.lineTo(w * 0.4566, h * 0.6643);
c.lineTo(w * 0.4566, h * 0.6413);
c.close();
c.moveTo(w * 0.3507, h * 0.6667);
c.lineTo(w * 0.2871, h * 0.5919);
c.lineTo(w * 0.4123, h * 0.6366);
c.close();
c.moveTo(w * 0.2563, h * 0.5595);
c.lineTo(w * 0.1753, h * 0.5088);
c.lineTo(w * 0.2052, h * 0.4594);
c.close();
c.moveTo(w * 0.2139, h * 0.4229);
c.lineTo(w * 0.2197, h * 0.3528);
c.lineTo(w * 0.3256, h * 0.4028);
c.lineTo(w * 0.2283, h * 0.4252);
c.close();
c.moveTo(w * 0.2264, h * 0.4417);
c.lineTo(w * 0.3218, h * 0.4146);
c.lineTo(w * 0.3353, h * 0.4181);
c.lineTo(w * 0.3353, h * 0.4971);
c.lineTo(w * 0.3208, h * 0.4912);
c.lineTo(w * 0.3208, h * 0.4965);
c.lineTo(w * 0.2264, h * 0.4482);
c.close();
c.moveTo(w * 0.2697, h * 0.5618);
c.lineTo(w * 0.2245, h * 0.4635);
c.lineTo(w * 0.2331, h * 0.4588);
c.lineTo(w * 0.3256, h * 0.5112);
c.lineTo(w * 0.3237, h * 0.5241);
c.close();
c.moveTo(w * 0.2852, h * 0.576);
c.lineTo(w * 0.2852, h * 0.5654);
c.lineTo(w * 0.3391, h * 0.53);
c.lineTo(w * 0.3516, h * 0.5347);
c.lineTo(w * 0.4133, h * 0.6213);
c.close();
c.moveTo(w * 0.368, h * 0.5141);
c.lineTo(w * 0.368, h * 0.5088);
c.lineTo(w * 0.3526, h * 0.5029);
c.lineTo(w * 0.3526, h * 0.4234);
c.lineTo(w * 0.3622, h * 0.4276);
c.lineTo(w * 0.4547, h * 0.5177);
c.lineTo(w * 0.4557, h * 0.5277);
c.close();
c.moveTo(w * 0.3671, h * 0.417);
c.lineTo(w * 0.4692, h * 0.4411);
c.lineTo(w * 0.4721, h * 0.52);
c.close();
c.moveTo(w * 0.368, h * 0.5253);
c.lineTo(w * 0.4566, h * 0.5359);
c.lineTo(w * 0.4566, h * 0.5453);
c.lineTo(w * 0.4663, h * 0.5465);
c.lineTo(w * 0.4335, h * 0.6201);
c.lineTo(w * 0.422, h * 0.616);
c.lineTo(w * 0.368, h * 0.5389);
c.close();
c.moveTo(w * 0.4798, h * 0.5583);
c.lineTo(w * 0.5183, h * 0.629);
c.lineTo(w * 0.4557, h * 0.6313);
c.lineTo(w * 0.4557, h * 0.6237);
c.lineTo(w * 0.447, h * 0.6225);
c.close();
c.fill();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.7915);
c.lineTo(0, h * 0.7491);
c.lineTo(w * 0.0588, h * 0.7279);
c.lineTo(w * 0.0588, h * 0.1036);
c.lineTo(w * 0.3526, 0);
c.lineTo(w * 0.9422, h * 0.2073);
c.lineTo(w * 0.9422, h * 0.8316);
c.lineTo(w, h * 0.8539);
c.lineTo(w, h * 0.894);
c.lineTo(w * 0.7013, h);
c.lineTo(w * 0.5877, h);
c.close();
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dCloudFront.prototype.cst.CLOUDFRONT, mxShapeAws3dCloudFront);
//**********************************************************************************************************************************************************
//Data Center
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dDataCenter(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dDataCenter, mxShape);
mxShapeAws3dDataCenter.prototype.cst = {
DATA_CENTER : 'mxgraph.aws3d.dataCenter',
SHADING_COLORS : 'shadingCols'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dDataCenter.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
var strokeWidth = parseFloat(mxUtils.getValue(this.state.style, 'strokeWidth', '1'));
var strokeWidth1 = strokeWidth * w / 123;
var strokeWidth2 = strokeWidth * h / 142;
var isShadow = parseFloat(mxUtils.getValue(this.state.style, 'shadow', '0'));
strokeWidth = Math.min(strokeWidth1, strokeWidth2);
c.setShadow(false);
c.setStrokeWidth(strokeWidth);
c.save();
c.save();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
if (isShadow == 1)
{
c.setShadow(true);
}
c.begin();
c.moveTo(0, h * 0.7465);
c.lineTo(0, h * 0.25);
c.lineTo(w * 0.5, 0);
c.lineTo(w, h * 0.25);
c.lineTo(w, h * 0.7465);
c.lineTo(w * 0.5, h);
c.close();
c.fillAndStroke();
c.restore();
c.setFillColor('#000000');
var shading = mxUtils.getValue(this.state.style, mxShapeAws3dDataCenter.prototype.cst.SHADING_COLORS, '0.1,0.3').toString().split(',');
var flipH = mxUtils.getValue(this.state.style, 'flipH', '0');
(flipH == '0') ? c.setAlpha(shading[0]) : c.setAlpha(shading[1]);
c.begin();
c.moveTo(0, h * 0.7465);
c.lineTo(0, h * 0.25);
c.lineTo(w * 0.5, h * 0.5);
c.lineTo(w * 0.5, h);
c.close();
c.fill();
(flipH == '0') ? c.setAlpha(shading[1]) : c.setAlpha(shading[0]);
c.begin();
c.moveTo(w, h * 0.7465);
c.lineTo(w, h * 0.25);
c.lineTo(w * 0.5, h * 0.5);
c.lineTo(w * 0.5, h);
c.close();
c.fill();
c.restore();
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.7465);
c.lineTo(0, h * 0.25);
c.lineTo(w * 0.5, h * 0.5);
c.lineTo(w * 0.5, h);
c.close();
c.stroke();
c.begin();
c.moveTo(w, h * 0.7465);
c.lineTo(w, h * 0.25);
c.lineTo(w * 0.5, h * 0.5);
c.lineTo(w * 0.5, h);
c.close();
c.stroke();
c.setLineCap('round');
c.setStrokeWidth(3 * strokeWidth);
c.begin();
c.moveTo(w * 0.0894, h * 0.3838);
c.lineTo(w * 0.4187, h * 0.5493);
c.moveTo(w * 0.0894, h * 0.4331);
c.lineTo(w * 0.4187, h * 0.5986);
c.moveTo(w * 0.0894, h * 0.4824);
c.lineTo(w * 0.4187, h * 0.6479);
c.moveTo(w * 0.5854, h * 0.5493);
c.lineTo(w * 0.9146, h * 0.3838);
c.moveTo(w * 0.5854, h * 0.5986);
c.lineTo(w * 0.9146, h * 0.4331);
c.moveTo(w * 0.5854, h * 0.6479);
c.lineTo(w * 0.9146, h * 0.4824);
c.stroke();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.7465);
c.lineTo(0, h * 0.25);
c.lineTo(w * 0.5, 0);
c.lineTo(w, h * 0.25);
c.lineTo(w, h * 0.7465);
c.lineTo(w * 0.5, h);
c.close();
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dDataCenter.prototype.cst.DATA_CENTER, mxShapeAws3dDataCenter);
//**********************************************************************************************************************************************************
//Data Server
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dDataServer(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dDataServer, mxShape);
mxShapeAws3dDataServer.prototype.cst = {
DATA_SERVER : 'mxgraph.aws3d.dataServer',
SHADING_COLORS : 'shadingCols'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dDataServer.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
var strokeWidth = parseFloat(mxUtils.getValue(this.state.style, 'strokeWidth', '1'));
var strokeWidth1 = strokeWidth * w / 123;
var strokeWidth2 = strokeWidth * h / 106;
var isShadow = parseFloat(mxUtils.getValue(this.state.style, 'shadow', '0'));
strokeWidth = Math.min(strokeWidth1, strokeWidth2);
c.setShadow(false);
c.setStrokeWidth(strokeWidth);
c.save();
c.save();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
if (isShadow == 1)
{
c.setShadow(true);
}
c.begin();
c.moveTo(0, h * 0.6651);
c.lineTo(0, h * 0.3349);
c.lineTo(w * 0.5, 0);
c.lineTo(w, h * 0.3349);
c.lineTo(w, h * 0.6651);
c.lineTo(w * 0.5, h);
c.close();
c.fillAndStroke();
c.restore();
c.setFillColor('#000000');
var shading = mxUtils.getValue(this.state.style, mxShapeAws3dDataServer.prototype.cst.SHADING_COLORS, '0.1,0.3').toString().split(',');
var flipH = mxUtils.getValue(this.state.style, 'flipH', '0');
(flipH == '0') ? c.setAlpha(shading[0]) : c.setAlpha(shading[1]);
c.begin();
c.moveTo(0, h * 0.6651);
c.lineTo(0, h * 0.3349);
c.lineTo(w * 0.5, h * 0.6698);
c.lineTo(w * 0.5, h);
c.close();
c.fill();
(flipH == '0') ? c.setAlpha(shading[1]) : c.setAlpha(shading[0]);
c.begin();
c.moveTo(w, h * 0.6651);
c.lineTo(w, h * 0.3349);
c.lineTo(w * 0.5, h * 0.6698);
c.lineTo(w * 0.5, h);
c.close();
c.fill();
c.restore();
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.6651);
c.lineTo(0, h * 0.3349);
c.lineTo(w * 0.5, h * 0.6698);
c.lineTo(w * 0.5, h);
c.close();
c.stroke();
c.begin();
c.moveTo(w, h * 0.6651);
c.lineTo(w, h * 0.3349);
c.lineTo(w * 0.5, h * 0.6698);
c.lineTo(w * 0.5, h);
c.close();
c.stroke();
c.setLineCap('round');
c.setStrokeWidth(3 * strokeWidth);
c.begin();
c.moveTo(w * 0.0878, h * 0.4858);
c.lineTo(w * 0.4187, h * 0.7094);
c.moveTo(w * 0.587, h * 0.7094);
c.lineTo(w * 0.9187, h * 0.4858);
c.stroke();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.6651);
c.lineTo(0, h * 0.3349);
c.lineTo(w * 0.5, 0);
c.lineTo(w, h * 0.3349);
c.lineTo(w, h * 0.6651);
c.lineTo(w * 0.5, h);
c.close();
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dDataServer.prototype.cst.DATA_SERVER, mxShapeAws3dDataServer);
//**********************************************************************************************************************************************************
//Elastic Load Balancing
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
function mxShapeAws3dElasticLoadBalancing(bounds, fill, stroke, strokewidth)
{
mxShape.call(this);
this.bounds = bounds;
this.fill = fill;
this.stroke = stroke;
this.strokewidth = (strokewidth != null) ? strokewidth : 1;
};
/**
* Extends mxShape.
*/
mxUtils.extend(mxShapeAws3dElasticLoadBalancing, mxShape);
mxShapeAws3dElasticLoadBalancing.prototype.cst = {
ELASTIC_LOAD_BALANCING : 'mxgraph.aws3d.elasticLoadBalancing',
SHADING_COLORS : 'shadingCols'
};
/**
* Function: paintVertexShape
*
* Paints the vertex shape.
*/
mxShapeAws3dElasticLoadBalancing.prototype.paintVertexShape = function(c, x, y, w, h)
{
c.translate(x, y);
var strokeWidth = parseFloat(mxUtils.getValue(this.state.style, 'strokeWidth', '1'));
var strokeWidth1 = strokeWidth * w / 92;
var strokeWidth2 = strokeWidth * h / 88.17;
var strokeColor = mxUtils.getValue(this.state.style, 'strokeColor', '#000000');
var isShadow = parseFloat(mxUtils.getValue(this.state.style, 'shadow', '0'));
strokeWidth = Math.min(strokeWidth1, strokeWidth2);
c.setShadow(false);
c.setStrokeWidth(strokeWidth);
c.save();
c.save();
c.save();
c.save();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
if (isShadow == 1)
{
c.setShadow(true);
}
c.begin();
c.moveTo(0, h * 0.7996);
c.lineTo(0, h * 0.1985);
c.lineTo(w * 0.3315, 0);
c.lineTo(w * 0.6685, 0);
c.lineTo(w, h * 0.1985);
c.lineTo(w, h * 0.7996);
c.lineTo(w * 0.6685, h);
c.lineTo(w * 0.3315, h);
c.close();
c.fillAndStroke();
c.restore();
c.setFillColor('#000000');
var shading = mxUtils.getValue(this.state.style, mxShapeAws3dElasticLoadBalancing.prototype.cst.SHADING_COLORS, '0.1,0.3').toString().split(',');
var flipH = mxUtils.getValue(this.state.style, 'flipH', '0');
(flipH == '0') ? c.setAlpha(shading[0]) : c.setAlpha(shading[1]);
c.begin();
c.moveTo(0, h * 0.4026);
c.lineTo(w * 0.3315, h * 0.6011);
c.lineTo(w * 0.6685, h * 0.6011);
c.lineTo(w * 0.6685, h);
c.lineTo(w * 0.3315, h);
c.lineTo(0, h * 0.7996);
c.close();
c.fill();
(flipH == '0') ? c.setAlpha(shading[1]) : c.setAlpha(shading[0]);
c.begin();
c.moveTo(w * 0.6685, h * 0.6011);
c.lineTo(w, h * 0.4026);
c.lineTo(w, h * 0.7996);
c.lineTo(w * 0.6685, h);
c.close();
c.fill();
c.restore();
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.4026);
c.lineTo(w * 0.3315, h * 0.6011);
c.lineTo(w * 0.6685, h * 0.6011);
c.lineTo(w * 0.6685, h);
c.lineTo(w * 0.3315, h);
c.lineTo(0, h * 0.7996);
c.close();
c.stroke();
c.begin();
c.moveTo(w * 0.6685, h * 0.6011);
c.lineTo(w, h * 0.4026);
c.lineTo(w, h * 0.7996);
c.lineTo(w * 0.6685, h);
c.close();
c.moveTo(w * 0.3315, h * 0.6011);
c.lineTo(w * 0.3315, h);
c.stroke();
c.restore();
c.setFillColor(strokeColor);
c.begin();
c.moveTo(w * 0.337, h * 0.1395);
c.arcTo(w * 0.3043, h * 0.1928, 0, 0, 1, w * 0.5, h * 0.1191);
c.arcTo(w * 0.3043, h * 0.1928, 0, 0, 1, w * 0.6739, h * 0.1645);
c.arcTo(w * 0.3261, h * 0.2155, 0, 0, 1, w * 0.8152, h * 0.3176);
c.arcTo(w * 0.3261, h * 0.1701, 0, 0, 1, w * 0.75, h * 0.4367);
c.arcTo(w * 0.3261, h * 0.3403, 0, 0, 1, w * 0.6033, h * 0.4854);
c.arcTo(w * 0.3261, h * 0.2268, 0, 0, 1, w * 0.4348, h * 0.4741);
c.arcTo(w * 0.3261, h * 0.2268, 0, 0, 1, w * 0.2848, h * 0.4094);
c.arcTo(w * 0.3261, h * 0.2268, 0, 0, 1, w * 0.2065, h * 0.3062);
c.arcTo(w * 0.3261, h * 0.1701, 0, 0, 1, w * 0.2446, h * 0.1928);
c.arcTo(w * 0.2717, h * 0.1701, 0, 0, 1, w * 0.337, h * 0.1395);
c.fill();
c.restore();
c.begin();
c.moveTo(w * 0.2826, h * 0.372);
c.lineTo(w * 0.362, h * 0.3232);
c.lineTo(w * 0.4054, h * 0.3482);
c.lineTo(w * 0.4457, h * 0.2654);
c.lineTo(w * 0.4185, h * 0.2643);
c.lineTo(w * 0.4728, h * 0.2132);
c.lineTo(w * 0.4348, h * 0.1928);
c.lineTo(w * 0.5141, h * 0.144);
c.lineTo(w * 0.5837, h * 0.1883);
c.lineTo(w * 0.5043, h * 0.2348);
c.lineTo(w * 0.4848, h * 0.2223);
c.lineTo(w * 0.4967, h * 0.2688);
c.lineTo(w * 0.463, h * 0.2665);
c.lineTo(w * 0.4304, h * 0.3346);
c.lineTo(w * 0.4946, h * 0.2949);
c.lineTo(w * 0.4761, h * 0.2858);
c.lineTo(w * 0.5511, h * 0.2631);
c.lineTo(w * 0.5261, h * 0.2472);
c.lineTo(w * 0.6043, h * 0.1996);
c.lineTo(w * 0.6761, h * 0.2404);
c.lineTo(w * 0.5978, h * 0.2892);
c.lineTo(w * 0.5652, h * 0.2699);
c.lineTo(w * 0.5293, h * 0.3198);
c.lineTo(w * 0.5087, h * 0.3051);
c.lineTo(w * 0.4543, h * 0.3391);
c.lineTo(w * 0.563, h * 0.3221);
c.lineTo(w * 0.5598, h * 0.3017);
c.lineTo(w * 0.6326, h * 0.3096);
c.lineTo(w * 0.6163, h * 0.2994);
c.lineTo(w * 0.6957, h * 0.2529);
c.lineTo(w * 0.7674, h * 0.2938);
c.lineTo(w * 0.687, h * 0.3425);
c.lineTo(w * 0.6489, h * 0.321);
c.lineTo(w * 0.5707, h * 0.3539);
c.lineTo(w * 0.5674, h * 0.3369);
c.lineTo(w * 0.4293, h * 0.3618);
c.lineTo(w * 0.4641, h * 0.3834);
c.lineTo(w * 0.3859, h * 0.4299);
c.close();
c.fill();
c.setStrokeWidth(2 * strokeWidth);
c.setStrokeColor('#292929');
c.setLineJoin('round');
c.begin();
c.moveTo(0, h * 0.7996);
c.lineTo(0, h * 0.1985);
c.lineTo(w * 0.3315, 0);
c.lineTo(w * 0.6685, 0);
c.lineTo(w, h * 0.1985);
c.lineTo(w, h * 0.7996);
c.lineTo(w * 0.6685, h);
c.lineTo(w * 0.3315, h);
c.close();
c.stroke();
};
mxCellRenderer.registerShape(mxShapeAws3dElasticLoadBalancing.prototype.cst.ELASTIC_LOAD_BALANCING, mxShapeAws3dElasticLoadBalancing);
//**********************************************************************************************************************************************************
//Instance
//**********************************************************************************************************************************************************
/**
* Extends mxShape.
*/
functio