dps_canvas
Version:
Html canvas üzerinde şekiller oluşturmanızı sağlar
41 lines (32 loc) • 826 B
JavaScript
import Base from "./parent";
export default class Text {
static
static draw({ x, y, name, color }) {
Base.context.beginPath();
Base.context.fillStyle = color || "#fff";
Base.context.font = "15px Arial";
Base.context.textAlign = "center"
Base.context.textBaseline = "middle";
Base.context.fillText(name, x, y);
Base.context.closePath()
}
/**
* @return {Array}
*/
static get text() {
return Text.
}
static get lastItem() {
return Text.text[Text.text.length - 1]
}
static add(params) {
Text.
}
static deleteTextById(id) {
const indexText = Text.
Text.
}
static clearItem() {
Text.
}
}