Close

Relief for ODA Team in Ukraine

Learn more
ODA PRC SDK
Create Markup Leaders
To create a markup leader:
  1. Create an object of the OdPrcMarkupLeader class:
    
              OdPrcMarkupLeaderPtr leader = OdPrcMarkupLeader::createObject();
            
  2. Set graphical information for the leader:
    
              OdPrcGraphics graph;
              leader->graphics() = graph;          
            
  3. Create a tessellation object for the markup leader and fill the coordinates and codes array with color and a polyline entity (based on two points), and add tessellation to the markup leader:
    
              OdPrcMarkupTessPtr mTess = OdPrcMarkupTess::createObject();
              mTess->setLabel("test");
              OdUInt32Array code_arr;
              mTess->coordinates().push_back(-1.9);
              mTess->coordinates().push_back(-1);
              mTess->coordinates().push_back(0);
              mTess->coordinates().push_back(-3.7);
              mTess->coordinates().push_back(-3.8);
              mTess->coordinates().push_back(0);
    
              code_arr.push_back(90177537); // Color 
              code_arr.push_back(0);
              code_arr.push_back(0);
              code_arr.push_back(0);//PolyLine
              code_arr.push_back(6);
              mTess->codes() = code_arr;
              leader->tessellation() = mTess;
            

    See Create a Markup Tessellation for details about the previous code fragment.

For additional information about working with markup tessellation, see Work with Markup Tessellation.

Creating markup leaders is illustrated in the OdPrcCreate sample application.

See Also

Set Font Parameters for Markups
Create Markups
Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.