Return TypeFunction nameArguments
voidhdsFlowchart::Generate(hzChain&,hzHttpEvent*,unsigned int&,)

Declared in file: hzDissemino.h
Defined in file : hdsGenerate.cpp

Function Logic:

0:START 1:m_nBoundary 2:hzChain::Printf 3:hzChain::Printf n 4:n 5:pG 6:!pG 7:hzChain::AddByte 8:pG->m_eShape 9:HDSGRAPH_HEXAGON 10:hzChain::Printf 11:HDSGRAPH_RECT 12:hzChain::Printf 13:HDSGRAPH_STADIUM 14:hzChain::Printf 15:pG->m_Text 16:pG->m_nLines==1 17:hdsGraphic::lftMidptX hdsGraphic::lftMidptY hzChain::Printf 18:_hds_svg_drawMLText 19:hdsGraphic::lftMidptX hdsGraphic::lftMidptY hzChain::Printf 20:n 21:pConn _drawFlowConn 22:items 23: No text

Function body:

void hdsFlowchart::Generate (hzChain& Z, hzHttpEvent* pE, unsigned int& nLine)
{
   _hzfunc("hdsFlowchart::Generate") ;
   hdsText         TX ;
   hdsGraphic*     pG ;
   hdsConnector*   pConn ;
   hzString        text ;
   uint32_t        n ;
   threadLog("Shapes %d, Connects %d\n", m_nShapes, m_nConnects) ;
   if (m_nBoundary)
       Z.Printf("<svg id="%s" height="%d" width="%d" style="border:1px solid #000000; background:#%06x;">\n"        , *m_Id, m_Height, m_Width, m_BgColor) ;
   else
       Z.Printf("<svg id="%s" height="%d" width="%d" style="background:#%06x;">\n"        , *m_Id, m_Height, m_Width, m_BgColor) ;
   for (n = 0; n < m_nShapes ; n++)
   {
       pG = m_pShapes + n ;
       if (!pG)
           break ;
       Z.AddByte(CHAR_TAB) ;
       switch  (pG->m_eShape)
       {
       case HDSGRAPH_HEXAGON:  Z.Printf("<polygon points="%u,%u %u,%u %u,%u %u,%u, %u,%u, %u,%u" style="fill:#%06x;stroke:#%06x;stroke-width:%u"/>\n"    ,
                                   pG->m_Lft, pG->m_Top + (pG->m_Height/2),
                                   pG->m_Lft + (pG->m_Height/2),pG->m_Top,
                                   pG->m_Rht - (pG->m_Height/2),pG->m_Top,
                                   pG->m_Rht, pG->m_Top + (pG->m_Height/2),
                                   pG->m_Rht - (pG->m_Height/2),pG->m_Bot,
                                   pG->m_Lft + (pG->m_Height/2),pG->m_Bot,
                                   m_ColorTest, m_ColorLine, m_nWidthConn) ;
                               break ;
       case HDSGRAPH_RECT:     Z.Printf("<rect x="%u" y="%u" width="%u" height="%u" style="fill:#%06x;stroke:#%06x;stroke-width:%u;"/>\n"          ,
                                   pG->m_Lft, pG->m_Top, pG->m_Width, pG->m_Height, m_ColorProc, m_ColorLine, m_nWidthConn) ;
                               break ;
       case HDSGRAPH_STADIUM:  Z.Printf("<rect x="%u" y="%u" rx="%u" ry="%u" width="%u" height="%u" style="fill:#%06x;stroke:#%06x;stroke-width:%u;"/>\n"              ,
                                   pG->m_Lft, pG->m_Top, pG->m_Height/2,pG->m_Height/2,pG->m_Width, pG->m_Height, m_ColorTerm, m_ColorLine, m_nWidthConn) ;
                               break ;
       }
       if (pG->m_Text)
       {
           if (pG->m_nLines == 1)
               Z.Printf("\t<text x="%u" y="%u" fill="#%06x">%d:%s</text>\n"      , pG->lftMidptX(), pG->lftMidptY(), pG->m_ColorLine, n, *pG->m_Text) ;
           else
               _hds_svg_drawMLText(Z, pG->m_Text, pG->m_Lft, pG->m_Top+20,pG->m_ColorLine,n) ;
       }
       else
       {
           Z.Printf("\t<text x="%u" y="%u" fill="#%06x">%d: No text</text>\n"      , pG->lftMidptX(), pG->lftMidptY(), pG->m_ColorLine, n) ;
       }
   }
   for (n = 0; n < m_nConnects ; n++)
   {
       pConn = m_pConn + n ;
           _drawFlowConn(Z, this, pConn) ;
   }
   Z << "</svg>\n" ;
}