private void thick_flat_line(float ox1, float oy1,
                                 float r1, float g1, float b1, float a1,
                                 float ox2, float oy2,
                                 float r2, float g2, float b2, float a2) {
      spolygon.interpARGB = (r1 != r2) || (g1 != g2) || (b1 != b2) || (a1 != a2);
//      spolygon.interpZ = false;

      float dX = ox2-ox1 + EPSILON;
      float dY = oy2-oy1 + EPSILON;
      float len = (float) Math.sqrt(dX*dX + dY*dY);

      // TODO stroke width should be transformed!
      float rh = strokeWeight / len;

      float dx0 = rh * dY;
      float dy0 = rh * dX;
      float dx1 = rh * dY;
      float dy1 = rh * dX;

      spolygon.reset(4);

      float svertex[] = spolygon.vertices[0];
      svertex[TX] = ox1+dx0;
      svertex[TY] = oy1-dy0;
      svertex[R] = r1;
      svertex[G] = g1;
      svertex[B] = b1;
      svertex[A] = a1;

      svertex = spolygon.vertices[1];
      svertex[TX] = ox1-dx0;
      svertex[TY] = oy1+dy0;
      svertex[R] = r1;
      svertex[G] = g1;
      svertex[B] = b1;
      svertex[A] = a1;

      svertex = spolygon.vertices[2];
      svertex[TX] = ox2-dx1;
      svertex[TY] = oy2+dy1;
      svertex[R] = r2;
      svertex[G] = g2;
      svertex[B] = b2;
      svertex[A] = a2;

      svertex = spolygon.vertices[3];
      svertex[TX] = ox2+dx1;
      svertex[TY] = oy2-dy1;
      svertex[R] = r2;
      svertex[G] = g2;
      svertex[B] = b2;
      svertex[A] = a2;

      spolygon.render();
    }