HanSolo / dotmatrix

A little dot matrix JavaFX control
Apache License 2.0
13 stars 3 forks source link

how to clear the matrix screen #2

Closed mokun closed 6 years ago

mokun commented 6 years ago

Is there a quick way to clear the previous text sent to the matrix ?

I added the following method in DotMatrix but it doesn't work

    public void clear() {
        ctx.clearRect(0, 0, width, height);
    }

I'd like to clear out the matrix screen so that I may send a new message down the pipeline.

HanSolo commented 6 years ago

You can either switch each pixel separately on/off in a loop by using setPixel(x, y, true/false) or simply use the setAllDotsOff() method.