(text, x, y, maxY, minY)
| 1103 | } |
| 1104 | |
| 1105 | _renderText(text, x, y, maxY, minY) { |
| 1106 | let states = this.states; |
| 1107 | let context = this.textDrawingContext(); |
| 1108 | |
| 1109 | if (y < minY || y >= maxY) { |
| 1110 | return; // don't render lines beyond minY/maxY |
| 1111 | } |
| 1112 | |
| 1113 | this.push(); |
| 1114 | |
| 1115 | // no stroke unless specified by user |
| 1116 | if (states.strokeColor && states.strokeSet) { |
| 1117 | context.strokeText(text, x, y); |
| 1118 | } |
| 1119 | |
| 1120 | if (!this._clipping && states.fillColor) { |
| 1121 | |
| 1122 | // if fill hasn't been set by user, use default text fill |
| 1123 | if (!states.fillSet) { |
| 1124 | this._setFill(DefaultFill); |
| 1125 | } |
| 1126 | context.fillText(text, x, y); |
| 1127 | } |
| 1128 | |
| 1129 | this.pop(); |
| 1130 | } |
| 1131 | |
| 1132 | /* |
| 1133 | Position the lines of text based on their textAlign/textBaseline properties |
no test coverage detected