[Gdal-dev] Quick Question Regarding Style String Management

L Pool marisap at telkomsa.net
Sat May 15 13:27:29 EDT 2004


Ok. Here's another one -

Is there a function in the Style Library that can parse the Pattern String
of a Pen Tool - or should I parse it myself? I know I'm being a bit lazy - I
can easily use the "px" chars as token delimiters - but I would like to know
whether there are functions (ones that I might be missing) to parse the
Parameters one gets from the Style Tools.

Thanks,
Louis.


-----Original Message-----
From: gdal-dev-admin at remotesensing.org
[mailto:gdal-dev-admin at remotesensing.org]On Behalf Of L Pool
Sent: 15 May 2004 06:52
To: gdal-dev at remotesensing.org
Subject: [Gdal-dev] Quick Question Regarding Style String Management


Hi Frank,

I've got a quick question for you - regarding the code below: which of these
objects should I delete when I'm finished with it - the Style Manager and
the Style Tool or just the Style Manager?

      OGRStyleTable oStyleTable;
      OGRStyleTool* poStyleTool;
      OGRStyleMgr*  poStyleMgr = new OGRStyleMgr(&oStyleTable);

      poStyleMgr->GetStyleString(poFeature);
      for (int k=0; k < poStyleMgr->GetPartCount(); k++)
      {
         poStyleTool = poStyleMgr->GetPart(k);
         switch(poStyleTool->GetType())
         {
           case OGRSTCNone: cout << "Tool Type: None" << endl;
            break;
           case OGRSTCPen: cout << "Tool Type: Pen" << endl;
            break;
           case OGRSTCBrush: cout << "Tool Type: Brush" << endl;
            break;
           case OGRSTCSymbol: cout << "Tool Type: Symbol" << endl;
            break;
           case OGRSTCLabel: cout << "Tool Type: Label" << endl;
            break;
         }
      }

Thanks in advance,

Louis Pool.

BTW: Everything seems to be working super now with the new OpenEV_FW
binaries.

_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list