drawText method
Draw a text at position (x
,y
).
Implementation
@override
void drawText(String text, num x, num y, PFont font, PStyle style) {
x = transform.x(x);
y = transform.y(y);
var clip = _clip;
if (clip != null) {
var m = measureText(text, font);
var box = PRectangle(x, y, m.actualWidth, m.actualHeight);
var r = clip.intersection(box);
if (r.isZeroDimension) return;
_callClipped(clip, box, () => _drawTextImpl(style, font, x, y, text));
} else {
_drawTextImpl(style, font, x, y, text);
}
}