Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
27 | 2 | 6 | 0.990 | stmt_list[5] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 25 | 1067 | Bio/Graphics/GenomeDiagram/_CircularDrawer.py |
2 | 27 | 1105 | Bio/Graphics/GenomeDiagram/_CircularDrawer.py |
| ||||
p.addArc(self.xcenter,self.ycenter,shaft_outer_radius,90-(headangle*180/pi),90-(startangle*180/pi),reverse = True) p.lineTo(x0+outer_radius*headsin,y0+outer_radius*headcos) if abs(angle)<0.5: p.lineTo(x0+middle_radius*endsin,y0+middle_radius*endcos) p.lineTo(x0+inner_radius*headsin,y0+inner_radius*headcos) else: dx = min(0.1,abs(angle)/50.0) #auto-scale number of steps x = dx while x<1: r = outer_radius-x*(outer_radius-middle_radius) a = headangle+x*(endangle-headangle) p.lineTo(x0+r*sin(a),y0+r*cos(a)) x+=dx p.lineTo(x0+middle_radius*endsin,y0+middle_radius*endcos) x = dx while x<1: r = middle_radius-x*(middle_radius-inner_radius) a = headangle+(1-x)*(endangle-headangle) p.lineTo(x0+r*sin(a),y0+r*cos(a)) x+=dx p.lineTo(x0+inner_radius*headsin,y0+inner_radius*headcos) p.closePath( ) return p |
| ||||
p.addArc(self.xcenter,self.ycenter,shaft_outer_radius,90-(endangle*180/pi),90-(headangle*180/pi),reverse = False) p.lineTo(x0+outer_radius*headsin,y0+outer_radius*headcos) #TODO - two staight lines is only a good approximation for small #head angle, in general will need to curved lines here: if abs(angle)<0.5: p.lineTo(x0+middle_radius*startsin,y0+middle_radius*startcos) p.lineTo(x0+inner_radius*headsin,y0+inner_radius*headcos) else: dx = min(0.1,abs(angle)/50.0) #auto-scale number of steps x = dx while x<1: r = outer_radius-x*(outer_radius-middle_radius) a = headangle+x*(startangle-headangle) p.lineTo(x0+r*sin(a),y0+r*cos(a)) x+=dx p.lineTo(x0+middle_radius*startsin,y0+middle_radius*startcos) x = dx while x<1: r = middle_radius-x*(middle_radius-inner_radius) a = headangle+(1-x)*(startangle-headangle) p.lineTo(x0+r*sin(a),y0+r*cos(a)) x+=dx p.lineTo(x0+inner_radius*headsin,y0+inner_radius*headcos) p.closePath( ) return p |
| |||
p.addArc(self.xcenter,self.ycenter,shaft_outer_radius,90-( [[#variable73024b20]]*180/pi),90-( [[#variable7800a3a0]]*180/pi),reverse = [[#variable7306f9e0]]) p.lineTo(x0+outer_radius*headsin,y0+outer_radius*headcos) #TODO - two staight lines is only a good approximation for small #head angle, in general will need to curved lines here: if abs(angle)<0.5: p.lineTo(x0+middle_radius* [[#variable16811640]],y0+middle_radius* [[#variable60189da0]]) p.lineTo(x0+inner_radius*headsin,y0+inner_radius*headcos) else: dx = min(0.1,abs(angle)/50.0) #auto-scale number of steps x = dx while x<1: r = outer_radius-x*(outer_radius-middle_radius) a = headangle+x*( [[#variable7306fac0]]-headangle) p.lineTo(x0+r*sin(a),y0+r*cos(a)) x+=dx p.lineTo(x0+middle_radius* [[#variable16811640]],y0+middle_radius* [[#variable60189da0]]) x = dx while x<1: r = middle_radius-x*(middle_radius-inner_radius) a = headangle+(1-x)*( [[#variable7306fac0]]-headangle) p.lineTo(x0+r*sin(a),y0+r*cos(a)) x+=dx p.lineTo(x0+inner_radius*headsin,y0+inner_radius*headcos) p.closePath( ) return p |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#73024b20]] | endangle |
1 | 2 | [[#73024b20]] | headangle |
2 | 1 | [[#7800a3a0]] | headangle |
2 | 2 | [[#7800a3a0]] | startangle |
3 | 1 | [[#7306f9e0]] | False |
3 | 2 | [[#7306f9e0]] | True |
4 | 1 | [[#16811640]] | startsin |
4 | 2 | [[#16811640]] | endsin |
5 | 1 | [[#60189da0]] | startcos |
5 | 2 | [[#60189da0]] | endcos |
6 | 1 | [[#7306fac0]] | startangle |
6 | 2 | [[#7306fac0]] | endangle |