Login  Register

Re: dxf library reader

Posted by Rallaz on Apr 19, 2012; 6:46pm
URL: https://forum.librecad.org/dxf-library-reader-tp5646518p5652503.html

The line number have changed with my last commits and have started the write part for you.
rs_filerdxfrw.cpp line #1602 say:

    case RS2::EntityInsert:
        writeInsert((RS_Insert*)e);
        break;
    case RS2::EntityText:
        writeMText((RS_Text*)e);
        break;
/*    case RS2::EntityMText:
        writeMText((RS_MText*)e);
        break;*/
    case RS2::EntityDimLinear:

change to:

    case RS2::EntityInsert:
        writeInsert((RS_Insert*)e);
        break;
    case RS2::EntityText: //the e->rtti() type of single line text
        writeText((RS_Text*)e); //function to implement call with the "single line class"
        break;
    case RS2::EntityMText: //the e->rtti()type of multi-line text
        writeMText((RS_MText*)e); //existing function call with the "multi-line class"
        break;
    case RS2::EntityDimLinear:


rs_filerdxfrw.h line #128 say:

    void writeSpline(RS_Spline* s);
    void writeInsert(RS_Insert* i);
//    void writeText(RS_Text* t);
    void writeMText(RS_Text* t);
    void writeHatch(RS_Hatch* h);

change to:

    void writeSpline(RS_Spline* s);
    void writeInsert(RS_Insert* i);
    void writeText(RS_Text* t); //function to implement call with the "single line class"
    void writeMText(RS_MText* t); //existing function call with the "multi-line class"
    void writeHatch(RS_Hatch* h);