class DelegateNativeContext2D implements INativeContext2D {

    public boolean path(PathPartList.PathPartListJSO list) {
        //As-is logic from native code on Lienzo NativeContext2D class
        if (list == null) {
            return false;
        }
        int leng = list.length();
        if (leng < 1) {
            return false;
        }
        int indx = 0;
        this.beginPath();
        while (indx < leng) {
            PathPartEntryJSO e = list.get(indx);
            indx++;
            NFastDoubleArrayJSO p = e.getPoints();
            switch (e.getCommand()) {
                case 1:
                    lineTo(p.get(0), p.get(1));
                    break;
                case 2:
                    moveTo(p.get(0), p.get(1));
                    break;
                case 3:
                    bezierCurveTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4), p.get(5));
                    break;
                case 4:
                    quadraticCurveTo(p.get(0), p.get(1), p.get(2), p.get(3));
                    break;
                case 5:
                    ellipse(p.get(0), p.get(1), p.get(2), p.get(3), p.get(6), p.get(4), p.get(4) + p.get(5),
                            (1 - p.get(7)) > 0);
                    break;
                case 6:
                    closePath();
                    break;
                case 7:
                    this.arcTo(p.get(0), p.get(1), p.get(2), p.get(3), p.get(4));
                    break;
            }
        }
        return true;
    }

    public  DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler);
      DelegateNativeContext2D(IContext2D context, AbstractCanvasHandler canvasHandler, Converter converter);

}