home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / UIFlow 1.0.1 / UIFlow Source / CFDFront / TPoint.cp < prev    next >
Encoding:
Text File  |  1992-02-21  |  22.8 KB  |  658 lines  |  [TEXT/MPS ]

  1. #pragma segment Boundry
  2. // **********************************************************************
  3. //    TPoint Class 
  4. //        Base class for all point classes.
  5. // **********************************************************************
  6. // **********************************************************************
  7. //    The TPoint class methods.
  8. // **********************************************************************
  9. // --------------------------------------------------------------------------------------------------
  10. //    Initialize the points data.
  11. // --------------------------------------------------------------------------------------------------
  12. void TPoint::IPoint(short p1V, short p1H, short type, float mag)
  13.     {
  14.     fType             = type;                                                                                                // set the wall type
  15.     fIsSelected     = false;
  16.     fHold.v         = fHold.h = 0;
  17.     fObsUpLeft    = fObsUpRight    = fObsLwLeft    = fObsLwRight    = NULL;
  18.     fBaffAbove     = fBaffRight        = fBaffBelow    = fBaffLeft        = NULL;
  19.     fHoldRect.top = fHoldRect.bottom = fHoldRect.right = fHoldRect.left = 0;
  20.     savePoint.v    = savePoint.h = 0;
  21.     fMag                = mag;
  22.     this->SetStart(p1V,p1H);
  23.     return;
  24.     }
  25.  
  26. // --------------------------------------------------------------------------------------------------
  27. //    Return the fStart Point for the segment
  28. // --------------------------------------------------------------------------------------------------
  29. void TPoint::SetStart(short newV, short newH)
  30.     {
  31.     fStart.v = newV;                                                                                            // set the location to a new place
  32.     fStart.h = newH;
  33.  
  34.     fTrans                = transform(fStart,fMag);
  35.     fFillRect.top        = fTrans.v-1;                                                                        // create the point area
  36.     fFillRect.right    = fTrans.h + gPensize_H+1;
  37.     fFillRect.bottom= fTrans.v + gPensize_V+1;
  38.     fFillRect.left        = fTrans.h-1;
  39.  
  40.     fillRect.top        = fFillRect.top - 4;                                                                // create point area                                
  41.     fillRect.right        = fFillRect.right + 4;
  42.     fillRect.bottom    = fFillRect.bottom + 4;
  43.     fillRect.left        = fFillRect.left - 4;
  44.     return;
  45.     }
  46.     
  47. // --------------------------------------------------------------------------------------------------
  48. //    Return the fStart Point for the segment
  49. // --------------------------------------------------------------------------------------------------
  50. void TPoint::SetHold(short y, short x)
  51.     {
  52.     fHold.v = y;
  53.     fHold.h = x;
  54.     
  55.     fHTrans                = transform(fHold,fMag);
  56.     fHoldRect.top        = fHTrans.v-1;                                                                // create the point area
  57.     fHoldRect.right        = fHTrans.h + gPensize_H+1;
  58.     fHoldRect.bottom    = fHTrans.v + gPensize_V+1;
  59.     fHoldRect.left        = fHTrans.h-1;
  60.     return;
  61.     }
  62.     
  63. // --------------------------------------------------------------------------------------------------
  64. //    Return the fStart Point for the segment
  65. // --------------------------------------------------------------------------------------------------
  66. void TPoint::TransformPoint(float mag)
  67.     {
  68.     fMag                        = mag;
  69.     
  70.     fTrans                    = transform(fStart,fMag);
  71.     fHTrans                = transform(fHold,fMag);
  72.     
  73.     fHoldRect.top        = fHTrans.v-1;                                                                // create the point area
  74.     fHoldRect.right        = fHTrans.h + gPensize_H+1;
  75.     fHoldRect.bottom    = fHTrans.v + gPensize_V+1;
  76.     fHoldRect.left        = fHTrans.h-1;
  77.  
  78.     fFillRect.top            = fTrans.v-1;                                                                // create the point area
  79.     fFillRect.right        = fTrans.h + gPensize_H+1;
  80.     fFillRect.bottom    = fTrans.v + gPensize_V+1;
  81.     fFillRect.left            = fTrans.h-1;
  82.  
  83.     fillRect.top            = fFillRect.top - 4;                                                        // create point area                                
  84.     fillRect.right            = fFillRect.right + 4;
  85.     fillRect.bottom        = fFillRect.bottom + 4;
  86.     fillRect.left            = fFillRect.left - 4;
  87.     return;
  88.     }
  89.     
  90. // --------------------------------------------------------------------------------------------------
  91. //    Return the fStart Point for the segment
  92. // --------------------------------------------------------------------------------------------------
  93. void TPoint::FixHold(void)
  94.     {
  95.     if (fHold.v == 0 && fHold.h == 0)
  96.         return;
  97.         
  98.     fStart.v     = fHold.v;
  99.     fStart.h     = fHold.h;
  100.     fTrans.v    = fHTrans.v;
  101.     fTrans.h    = fHTrans.h;
  102.     
  103.     fFillRect.top            = fHoldRect.top;
  104.     fFillRect.right        = fHoldRect.right;
  105.     fFillRect.bottom    = fHoldRect.bottom;
  106.     fFillRect.left            = fHoldRect.left;
  107.  
  108.     fillRect.top            = fFillRect.top - 4;                                                            // create point area                                
  109.     fillRect.right            = fFillRect.right + 4;
  110.     fillRect.bottom        = fFillRect.bottom + 4;
  111.     fillRect.left            = fFillRect.left - 4;
  112.     fHold.v                    = fHold.h = 0;
  113.     }
  114.     
  115. // --------------------------------------------------------------------------------------------------
  116. //    is the mouse on this point?
  117. // --------------------------------------------------------------------------------------------------
  118. Boolean TPoint::OnPoint (Point * tMouse)
  119.     {
  120.     Point tM;
  121.     tM.v = tMouse->v;  tM.h = tMouse->h;                                                            // store mouse in correct form
  122.     HLock((Handle) this);
  123.     if (PtInRect(tM,&fFillRect))                                                                            // is mouse inside rect
  124.         {
  125.         HUnlock((Handle) this);
  126.         return true;                                                                                                // return on point
  127.         }
  128.     HUnlock((Handle) this);
  129.     return false;                                                                                                    // return not on point
  130.     }
  131.     
  132. // --------------------------------------------------------------------------------------------------
  133. //    increment / decrement the obstacle counter
  134. //    each point can be attached to up to 4 cells
  135. // --------------------------------------------------------------------------------------------------
  136. void TPoint::SetObstacle (Boolean obs, short iquad, TObject * tObs)
  137.     {
  138.     TObject * t;
  139.     
  140.     if (obs)
  141.         t = tObs;
  142.     else
  143.         t = NULL;
  144.         
  145.     switch (iquad)
  146.         {
  147.         case 1:
  148.             fObsUpLeft = t;
  149.             return;
  150.         case 2:
  151.             fObsUpRight = t;
  152.             return;
  153.         case 3:
  154.             fObsLwLeft = t;
  155.             return;
  156.         case 4:
  157.             fObsLwRight = t;
  158.             return;
  159.         }
  160.     return;
  161.     }
  162.     
  163. // --------------------------------------------------------------------------------------------------
  164. //    increment / decrement the obstacle counter
  165. //    each point can be attached to up to 4 cells
  166. // --------------------------------------------------------------------------------------------------
  167. TObject * TPoint::GetObsQuad (short iquad)
  168.     {
  169.     switch (iquad)
  170.         {
  171.         case 1:
  172.             return fObsUpLeft;
  173.         case 2:                                                                                                    // upper right quad
  174.             return fObsUpRight;
  175.         case 3:                                                                                                    // lower left quad
  176.             return fObsLwLeft;
  177.         case 4:                                                                                                    // lower right quad
  178.             return fObsLwRight;
  179.         }
  180.     }
  181.     
  182. // --------------------------------------------------------------------------------------------------
  183. //    increment / decrement the obstacle counter
  184. //    each point can be attached to up to 4 cells
  185. // --------------------------------------------------------------------------------------------------
  186. void TPoint::SetBaffle (Boolean baff, short iquad, TObject * tBaff)
  187.     {
  188.     TObject * t;
  189.     
  190.     if (baff)
  191.         t = tBaff;
  192.     else
  193.         t = NULL;
  194.         
  195.     switch (iquad)
  196.         {
  197.         case 1:
  198.             fBaffAbove = t;
  199.             return;
  200.         case 2:
  201.             fBaffRight = t;
  202.             return;
  203.         case 3:
  204.             fBaffBelow = t;
  205.             return;
  206.         case 4:
  207.             fBaffLeft = t;
  208.             return;
  209.         }
  210.     return;
  211.     }
  212.     
  213. // --------------------------------------------------------------------------------------------------
  214. //    increment / decrement the obstacle counter
  215. //    each point can be attached to up to 4 cells
  216. // --------------------------------------------------------------------------------------------------
  217. TObject * TPoint::GetBaffQuad (short iquad)
  218.     {
  219.     switch (iquad)
  220.         {
  221.         case 1:
  222.             return fBaffAbove;
  223.         case 2:                                                                                                    // upper right quad
  224.             return fBaffRight;
  225.         case 3:                                                                                                    // lower left quad
  226.             return fBaffBelow;
  227.         case 4:                                                                                                    // lower right quad
  228.             return fBaffLeft;
  229.         }
  230.     }
  231.     
  232. // --------------------------------------------------------------------------------------------------
  233. //    is this point a cornor?
  234. // --------------------------------------------------------------------------------------------------
  235. Boolean TPoint::IsCornor (void)
  236.     {
  237.     return false;
  238.     }
  239.     
  240. // --------------------------------------------------------------------------------------------------
  241. //    is this point a cornor?
  242. // --------------------------------------------------------------------------------------------------
  243. Boolean TPoint::IsSegment (void)
  244.     {
  245.     return false;
  246.     }
  247.     
  248. // --------------------------------------------------------------------------------------------------
  249. //    is this point a cornor?
  250. // --------------------------------------------------------------------------------------------------
  251. Boolean TPoint::IsBoundryPt (void)
  252.     {
  253.     return true;
  254.     }
  255.     
  256. // --------------------------------------------------------------------------------------------------
  257. //    is this point a cornor?
  258. // --------------------------------------------------------------------------------------------------
  259. Boolean TPoint::IsInterior (void)
  260.     {
  261.     return false;
  262.     }
  263.     
  264. // --------------------------------------------------------------------------------------------------
  265. //    Draws the section connecting to the point ... can be boundry or grid
  266. // --------------------------------------------------------------------------------------------------
  267. void TPoint::DrawHoldLine(short type,Point pt)
  268.     {    
  269.     if (type == Grid)
  270.         this->DrawGrid(pt);
  271.     else
  272.         this->DrawSection(pt);    
  273.     return;
  274.     }
  275.  
  276. // --------------------------------------------------------------------------------------------------
  277. //    Draws the section connecting to the point ... can be boundry or grid
  278. // --------------------------------------------------------------------------------------------------
  279. void TPoint::DrawSection(Point pt)
  280.     {
  281.     PenMode(srcXor);
  282.     HLock((Handle) this);
  283.     RGBForeColor(&DrawColors[fType]);                                                            // forground color.
  284.     HUnlock((Handle) this);
  285.     PenPixPat(SegmentPat[fType]);
  286.  
  287.     PenSize (gPensize_H, gPensize_V);                                                                // set pensize
  288.     MoveTo(pt.h,pt.v);                                                                                        // move to provided point
  289.     LineTo (fTrans.h, fTrans.v);                                                                            // draw to this point
  290.     return;
  291.     }
  292.  
  293. // --------------------------------------------------------------------------------------------------
  294. //    Draws the section connecting to the point ... can be boundry or grid
  295. // --------------------------------------------------------------------------------------------------
  296. void TPoint::DrawTemp(Point pt, Point pt1)
  297.     {
  298.     PenMode(srcXor);
  299.     HLock((Handle) this);
  300.     RGBForeColor(&DrawColors[fType]);                                                            // forground color.
  301.     HUnlock((Handle) this);
  302.     PenPixPat(SegmentPat[fType]);
  303.  
  304.     PenSize (gPensize_H, gPensize_V);                                                                // set pensize
  305.     MoveTo(pt.h,pt.v);                                                                                        // move to provided point
  306.     LineTo (pt1.h, pt1.v);                                                                                    // draw to this point
  307.     return;
  308.     }
  309.  
  310. // --------------------------------------------------------------------------------------------------
  311. //    Draws the section connecting to the point ... can be boundry or grid
  312. // --------------------------------------------------------------------------------------------------
  313. void TPoint::DrawGrid(Point pt)
  314.     {
  315.     PenMode(srcXor);
  316.     HLock((Handle) this);
  317.     RGBForeColor(&GridLineColor);                                                                    // set color
  318.     HUnlock((Handle) this);
  319.     PenPixPat(GridLinePat);
  320.  
  321.     PenSize (gGridsize_H, gGridsize_V);                                                                // set pensize
  322.     MoveTo(pt.h,pt.v);                                                                                        // move to provided point
  323.     LineTo (fTrans.h, fTrans.v);                                                                            // draw to this point
  324.     return;
  325.     }
  326.  
  327. // --------------------------------------------------------------------------------------------------
  328. //    Draw the Segment.
  329. // --------------------------------------------------------------------------------------------------
  330. void TPoint::HighlightSection (Point pt)
  331.     {
  332.     HLock((Handle) this);
  333.     RGBForeColor(&BlackColor);                                                                            // set frame color
  334.     HUnlock((Handle) this);
  335.     PenPixPat(PointFramePat);
  336.     PenMode(srcXor);
  337.     PenSize (1, 1);                                                                                                // set pensize
  338.     if (fTrans.h == pt.h)
  339.         {
  340.         MoveTo(pt.h-4,pt.v+gPensize_V+4);                                                            // move to provided point
  341.         LineTo (fTrans.h-4, fTrans.v-4);                                                                // draw to this point
  342.         MoveTo (pt.h+gPensize_H+4,pt.v+gPensize_V+4);
  343.         LineTo (fTrans.h+gPensize_H+4,fTrans.v-4);
  344.         }
  345.     else if (fTrans.v == pt.v)
  346.         {
  347.         MoveTo(pt.h+gPensize_H+4,pt.v-4);                                                            // move to provided point
  348.         LineTo (fTrans.h-4, fTrans.v-4);                                                                // draw to this point
  349.         MoveTo (pt.h+gPensize_H+4,pt.v+gPensize_V+4);
  350.         LineTo (fTrans.h+gPensize_H,fTrans.v+gPensize_V+4);
  351.         }
  352.     else
  353.         {
  354.         if ((pt.h < fTrans.h && pt.v < fTrans.v) || (pt.h > fTrans.h && pt.v > fTrans.v))
  355.             {
  356.             MoveTo (pt.h+gPensize_H+4,pt.v-4);
  357.             LineTo (fTrans.h+gPensize_H+4,fTrans.v-4);
  358.             MoveTo (pt.h-4,pt.v+gPensize_V+4);
  359.             LineTo (fTrans.h-4,fTrans.v+gPensize_V+4);
  360.             }
  361.         else
  362.             {
  363.             MoveTo(pt.h-4,pt.v-4);                                                                        // move to provided point
  364.             LineTo (fTrans.h-4, fTrans.v-4);                                                            // draw to this point
  365.             MoveTo(pt.h+gPensize_H+4,pt.v+gPensize_V+4);                                    // move to provided point
  366.             LineTo (fTrans.h+gPensize_H+4, fTrans.v+gPensize_V+4);                    // draw to this point
  367.             }
  368.         }
  369.     return;
  370.     }
  371.  
  372. // --------------------------------------------------------------------------------------------------
  373. //    Draw Method is Null : MUST be OVERRIDEN
  374. // --------------------------------------------------------------------------------------------------
  375. void TPoint::Draw(void)
  376.     {}
  377.  
  378. // --------------------------------------------------------------------------------------------------
  379. //    Draw Method is Null : MUST be OVERRIDEN
  380. // --------------------------------------------------------------------------------------------------
  381. void TPoint::DrawHold(void)
  382.     {}
  383.  
  384. // --------------------------------------------------------------------------------------------------
  385. //    Highlight Method is Null : MUST be OVERRIDEN
  386. // --------------------------------------------------------------------------------------------------
  387. void TPoint::Highlight(void)
  388.     {}
  389.     
  390. // **********************************************************************
  391. //    TGPoint Class 
  392. //        Grid Point Class  :  Inherits everything from TPoint except Drawing functions
  393. // **********************************************************************
  394. // **********************************************************************
  395. //    The TGPoint class methods.
  396. // **********************************************************************
  397. // --------------------------------------------------------------------------------------------------
  398. //    Highlight this point
  399. // --------------------------------------------------------------------------------------------------
  400. void TGPoint::Highlight (void)
  401.     {
  402.     PenMode(srcXor);                                                                                    // draw xor
  403.     PenSize (2, 2);                                                                                        // set frame width
  404.  
  405.     HLock((Handle) this);
  406.     RGBForeColor(&BlackColor);                                                                    // set color
  407.     PenPixPat(PointFramePat);
  408.     FrameOval(&fillRect);                                                                            // draw frame
  409.     HUnlock((Handle) this);
  410.     return;
  411.     }
  412.  
  413. // -----------------------------------------------------------------------------------------
  414. //    Draw the GridPoint
  415. // -----------------------------------------------------------------------------------------
  416. void TGPoint::Draw (void)
  417.     {
  418.     PenMode(srcXor);                                                                                    // draw xor
  419.     PenSize(1,1);
  420.  
  421.     HLock((Handle) this);
  422.     RGBForeColor(&GridPoint);                                                                    // set point color
  423.     PenPixPat(GridPointPat);
  424.     PaintOval(&fFillRect);                                                                            // draw point
  425.     HUnlock((Handle) this);
  426.     return;    
  427.     }
  428.  
  429. // -----------------------------------------------------------------------------------------
  430. //    Draw the GridPoint
  431. // -----------------------------------------------------------------------------------------
  432. void TGPoint::Drawd (void)
  433.     {
  434.     PenMode(srcXor);                                                                                    // draw xor
  435.     PenSize(1,1);
  436.  
  437.     HLock((Handle) this);
  438.     RGBForeColor(&ObstacleColor);                                                            // set point color
  439.     PenPixPat(ObstaclePat);
  440.     PaintOval(&fFillRect);                                                                            // draw point        
  441.     HUnlock((Handle) this);
  442.     return;    
  443.     }
  444.  
  445. // -----------------------------------------------------------------------------------------
  446. //    Draw the GridPoint
  447. // -----------------------------------------------------------------------------------------
  448. void TGPoint::DrawHold (void)
  449.     {
  450.     if (fHold.v == 0 && fHold.h == 0)
  451.         return;
  452.  
  453.     PenMode(srcXor);                                                                                    // draw xor
  454.     PenSize(1,1);
  455.  
  456.     HLock((Handle) this);
  457.     RGBForeColor(&GridPoint);                                                                    // set point color
  458.     PenPixPat(GridPointPat);
  459.     PaintOval(&fHoldRect);                                                                            // draw point    
  460.     HUnlock((Handle) this);
  461.     return;    
  462.     }
  463.  
  464. // **********************************************************************
  465. //    TCornorPoint Class 
  466. //        Cornor Point Class  :  Inherits everything from TPoint except Drawing functions
  467. // **********************************************************************
  468. // **********************************************************************
  469. //    The TCornorPoint class methods.
  470. // **********************************************************************
  471. // --------------------------------------------------------------------------------------------------
  472. //    Initialize the points data.
  473. // --------------------------------------------------------------------------------------------------
  474. void TCornorPoint::IPoint(short p1V, short p1H, short type,Boolean seg,float mag)
  475.     {
  476.     fSeg = seg;
  477.     inherited::IPoint(p1V,p1H,type,mag);
  478.     return;
  479.     }
  480.     
  481. // --------------------------------------------------------------------------------------------------
  482. //    Highlight this point
  483. // --------------------------------------------------------------------------------------------------
  484. void TCornorPoint::Highlight (void)
  485.     {
  486.     PenMode(srcXor);                                                                                            // draw xor
  487.     PenSize (2, 2);                                                                                                // set frame width
  488.  
  489.     HLock((Handle) this);
  490.     RGBForeColor(&BlackColor);                                                                            // set frame color
  491.     PenPixPat(PointFramePat);
  492.     FrameRect(&fillRect);                                                                                    // draw frame
  493.     HUnlock((Handle) this);
  494.     return;
  495.     }
  496.  
  497. // --------------------------------------------------------------------------------------------------
  498. //    Draw the Point indicator.
  499. // --------------------------------------------------------------------------------------------------
  500. void TCornorPoint::Draw (void)
  501.     {
  502.     PenMode(srcXor);                                                                                            // draw xor
  503.     PenSize(1,1);
  504.  
  505.     HLock((Handle) this);
  506.     RGBForeColor(&StartPoint);
  507.     PenPixPat(StartPointPat);
  508.     PaintRect(&fFillRect);                                                                                    // paint the point
  509.     HUnlock((Handle) this);
  510.     return;    
  511.     }
  512.     
  513. // --------------------------------------------------------------------------------------------------
  514. //    is this point a cornor?
  515. // --------------------------------------------------------------------------------------------------
  516. Boolean TCornorPoint::IsCornor (void)
  517.     {
  518.     return true;
  519.     }
  520.     
  521. // --------------------------------------------------------------------------------------------------
  522. //    is this point a cornor?
  523. // --------------------------------------------------------------------------------------------------
  524. Boolean TCornorPoint::IsSegment (void)
  525.     {
  526.     return fSeg;
  527.     }
  528.     
  529. // **********************************************************************
  530. //    TSegPoint Class 
  531. //        Based on TPoint
  532. //        In addition contains the data for the segment
  533. // **********************************************************************
  534. // **********************************************************************
  535. //    The TSegPoint class methods.
  536. // **********************************************************************
  537. // --------------------------------------------------------------------------------------------------
  538. //    Initialize the points data.
  539. // --------------------------------------------------------------------------------------------------
  540. void TSegPoint::IPoint(short p1V, short p1H, short type,float mag)
  541.     {
  542.     inherited::IPoint(p1V, p1H,type,mag);
  543.     
  544.     fInitData.u             = 0.0;
  545.     fInitData.v             = 0.0;
  546.     fInitData.w             = 0.0;
  547.     fInitData.kenergy     = 0.0;
  548.     fInitData.dissip     = 0.0;
  549.     fInitData.density     = 0.0;
  550.     fInitData.mixfrac     = 0.0;
  551.     fInitData.concfrac    = 0.0;
  552.     fInitData.fuelfrac     = 0.0;
  553.     fInitData.temp         = 0.0;
  554.     fInitData.visc        = 0.0;
  555.     return;
  556.     }
  557.  
  558.  
  559. // --------------------------------------------------------------------------------------------------
  560. //    get the segments type.
  561. // --------------------------------------------------------------------------------------------------
  562. void TSegPoint::SetData (WallRecord newData)
  563.     {
  564.     fInitData.u             =     newData.u;
  565.     fInitData.v            =    newData.v;
  566.     fInitData.w            =    newData.w;
  567.     fInitData.kenergy    =    newData.kenergy;
  568.     fInitData.dissip        =    newData.dissip;
  569.     fInitData.density    =    newData.density;
  570.     fInitData.mixfrac    =    newData.mixfrac;
  571.     fInitData.concfrac    =    newData.concfrac;
  572.     fInitData.fuelfrac    =     newData.fuelfrac;
  573.     fInitData.temp        =    newData.temp;
  574.     fInitData.visc        =    newData.visc;
  575.     return;
  576.     }
  577.  
  578. // --------------------------------------------------------------------------------------------------
  579. //    Draw the Point indicator.
  580. // --------------------------------------------------------------------------------------------------
  581. void TSegPoint::Draw (void)
  582.     {
  583.     PenMode(srcXor);                                                                                            // draw xor
  584.     PenSize(1,1);
  585.  
  586.     HLock((Handle) this);
  587.     RGBForeColor(&SegmentPoint);
  588.     PenPixPat(SegmentPointPat);
  589.     PaintRect(&fFillRect);
  590.     HUnlock((Handle) this);
  591.     return;    
  592.     }
  593.  
  594. // -----------------------------------------------------------------------------------------
  595. //    Draw the GridPoint
  596. // -----------------------------------------------------------------------------------------
  597. void TSegPoint::DrawHold (void)
  598.     {
  599.     if (fHold.v == 0 && fHold.h == 0)
  600.         return;
  601.  
  602.     PenMode(srcXor);                                                                                    // draw xor
  603.     PenSize(1,1);
  604.  
  605.     HLock((Handle) this);
  606.     RGBForeColor(&SegmentPoint);                                                            // set point color
  607.     PenPixPat(SegmentPointPat);
  608.     PaintRect(&fHoldRect);                                                                            // draw point        
  609.     HUnlock((Handle) this);
  610.     return;    
  611.     }
  612.  
  613. // --------------------------------------------------------------------------------------------------
  614. //    Highlight this point
  615. // --------------------------------------------------------------------------------------------------
  616. void TSegPoint::Highlight (void)
  617.     {
  618.     PenMode(srcXor);                                                                                            // draw xor
  619.     PenSize (2, 2);                                                                                                // set frame width
  620.  
  621.     HLock((Handle) this);
  622.     RGBForeColor(&BlackColor);                                                                            // set frame color
  623.     PenPixPat(PointFramePat);
  624.     FrameRect(&fillRect);                                                                                    // draw frame
  625.     HUnlock((Handle) this);
  626.     return;
  627.     }
  628.  
  629. // --------------------------------------------------------------------------------------------------
  630. //    is this point a cornor?
  631. // --------------------------------------------------------------------------------------------------
  632. Boolean TSegPoint::IsSegment (void)
  633.     {
  634.     return true;
  635.     }
  636.  
  637. // **********************************************************************
  638. //    TInteriorPoint Class 
  639. //        Based on TSegPoint
  640. //        In addition contains the data for the interior of the geometry
  641. // **********************************************************************
  642. // **********************************************************************
  643. //    The TInteriorPoint class methods.
  644. // **********************************************************************
  645. // --------------------------------------------------------------------------------------------------
  646. //    Draw Method is Null : MUST be OVERRIDEN
  647. // --------------------------------------------------------------------------------------------------
  648. void TInteriorPoint::Draw(void)
  649.     {}
  650.  
  651. // --------------------------------------------------------------------------------------------------
  652. //    Highlight Method is Null : MUST be OVERRIDEN
  653. // --------------------------------------------------------------------------------------------------
  654. void TInteriorPoint::Highlight(void)
  655.     {}
  656.     
  657.     
  658.