import { Property } from '@nativescript/core';
import { Paint } from '../Paint';
export const pointsProperty = new Property({
    name: 'points',
    valueChanged(target, oldValue, newValue) {
        target.invalidate();
    },
});
export const modeProperty = new Property({
    name: 'mode',
    defaultValue: 'points',
    valueChanged(target, oldValue, newValue) {
        target.invalidate();
    },
});
export class Points extends Paint {
    draw() {
        const override_color = this.parent._overrideColor;
        const context = this._canvas.getContext('2d');
        context.lineWidth = this._getStrokeWidth();
        context.lineJoin = this._getStrokeJoin();
        context.strokeStyle = this._getColor();
        context.drawPoints(this.mode ?? 'points', this.points);
    }
}
pointsProperty.register(Points);
modeProperty.register(Points);
//# sourceMappingURL=Points.js.map