@@ -28,7 +28,7 @@ export class PrimitiveTool {
2828 this . ctx . strokeStyle = this . main . colorWidgetState . line . alphaColor ;
2929 this . ctx . fillStyle = this . main . colorWidgetState . fill . alphaColor ;
3030 const scale = this . main . getScale ( ) ;
31-
31+ this . ctx . lineCap = "round" ;
3232 if ( mainClass === 'ptro-crp-el' || mainClass === 'ptro-zoomer' ) {
3333 this . tmpData = this . ctx . getImageData ( 0 , 0 , this . main . size . w , this . main . size . h ) ;
3434 if ( this . type === 'brush' ) {
@@ -58,25 +58,6 @@ export class PrimitiveTool {
5858
5959 drawBrushPath ( ) {
6060 const smPoints = this . points ;
61- this . ctx . beginPath ( ) ;
62-
63- this . ctx . lineWidth = 0 ;
64- this . ctx . fillStyle = this . main . colorWidgetState . line . alphaColor ;
65-
66- this . ctx . ellipse (
67- this . points [ 0 ] . x , this . points [ 0 ] . y ,
68- this . lineWidth / 2 , this . lineWidth / 2 ,
69- 0 , 2 * Math . PI , false ) ;
70-
71- this . ctx . ellipse (
72- this . points [ this . points . length - 1 ] . x ,
73- this . points [ this . points . length - 1 ] . y ,
74- this . lineWidth / 2 , this . lineWidth / 2 ,
75- 0 , 2 * Math . PI , false ) ;
76-
77- this . ctx . fill ( ) ;
78- this . ctx . closePath ( ) ;
79-
8061
8162 this . ctx . beginPath ( ) ;
8263 this . ctx . lineWidth = this . lineWidth ;
@@ -92,8 +73,10 @@ export class PrimitiveTool {
9273 if ( last ) {
9374 this . ctx . moveTo ( last . x , last . y ) ;
9475 }
95- this . ctx . closePath ( ) ;
76+
9677 this . ctx . stroke ( ) ;
78+
79+ this . ctx . closePath ( ) ;
9780 }
9881
9982 handleMouseMove ( event ) {
0 commit comments