| 128 | |
| 129 | fun setStrokeJoin(strokeJoin: Paint.Join) { |
| 130 | strokePaint.strokeJoin = strokeJoin |
| 131 | invalidate() |
| 132 | } |
| 133 | |
| 134 | fun resetStrokeJoin() { |
| 135 | setStrokeJoin(Paint.Join.MITER) |
| 136 | } |
| 137 | |
| 138 | fun setStrokeCap(strokeCap: Paint.Cap) { |
| 139 | strokePaint.strokeCap = strokeCap |
| 140 | invalidate() |
| 141 | } |
| 142 | |
| 143 | fun resetStrokeCap() { |
| 144 | setStrokeCap(Paint.Cap.BUTT) |
| 145 | } |
| 146 | |
| 147 | override fun onDraw(canvas: Canvas) { |
| 148 | ViewUtils.onDraw(this, canvas) { |
| 149 | super.onDraw(it) |
| 150 | |
| 151 | if (geometricPath.isEmpty) { |
| 152 | return |
no test coverage detected