File size: 1,058 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var CRp = {};

CRp.nodeShapeImpl = function( name, context, centerX, centerY, width, height, points, corners ){
  switch( name ){
    case 'ellipse':
      return this.drawEllipsePath( context, centerX, centerY, width, height );
    case 'polygon':
      return this.drawPolygonPath( context, centerX, centerY, width, height, points );
    case 'round-polygon':
      return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points, corners );
    case 'roundrectangle':
    case 'round-rectangle':
      return this.drawRoundRectanglePath( context, centerX, centerY, width, height, corners );
    case 'cutrectangle':
    case 'cut-rectangle':
      return this.drawCutRectanglePath( context, centerX, centerY, width, height, points, corners );
    case 'bottomroundrectangle':
    case 'bottom-round-rectangle':
      return this.drawBottomRoundRectanglePath( context, centerX, centerY, width, height, corners );
    case 'barrel':
      return this.drawBarrelPath( context, centerX, centerY, width, height );
  }
};

export default CRp;