Thursday, September 10, 2015

Android Memory Compact Draw Segments drawLines();

if (count >= 4) {
    if ((count & 2) != 0) {
        canvas.drawLines(pointlist, 0, count-2, linePaint);
        canvas.drawLines(pointlist, 2, count-2, linePaint);
    else {
        canvas.drawLines(pointlist, 0, count, linePaint);
        canvas.drawLines(pointlist, 2, count - 4, linePaint);

If anybody needs to draw a bunch of lines from a float[] of points (not segments). Somebody is going to go OMG that's way better than how I was doing it!

Wednesday, September 2, 2015

Clever, even for me.

If you do deny me life, liberty or property, I do not care if you believe that a space-turtle on a mountain gave you religious permission to do that, you don't have that right. And if you do that to all black people, all gay people, all woman on equally nebulous grounds; you have no right, and you're a bigot.