cyclometric circle

Re: cyclometric circle

Postby Silvio.Falconi » Tue Jul 12, 2022 3:53 pm

I corrected the numbers but Now are too on line of circle
How to move them slightly out?

Image



Code: Select all  Expand view
#include "FiveWin.ch"
#include "constant.ch"

#define COLOR_BTNFACE 15
#define PS_SOLID   0

Function Test()
  local oCicloMetric
  local oDlg,oFont,oBold
  local oBtnPos,oBtnClose
  local nBottom   := 33
  local nRight    := 80
 * local nWidth    := Max( nRight * DLG_CHARPIX_W, 180 )
 * local nHeight   := nBottom * DLG_CHARPIX_H

  local nWidth    := 800 // Max( nRight * DLG_CHARPIX_W, 180 )
  local nHeight   := 600 //  nBottom * DLG_CHARPIX_H






   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-10
   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-12  BOLD

   DEFINE DIALOG oDlg SIZE  nWidth, nHeight  ;
      PIXEL TRUEPIXEL  FONT oFont   ;  //RESIZABLE
      TiTle "Manage Ciclometric"


     *oCicloMetric:= TCyclometric():New(10,10,430,430, oDlg,410)
      oCicloMetric:= TCyclometric():New(20,20,450,450, oDlg,410)


   @ 100,10 BUTTON oBtnClose PROMPT "Close" of oDlg  SIZE 80,22 ACTION oDlg:End()
   @ 100,10 BUTTON oBtnPos PROMPT "Test position" of oDlg  SIZE 80,22 ;
 ACTION  oCicloMetric:Distance_Multiple(11,40,45,54,68)

 /*  (oCicloMetric:Distance(11,40),;
           oCicloMetric:Distance(40,45),;
           oCicloMetric:Distance(45,54),;
           oCicloMetric:Distance(54,68),;
           oCicloMetric:Distance(68,11)) */


     oDlg:bResized := <||
     local oRect := oDlg:GetCliRect()
        oBtnClose:nLeft    := oRect:nRight - 100
        oBtnClose:nTop     := oRect:nBottom - 45
        oBtnPos:nLeft      := oRect:nLeft +10
        oBtnPos:nTop       := oRect:nBottom - 45
                 RETURN NIL
                       >



   ACTIVATE DIALOG oDlg CENTERED ;
   ON INIT ( Eval(oDlg:bResized))

   RELEASE FONT oFont, oBold
   Return nil















//-----------------------------------------------------------//
/*
Copyright (c) 2022 <Falconi Silvio>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/


CLASS TCyclometric FROM TControl

   CLASSDATA lRegistered AS LOGICAL
   DATA nDiametro
   DATA oFont,oBold
   DATA apos  AS ARRAY

   METHOD New( nTop, nLeft, nWidth, nHeight, oWnd,nDiametro) CONSTRUCTOR
   METHOD Init( hDlg )
   METHOD End() INLINE if( ::hWnd == 0, ::Destroy(), Super:End() )
   METHOD Destroy()
   METHOD Display()
   METHOD Paint()
   METHOD Line( nTop, nLeft, nBottom, nRight, oPen )
   METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,;
            lTransparent, nAlign )
   METHOD Distance(num1,num2)
   METHOD Distance_Multiple(num1,num2,num3,num4,num5)
ENDCLASS



METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, nDiametro, lDesign) CLASS  TCyclometric

DEFAULT  nDiametro   := 200             ,;
         nHeight     := 200             ,;
         nLeft       := 10              ,;
         nTop        := 10              ,;
         nWidth      := 200             ,;
         lDesign  := .f.,;
         oWnd        := GetWndDefault()

 ::nId         := ::GetNewId()
 ::nTop        := nTop
 ::nLeft       := nLeft
 ::nBottom     := nTop + nHeight - 1
 ::nRight      := nLeft + nWidth - 1

 ::oWnd        := oWnd
 ::lDrag       = lDesign
 ::oBrush := TBrush():New(,GetSysColor(COLOR_BTNFACE) )
 ::apos := {}

 ::nDiametro   =  nDiametro

   ::oFont     = TFont():New( "Verdana", 0, -10 )
   ::oBold     = TFont():New( "Verdana", 0, -10, , .t. )

 ::nStyle   := nOr( WS_CHILD, WS_VISIBLE, WS_TABSTOP, WS_CLIPSIBLINGS )
 ::Register( nOr( CS_VREDRAW, CS_HREDRAW ) )


   if ! Empty( oWnd:hWnd )
       ::Create()
       ::Default()
      ::lVisible = .t.
      oWnd:AddControl( Self )
   else
      oWnd:DefControl( Self )
      ::lVisible = .f.
   endif

   if lDesign
      ::CheckDots()
   endif
   Return self
//--------------------------------------------------------------------------------------------------------//
METHOD Init( hDlg ) CLASS  TCyclometric

   Super:Init( hDlg )

   return nil
//--------------------------------------------------------------------------------------------------------//
METHOD Destroy() CLASS  TCyclometric
   if ::hWnd != 0
      ::Super:Destroy()
   endif
return nil
//--------------------------------------------------------//
METHOD Display() CLASS  TCyclometric
   ::BeginPaint()
   ::Paint()
   ::EndPaint()
return 0
//--------------------------------------------------------//
#define TA_CENTER         6

 METHOD Paint() CLASS  TCyclometric
   local nI
   local  nRaggio := (::nDiametro/2)
   local  xCent   := ::nLeft+nRaggio
   local  yCent   := ::nTop+nRaggio
   local  aTcPen := array(4)
   local  nTotalNumbers := 90
   local step_fi := PI() / 4.5 / 10  // add by Jimmy
   local hDc:=::getDc(), nDeltaR


    aTcPen[1] := CREATEPEN( PS_SOLID, 1, nRGB( 128,0,0 ) )
    aTcPen[2] := CREATEPEN( PS_SOLID, 2, CLR_BLUE )

     //draw the circle
    Ellipse(hDC,::nLeft,::nTop,::nLeft+::nDiametro,::nTop+ ::nDiametro,aTcPen[1])


   //draw the numbers
   nYOffset = ::oFont:nHeight / 2
   nXOffset = ::oFont:nWidth / 2
   nDeltaR := ::oFont:nHeight

   FOR nI = 1 TO nTotalNumbers
      nAngolo := 2* Pgreco() / nTotalNumbers * ( nI - 1 )
      nY := INT( nRaggio * SIN(( ni-22.5) * step_fi ) + yCent)
      nX := INT( nRaggio * COS(( ni-22.5) * step_fi ) + xCent)

      // small  circles
      Ellipse(hDC, nX,nY ,nX-3,nY+3,aTcPen[2])


      aadd( ::apos , {nI,nY,nX} )


      //if nI==90
        //Ellipse(hDC, nX,nY ,nX-3,nY+3,aTcPen[2])
        ::Say( nY - nYOffset, nX - 0, hb_ntoc( nI,0 ), , , ::oFont, .t.,.t., TA_CENTER )
      //endif
    //Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel, lTransparent, nAlign )
NEXT




  ::ReleaseDC()

   return nil

//--------------------------------------------------------------//
STAT FUNC Pgreco(); RETURN (3.1415926536)
//--------------------------------------------------------------//

METHOD Line( nTop, nLeft, nBottom, nRight, nColor ) CLASS  TCyclometric

 *  local hPen := if( oPen = nil, 0, oPen:hPen )
 local  oPen := CREATEPEN( PS_SOLID, 1, nColor )
 local   hOldPen
 ::GetDC()
   hOldPen := SelectObject( ::hDC, oPen )
   MoveTo( ::hDC, nLeft, nTop )
   LineTo( ::hDC, nRight, nBottom, oPen )
  SelectObject( ::hDC, hOldPen )
   ::ReleaseDC()

return nil
//--------------------------------------------------------------//
METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,;
            lTransparent, nAlign ) CLASS  TCyclometric

   DEFAULT nClrFore := ::nClrText,;
           nClrBack := ::nClrPane,;
           oFont    := ::oFont,;
           lPixel   := .f.,;
           lTransparent := .f.

   if ValType( nClrFore ) == "C"      //  xBase Color string
      nClrBack = nClrFore
      nClrFore = nGetForeRGB( nClrFore )
      nClrBack = nGetBackRGB( nClrBack )
   endif

   ::GetDC()

   DEFAULT nAlign := GetTextAlign( ::hDC )

   WSay( ::hWnd, ::hDC, nRow, nCol, cValToChar( cText ), nClrFore, nClrBack,;
         If( oFont != nil, oFont:hFont, 0 ), lPixel, lTransparent, nAlign )

   ::ReleaseDC()

return nil
//--------------------------------------------------------------//

METHOD Distance(num1,num2)  CLASS  TCyclometric
   local  aNumpos := ::apos
   local nAt1,nAt2
   local oPen,hOldPen
   local aRect:= {}
   local nDistanza,nYOffset,nXOffset, nY,nX

  // xbrowser aNumpos

   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )

   aRect:= {aNumpos[nAt1][2],aNumpos[nAt1][3],aNumpos[nAt2][2],aNumpos[nAt2][3]}

   ::line( aRect[1],aRect[2],aRect[3],aRect[4], CLR_RED)


   // draw the distance number
         IF num2>num1
             nDistanza:= num2-num1
          else
             nDistanza:= num1-num2
          Endif
          If nDistanza > 45
            nDistanza:= 90-nDistanza
         Endif

       nYOffset = ::oFont:nHeight / 2
       nXOffset = ::oFont:nWidth / 2

       nY  := aRect[2]
       nX  := aRect[4]

  ::Say( nY - nYOffset, nX - nXOffset, LTRIM( STRzero( nDistanza,2 ) ), , , ::oFont, .t.,;
            .t., nil )

   return nil

 //--------------------------------------------------------------//


 METHOD Distance_Multiple(num1,num2,num3,num4,num5)  CLASS  TCyclometric
   local  aNumpos := ::apos
   local nAt1,nAt2,nAt3,nAt4,nAt5
   local oPen,hOldPen
   local aRect:= {}
   local nDistanza,nYOffset,nXOffset, nY,nX

   local aPoints   := array(5)

  // xbrowser aNumpos
   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )
   nAt3:= AScan( aNumpos, { | a | a[1] = num3 } )
   nAt4:= AScan( aNumpos, { | a | a[1] = num4 } )
   nAt5:= AScan( aNumpos, { | a | a[1] = num5 } )


     aPoints [5]  := {aNumpos[nAt5][2], aNumpos[nAt5][3]}
     aPoints [4]  := {aNumpos[nAt4][2], aNumpos[nAt4][3]}
     aPoints [3]  := {aNumpos[nAt3][2], aNumpos[nAt3][3]}
     aPoints [2]  := {aNumpos[nAt2][2], aNumpos[nAt2][3]}
     aPoints [1]  := {aNumpos[nAt1][2], aNumpos[nAt1][3]}

       //PolyPolygon( ::oWnd:GetDC(),aPoints)
/*
     aPoints [5]  := {aNumpos[nAt5][3], aNumpos[nAt5][2]}
     aPoints [4]  := {aNumpos[nAt4][3], aNumpos[nAt4][2]}
     aPoints [3]  := {aNumpos[nAt3][3], aNumpos[nAt3][2]}
     aPoints [2]  := {aNumpos[nAt2][3], aNumpos[nAt2][2]}
     aPoints [1]  := {aNumpos[nAt1][3], aNumpos[nAt1][2]}

       PolyPolygon( ::oWnd:GetDC(),aPoints)*/

     ::line( aPoints [1][1],aPoints [1][2],aPoints [2][1],aPoints [2][2], CLR_RED)
     ::line( aPoints [2][1],aPoints [2][2],aPoints [3][1],aPoints [3][2], CLR_RED)
     ::line( aPoints [3][1],aPoints [3][2],aPoints [4][1],aPoints [4][2], CLR_RED)
     ::line( aPoints [4][1],aPoints [4][2],aPoints [5][1],aPoints [5][2], CLR_RED)
     ::line( aPoints [5][1],aPoints [5][2],aPoints [1][1],aPoints [1][2], CLR_RED)

     ::ReleaseDC()
      return ni
Last edited by Silvio.Falconi on Fri Jul 29, 2022 4:08 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: cyclometric circle

Postby Silvio.Falconi » Tue Jul 12, 2022 4:36 pm

last release

Image

Code: Select all  Expand view
#include "FiveWin.ch"
#include "constant.ch"

#define COLOR_BTNFACE 15
#define PS_SOLID   0



#define darkgray    nRgb(169,169,169)
#define darkorange  nRgb(255,140,0)
#define darkred     nRgb(139,0,0)
#define lightblue    nRgb(173,216,230)


Function Test()
  local oCicloMetric
  local oDlg,oFont,oBold
  local oBtnPos,oBtnClose
  local nBottom   := 33
  local nRight    := 80
 * local nWidth    := Max( nRight * DLG_CHARPIX_W, 180 )
 * local nHeight   := nBottom * DLG_CHARPIX_H

  local nWidth    := 800 // Max( nRight * DLG_CHARPIX_W, 180 )
  local nHeight   := 600 //  nBottom * DLG_CHARPIX_H






   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-10
   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-12  BOLD

   DEFINE DIALOG oDlg SIZE  nWidth, nHeight  ;
      PIXEL TRUEPIXEL  FONT oFont   ;  //RESIZABLE
      TiTle "Manage Ciclometric"


     *oCicloMetric:= TCyclometric():New(10,10,430,430, oDlg,410)
      oCicloMetric:= TCyclometric():New(20,20,450,450, oDlg,410)


   @ 100,10 BUTTON oBtnClose PROMPT "Close" of oDlg  SIZE 80,22 ACTION oDlg:End()
   @ 100,10 BUTTON oBtnPos PROMPT "Test position" of oDlg  SIZE 80,22 ;
 ACTION  oCicloMetric:Distance_Multiple(11,40,45,54,68)

 /*  (oCicloMetric:Distance(11,40),;
           oCicloMetric:Distance(40,45),;
           oCicloMetric:Distance(45,54),;
           oCicloMetric:Distance(54,68),;
           oCicloMetric:Distance(68,11)) */


     oDlg:bResized := <||
     local oRect := oDlg:GetCliRect()
        oBtnClose:nLeft    := oRect:nRight - 100
        oBtnClose:nTop     := oRect:nBottom - 45
        oBtnPos:nLeft      := oRect:nLeft +10
        oBtnPos:nTop       := oRect:nBottom - 45
                 RETURN NIL
                       >



   ACTIVATE DIALOG oDlg CENTERED ;
   ON INIT ( Eval(oDlg:bResized))

   RELEASE FONT oFont, oBold
   Return nil















//-----------------------------------------------------------//
/*
Copyright (c) 2022 <Falconi Silvio>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/


CLASS TCyclometric FROM TControl

   CLASSDATA lRegistered AS LOGICAL
   DATA nDiametro
   DATA oFont,oBold
   DATA apos  AS ARRAY

   METHOD New( nTop, nLeft, nWidth, nHeight, oWnd,nDiametro) CONSTRUCTOR
   METHOD Init( hDlg )
   METHOD End() INLINE if( ::hWnd == 0, ::Destroy(), Super:End() )
   METHOD Destroy()
   METHOD Display()
   METHOD Paint()
   METHOD Line( nTop, nLeft, nBottom, nRight, oPen )
   METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,;
            lTransparent, nAlign )
   METHOD Distance(num1,num2)
   METHOD Distance_Multiple(num1,num2,num3,num4,num5)
ENDCLASS



METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, nDiametro, lDesign) CLASS  TCyclometric

DEFAULT  nDiametro   := 200             ,;
         nHeight     := 200             ,;
         nLeft       := 10              ,;
         nTop        := 10              ,;
         nWidth      := 200             ,;
         lDesign  := .f.,;
         oWnd        := GetWndDefault()

 ::nId         := ::GetNewId()
 ::nTop        := nTop
 ::nLeft       := nLeft
 ::nBottom     := nTop + nHeight - 1
 ::nRight      := nLeft + nWidth - 1

 ::oWnd        := oWnd
 ::lDrag       = lDesign
 ::oBrush := TBrush():New(,GetSysColor(COLOR_BTNFACE) )
 ::apos := {}

 ::nDiametro   =  nDiametro

   ::oFont     = TFont():New( "Verdana", 0, -10 )
   ::oBold     = TFont():New( "Verdana", 0, -10, , .t. )

 ::nStyle   := nOr( WS_CHILD, WS_VISIBLE, WS_TABSTOP, WS_CLIPSIBLINGS )
 ::Register( nOr( CS_VREDRAW, CS_HREDRAW ) )


   if ! Empty( oWnd:hWnd )
       ::Create()
       ::Default()
      ::lVisible = .t.
      oWnd:AddControl( Self )
   else
      oWnd:DefControl( Self )
      ::lVisible = .f.
   endif

   if lDesign
      ::CheckDots()
   endif
   Return self
//--------------------------------------------------------------------------------------------------------//
METHOD Init( hDlg ) CLASS  TCyclometric

   Super:Init( hDlg )

   return nil
//--------------------------------------------------------------------------------------------------------//
METHOD Destroy() CLASS  TCyclometric
   if ::hWnd != 0
      ::Super:Destroy()
   endif
return nil
//--------------------------------------------------------//
METHOD Display() CLASS  TCyclometric
   ::BeginPaint()
   ::Paint()
   ::EndPaint()
return 0
//--------------------------------------------------------//
#define TA_CENTER         6

 METHOD Paint() CLASS  TCyclometric
   local nI
   local  nRaggio := (::nDiametro/2)
   local  xCent   := ::nLeft+nRaggio
   local  yCent   := ::nTop+nRaggio
   local  aTcPen := array(4)
   local  nTotalNumbers := 90
   local step_fi := PI() / 4.5 / 10  // add by Jimmy
   local hDc:=::getDc(), nDeltaR


    aTcPen[1] := CREATEPEN( PS_SOLID, 3, darkgray )
    aTcPen[2] := CREATEPEN( PS_SOLID, 3, darkred )

     //draw the circle
    Ellipse(hDC,::nLeft,::nTop,::nLeft+::nDiametro,::nTop+ ::nDiametro,aTcPen[1])


   //draw the numbers
   nYOffset = ::oFont:nHeight / 2
   nXOffset = ::oFont:nWidth / 2
   nDeltaR := ::oFont:nHeight

   FOR nI = 1 TO nTotalNumbers
      nAngolo := 2* Pgreco() / nTotalNumbers * ( nI - 1 )
      nY := INT( nRaggio * SIN(( ni-22.5) * step_fi ) + yCent)
      nX := INT( nRaggio * COS(( ni-22.5) * step_fi ) + xCent)

      // small  circles
      Ellipse(hDC, nX,nY ,nX-3,nY+3,aTcPen[2])

     // Save the positions of numbers
      aadd( ::apos , {nI,nY,nX} )




        ::Say( nY - nYOffset, nX - 0, hb_ntoc( nI,0 ),CLR_CYAN , , ::oFont, .t.,.t., TA_CENTER )


    //Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel, lTransparent, nAlign )
NEXT




  ::ReleaseDC()

   return nil

//--------------------------------------------------------------//
STAT FUNC Pgreco(); RETURN (3.1415926536)
//--------------------------------------------------------------//

METHOD Line( nTop, nLeft, nBottom, nRight, nColor,nspessore ) CLASS  TCyclometric

 *  local hPen := if( oPen = nil, 0, oPen:hPen )

 local  oPen := CreatePen(PS_SOLID, nspessore, nColor  )

 local   hOldPen
 ::GetDC()
   hOldPen := SelectObject( ::hDC, oPen )
   MoveTo( ::hDC, nLeft, nTop )
   LineTo( ::hDC, nRight, nBottom, oPen )
  SelectObject( ::hDC, hOldPen )
   ::ReleaseDC()

return nil
//--------------------------------------------------------------//
METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,;
            lTransparent, nAlign ) CLASS  TCyclometric

   DEFAULT nClrFore := ::nClrText,;
           nClrBack := ::nClrPane,;
           oFont    := ::oFont,;
           lPixel   := .f.,;
           lTransparent := .f.

   if ValType( nClrFore ) == "C"      //  xBase Color string
      nClrBack = nClrFore
      nClrFore = nGetForeRGB( nClrFore )
      nClrBack = nGetBackRGB( nClrBack )
   endif

   ::GetDC()

   DEFAULT nAlign := GetTextAlign( ::hDC )

   WSay( ::hWnd, ::hDC, nRow, nCol, cValToChar( cText ), nClrFore, nClrBack,;
         If( oFont != nil, oFont:hFont, 0 ), lPixel, lTransparent, nAlign )

   ::ReleaseDC()

return nil
//--------------------------------------------------------------//

METHOD Distance(num1,num2)  CLASS  TCyclometric
   local  aNumpos := ::apos
   local nAt1,nAt2
   local oPen,hOldPen
   local aRect:= {}
   local nDistanza,nYOffset,nXOffset, nY,nX

  // xbrowser aNumpos

   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )

   aRect:= {aNumpos[nAt1][2],aNumpos[nAt1][3],aNumpos[nAt2][2],aNumpos[nAt2][3]}

   ::line( aRect[1],aRect[2],aRect[3],aRect[4], CLR_RED)


   // draw the distance number
         IF num2>num1
             nDistanza:= num2-num1
          else
             nDistanza:= num1-num2
          Endif
          If nDistanza > 45
            nDistanza:= 90-nDistanza
         Endif

       nYOffset = ::oFont:nHeight / 2
       nXOffset = ::oFont:nWidth / 2

       nY  := aRect[2]
       nX  := aRect[4]

  ::Say( nY - nYOffset, nX - nXOffset, LTRIM( STRzero( nDistanza,2 ) ), , , ::oFont, .t.,;
            .t., nil )

   return nil

 //--------------------------------------------------------------//


 METHOD Distance_Multiple(num1,num2,num3,num4,num5)  CLASS  TCyclometric
   local  aNumpos := ::apos
   local nAt1,nAt2,nAt3,nAt4,nAt5
   local oPen,hOldPen
   local aRect:= {}
   local nDistanza,nYOffset,nXOffset, nY,nX

   local aPoints   := array(5)

  // xbrowser aNumpos
   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )
   nAt3:= AScan( aNumpos, { | a | a[1] = num3 } )
   nAt4:= AScan( aNumpos, { | a | a[1] = num4 } )
   nAt5:= AScan( aNumpos, { | a | a[1] = num5 } )


     aPoints [5]  := {aNumpos[nAt5][2], aNumpos[nAt5][3]}
     aPoints [4]  := {aNumpos[nAt4][2], aNumpos[nAt4][3]}
     aPoints [3]  := {aNumpos[nAt3][2], aNumpos[nAt3][3]}
     aPoints [2]  := {aNumpos[nAt2][2], aNumpos[nAt2][3]}
     aPoints [1]  := {aNumpos[nAt1][2], aNumpos[nAt1][3]}


     ::line( aPoints [1][1],aPoints [1][2],aPoints [2][1],aPoints [2][2], lightblue,3)
     ::line( aPoints [2][1],aPoints [2][2],aPoints [3][1],aPoints [3][2], lightblue,3)
     ::line( aPoints [3][1],aPoints [3][2],aPoints [4][1],aPoints [4][2], lightblue,3)
     ::line( aPoints [4][1],aPoints [4][2],aPoints [5][1],aPoints [5][2], lightblue,3)
     ::line( aPoints [5][1],aPoints [5][2],aPoints [1][1],aPoints [1][2], lightblue,3)

     ::ReleaseDC()
      return ni
Last edited by Silvio.Falconi on Fri Jul 29, 2022 4:09 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: cyclometric circle

Postby Silvio.Falconi » Tue Jul 12, 2022 5:16 pm

latest release with distance

It does not write well the distance between two numbers, i.e. the calculation is correct but the number must be printed near the line between the two numbers and in the middle of the drawn line as U can see on this picture


Image


more clearly I explain where the numbers have to be written

Image







Code: Select all  Expand view

#include "FiveWin.ch"
#include "constant.ch"

#define COLOR_BTNFACE 15
#define PS_SOLID   0



#define darkgray    nRgb(169,169,169)
#define darkorange  nRgb(255,140,0)
#define darkred     nRgb(139,0,0)
#define lightblue    nRgb(173,216,230)


Function Test()
  local oCicloMetric
  local oDlg,oFont,oBold
  local oBtnPos,oBtnClose
  local nBottom   := 33
  local nRight    := 80
 * local nWidth    := Max( nRight * DLG_CHARPIX_W, 180 )
 * local nHeight   := nBottom * DLG_CHARPIX_H

  local nWidth    := 800 // Max( nRight * DLG_CHARPIX_W, 180 )
  local nHeight   := 600 //  nBottom * DLG_CHARPIX_H






   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-10
   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-12  BOLD

   DEFINE DIALOG oDlg SIZE  nWidth, nHeight  ;
      PIXEL TRUEPIXEL  FONT oFont   ;  //RESIZABLE
      TiTle "Manage Ciclometric"


     *oCicloMetric:= TCyclometric():New(10,10,430,430, oDlg,410)
      oCicloMetric:= TCyclometric():New(20,20,450,450, oDlg,410)


   @ 100,10 BUTTON oBtnClose PROMPT "Close" of oDlg  SIZE 80,22 ACTION oDlg:End()
   @ 100,10 BUTTON oBtnPos PROMPT "Test position" of oDlg  SIZE 80,22 ;
 ACTION  oCicloMetric:Distance_Multiple(11,40,45,54,68)

 /*  (oCicloMetric:Distance(11,40),;
           oCicloMetric:Distance(40,45),;
           oCicloMetric:Distance(45,54),;
           oCicloMetric:Distance(54,68),;
           oCicloMetric:Distance(68,11)) */


     oDlg:bResized := <||
     local oRect := oDlg:GetCliRect()
        oBtnClose:nLeft    := oRect:nRight - 100
        oBtnClose:nTop     := oRect:nBottom - 45
        oBtnPos:nLeft      := oRect:nLeft +10
        oBtnPos:nTop       := oRect:nBottom - 45
                 RETURN NIL
                       >



   ACTIVATE DIALOG oDlg CENTERED ;
   ON INIT ( Eval(oDlg:bResized))

   RELEASE FONT oFont, oBold
   Return nil















//-----------------------------------------------------------//
/*
Copyright (c) 2022 <Falconi Silvio>

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish,
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/


CLASS TCyclometric FROM TControl

   CLASSDATA lRegistered AS LOGICAL
   DATA nDiametro
   DATA oFont,oBold
   DATA apos  AS ARRAY

   METHOD New( nTop, nLeft, nWidth, nHeight, oWnd,nDiametro) CONSTRUCTOR
   METHOD Init( hDlg )
   METHOD End() INLINE if( ::hWnd == 0, ::Destroy(), Super:End() )
   METHOD Destroy()
   METHOD Display()
   METHOD Paint()
   METHOD Line( nTop, nLeft, nBottom, nRight, oPen )
   METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,;
            lTransparent, nAlign )
   METHOD Distance(num1,num2)
METHOD Distance_Multiple(num1,num2,num3,num4,num5)
   METHOD Say_distance(num1,num2,ny,nx)
ENDCLASS



METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, nDiametro, lDesign) CLASS  TCyclometric

DEFAULT  nDiametro   := 200             ,;
         nHeight     := 200             ,;
         nLeft       := 10              ,;
         nTop        := 10              ,;
         nWidth      := 200             ,;
         lDesign  := .f.,;
         oWnd        := GetWndDefault()

 ::nId         := ::GetNewId()
 ::nTop        := nTop
 ::nLeft       := nLeft
 ::nBottom     := nTop + nHeight - 1
 ::nRight      := nLeft + nWidth - 1

 ::oWnd        := oWnd
 ::lDrag       = lDesign
 ::oBrush := TBrush():New(,GetSysColor(COLOR_BTNFACE) )
 ::apos := {}

 ::nDiametro   =  nDiametro

   ::oFont     = TFont():New( "Tahoma", 0, -14 )
   ::oBold     = TFont():New( "Verdana", 0, -14, , .t. )

 ::nStyle   := nOr( WS_CHILD, WS_VISIBLE, WS_TABSTOP, WS_CLIPSIBLINGS )
 ::Register( nOr( CS_VREDRAW, CS_HREDRAW ) )


   if ! Empty( oWnd:hWnd )
       ::Create()
       ::Default()
      ::lVisible = .t.
      oWnd:AddControl( Self )
   else
      oWnd:DefControl( Self )
      ::lVisible = .f.
   endif

   if lDesign
      ::CheckDots()
   endif
   Return self
//--------------------------------------------------------------------------------------------------------//
METHOD Init( hDlg ) CLASS  TCyclometric

   Super:Init( hDlg )

   return nil
//--------------------------------------------------------------------------------------------------------//
METHOD Destroy() CLASS  TCyclometric
   if ::hWnd != 0
      ::Super:Destroy()
   endif
return nil
//--------------------------------------------------------//
METHOD Display() CLASS  TCyclometric
   ::BeginPaint()
   ::Paint()
   ::EndPaint()
return 0
//--------------------------------------------------------//
#define TA_CENTER         6

 METHOD Paint() CLASS  TCyclometric
   local nI
   local  nRaggio := (::nDiametro/2)
   local  xCent   := ::nLeft+nRaggio
   local  yCent   := ::nTop+nRaggio
   local  aTcPen := array(4)
   local  nTotalNumbers := 90
   local step_fi := PI() / 4.5 / 10  // add by Jimmy
   local hDc:=::getDc(), nDeltaR


    aTcPen[1] := CREATEPEN( PS_SOLID, 3, darkgray )
    aTcPen[2] := CREATEPEN( PS_SOLID, 3, darkred )

     //draw the circle
    Ellipse(hDC,::nLeft,::nTop,::nLeft+::nDiametro,::nTop+ ::nDiametro,aTcPen[1])


   //draw the numbers
   nYOffset = ::oFont:nHeight / 2
   nXOffset = ::oFont:nWidth / 2
   nDeltaR := ::oFont:nHeight

   FOR nI = 1 TO nTotalNumbers
      nAngolo := 2* Pgreco() / nTotalNumbers * ( nI - 1 )
      nY := INT( nRaggio * SIN(( ni-22.5) * step_fi ) + yCent)
      nX := INT( nRaggio * COS(( ni-22.5) * step_fi ) + xCent)

      // small  circles
      Ellipse(hDC, nX,nY ,nX-3,nY+3,aTcPen[2])

     // Save the positions of numbers
      aadd( ::apos , {nI,nY,nX} )




        ::Say( nY - nYOffset, nX - 0, hb_ntoc( nI,0 ),CLR_RED , , ::oFont, .t.,.t., TA_CENTER )


    //Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel, lTransparent, nAlign )
NEXT




  ::ReleaseDC()

   return nil

//--------------------------------------------------------------//
STAT FUNC Pgreco(); RETURN (3.1415926536)
//--------------------------------------------------------------//

METHOD Line( nTop, nLeft, nBottom, nRight, nColor,nspessore ) CLASS  TCyclometric

 *  local hPen := if( oPen = nil, 0, oPen:hPen )

 local  oPen := CreatePen(PS_SOLID, nspessore, nColor  )

 local   hOldPen
 ::GetDC()
   hOldPen := SelectObject( ::hDC, oPen )
   MoveTo( ::hDC, nLeft, nTop )
   LineTo( ::hDC, nRight, nBottom, oPen )
  SelectObject( ::hDC, hOldPen )
   ::ReleaseDC()

return nil
//--------------------------------------------------------------//
METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,;
            lTransparent, nAlign ) CLASS  TCyclometric

   DEFAULT nClrFore := ::nClrText,;
           nClrBack := ::nClrPane,;
           oFont    := ::oFont,;
           lPixel   := .f.,;
           lTransparent := .f.

   if ValType( nClrFore ) == "C"      //  xBase Color string
      nClrBack = nClrFore
      nClrFore = nGetForeRGB( nClrFore )
      nClrBack = nGetBackRGB( nClrBack )
   endif

   ::GetDC()

   DEFAULT nAlign := GetTextAlign( ::hDC )

   WSay( ::hWnd, ::hDC, nRow, nCol, cValToChar( cText ), nClrFore, nClrBack,;
         If( oFont != nil, oFont:hFont, 0 ), lPixel, lTransparent, nAlign )

   ::ReleaseDC()

return nil
//--------------------------------------------------------------//

METHOD Distance(num1,num2)  CLASS  TCyclometric
   local  aNumpos := ::apos
   local nAt1,nAt2
   local oPen,hOldPen
   local aRect:= {}
   local nDistanza,nYOffset,nXOffset, nY,nX

  // xbrowser aNumpos

   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )

   aRect:= {aNumpos[nAt1][2],aNumpos[nAt1][3],aNumpos[nAt2][2],aNumpos[nAt2][3]}

   ::line( aRect[1],aRect[2],aRect[3],aRect[4], CLR_RED)


   // draw the distance number
         IF num2>num1
             nDistanza:= num2-num1
          else
             nDistanza:= num1-num2
          Endif
          If nDistanza > 45
            nDistanza:= 90-nDistanza
         Endif

       nYOffset = ::oFont:nHeight / 2
       nXOffset = ::oFont:nWidth / 2

       nY  := aRect[2]
       nX  := aRect[4]

  ::Say( nY - nYOffset, nX - nXOffset, LTRIM( STRzero( nDistanza,2 ) ), , , ::oFont, .t.,;
            .t., nil )

   return nil

 //--------------------------------------------------------------//


 METHOD Distance_Multiple(num1,num2,num3,num4,num5)  CLASS  TCyclometric
   local  aNumpos := ::apos
   local nAt1,nAt2,nAt3,nAt4,nAt5
   local oPen,hOldPen
   local aRect:= {}
   local nDistanza,nYOffset,nXOffset, nY,nX
    local  nRaggio := (::nDiametro/2)
   local  xCent   := ::nLeft+nRaggio
   local  yCent   := ::nTop+nRaggio
   local aPoints   := array(5)

  // xbrowser aNumpos
   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )
   nAt3:= AScan( aNumpos, { | a | a[1] = num3 } )
   nAt4:= AScan( aNumpos, { | a | a[1] = num4 } )
   nAt5:= AScan( aNumpos, { | a | a[1] = num5 } )


     aPoints [5]  := {aNumpos[nAt5][2], aNumpos[nAt5][3]}
     aPoints [4]  := {aNumpos[nAt4][2], aNumpos[nAt4][3]}
     aPoints [3]  := {aNumpos[nAt3][2], aNumpos[nAt3][3]}
     aPoints [2]  := {aNumpos[nAt2][2], aNumpos[nAt2][3]}
     aPoints [1]  := {aNumpos[nAt1][2], aNumpos[nAt1][3]}


     ::line( aPoints [1][1],aPoints [1][2],aPoints [2][1],aPoints [2][2], lightblue,3)

     ::Say_distance(num1,num2)

     ::line( aPoints [2][1],aPoints [2][2],aPoints [3][1],aPoints [3][2], lightblue,3)

     ::Say_distance(num2,num3)

     ::line( aPoints [3][1],aPoints [3][2],aPoints [4][1],aPoints [4][2], lightblue,3)

     ::Say_distance(num3,num4)

     ::line( aPoints [4][1],aPoints [4][2],aPoints [5][1],aPoints [5][2], lightblue,3)

     ::Say_distance(num4,num5)


     ::line( aPoints [5][1],aPoints [5][2],aPoints [1][1],aPoints [1][2], lightblue,3)

     ::Say_distance(num5,num1)


     ::ReleaseDC()
     return nil




METHOD Say_distance(num1,num2) CLASS  TCyclometric
   local nDistanza:= 0
   local nAt1,nAt2
   local  aNumpos := ::apos
   local aRect:= {}
   local nYOffset,nXOffset, nY,nX

   //calc the distance
    IF num2>num1
             nDistanza:= num2-num1
          else
             nDistanza:= num1-num2
          Endif
          If nDistanza > 45
            nDistanza:= 90-nDistanza
         Endif

    // Print the distance
       nYOffset = ::oFont:nHeight / 2
       nXOffset = ::oFont:nWidth / 2

   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )

   aRect:= {aNumpos[nAt1][2],aNumpos[nAt1][3],aNumpos[nAt2][2],aNumpos[nAt2][3]}

       nY  := aRect[2]
       nX  := aRect[4]

  ::Say( nY - nYOffset, nX - 0, LTRIM( STRzero( nDistanza,2 ) ), , , ::oFont, .t.,;
            .t., nil )


         return Ni
Last edited by Silvio.Falconi on Fri Jul 29, 2022 4:10 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: cyclometric circle

Postby AntoninoP » Tue Jul 12, 2022 5:30 pm

Silvio.Falconi wrote:I corrected the numbers but Now are too on line of circle
How to move them slightly out?

Why did you change this part?
Code: Select all  Expand view
nAngolo := 2* Pgreco() / nTotalNumbers * ( nI - 1 )
      nY := INT( nRaggio * SIN(nAngolo) + yCent)
      nX := INT( nRaggio * COS(nAngolo) + xCent)
      // small  circles
      Ellipse(hDC, nX,nY ,nX-3,nY+3,aTcPen[2])
      aadd( ::apos , {nI,nY,nX} )
      nY := INT( (nRaggio+nDeltaR) * SIN(nAngolo) + yCent)
      nX := INT( (nRaggio+nDeltaR) * COS(nAngolo) + xCent)
        ::Say( nY - nYOffset, nX - 0, hb_ntoc( nI,0 ), , , ::oFont, .t.,.t., TA_CENTER )
 

do you see the says are farthest?
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: cyclometric circle

Postby Jimmy » Tue Jul 12, 2022 7:42 pm

hi Silvio,

your Cycle are based on
Code: Select all  Expand view
nRaggio := (::nDiametro/2)

for "OutSide" Cycle you "just" add some Pixel to
Code: Select all  Expand view
nRaggio := (::nDiametro/2) + 10

you can use 2 x FOR / NEXT loop :
1st "Calculate" Point "on Cycle"
2nd "paint" Number "outside" Cycle
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: cyclometric circle

Postby Silvio.Falconi » Tue Jul 12, 2022 8:15 pm

AntoninoP wrote:
Silvio.Falconi wrote:I corrected the numbers but Now are too on line of circle
How to move them slightly out?

Why did you change this part?
Code: Select all  Expand view
nAngolo := 2* Pgreco() / nTotalNumbers * ( nI - 1 )
      nY := INT( nRaggio * SIN(nAngolo) + yCent)
      nX := INT( nRaggio * COS(nAngolo) + xCent)
      // small  circles
      Ellipse(hDC, nX,nY ,nX-3,nY+3,aTcPen[2])
      aadd( ::apos , {nI,nY,nX} )
      nY := INT( (nRaggio+nDeltaR) * SIN(nAngolo) + yCent)
      nX := INT( (nRaggio+nDeltaR) * COS(nAngolo) + xCent)
        ::Say( nY - nYOffset, nX - 0, hb_ntoc( nI,0 ), , , ::oFont, .t.,.t., TA_CENTER )
 

do you see the says are farthest?

Because with yourvsource test i have the number 90 on the middle of circle , the number 90 must be on the top of circle, the number 45 on the Bottom, please the First picture i published
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: cyclometric circle

Postby Jimmy » Tue Jul 12, 2022 9:55 pm

hi Silvio,

as i can say your nX and nY are wrong

line from 11 to 40
{77, 367} to {417, 295}
but 11 it on upper right so it must be {367,77}

Number 40 is left from 11 and lower and must be {295,417}

so try this Code
Code: Select all  Expand view
METHOD Say_distance(num1,num2) CLASS  TCyclometric
 ...
   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )

*   aRect:= {aNumpos[nAt1][2],aNumpos[nAt1][3],aNumpos[nAt2][2],aNumpos[nAt2][3]}
*       nY  := aRect[2]
*       nX  := aRect[4]

   IF aNumpos[nAt1][3] > aNumpos[nAt2][3]
      nX := aNumpos[nAt2][3] + ( aNumpos[nAt1][3] - aNumpos[nAt2][3] ) /2
   ELSE
      nX := aNumpos[nAt1][3] + ( aNumpos[nAt2][3] - aNumpos[nAt1][3] ) /2
   ENDIF

   IF aNumpos[nAt1][2] > aNumpos[nAt2][2]
      nY := aNumpos[nAt2][2] + ( aNumpos[nAt1][2] - aNumpos[nAt2][2] ) /2
   ELSE
      nY := aNumpos[nAt1][2] + ( aNumpos[nAt2][2] - aNumpos[nAt1][2] ) /2
   ENDIF

   ::Say( nY - nYOffset, nX - 0, LTRIM( STRzero( nDistanza,2 ) ), , , ::oFont, .t.,.t., nil )

return Nil


---

as i say using 2 x FOR / NEXT Loop
do NOT ::Say() in 1st Loop, only ADD(::aPos , ... )

this is 2nd Loop
Code: Select all  Expand view
  nRaggio += 15
   FOR nI = 1 TO nTotalNumbers
      nY := INT( nRaggio * SIN(( ni-22.5) * step_fi ) + yCent)
      nX := INT( nRaggio * COS(( ni-22.5) * step_fi ) + xCent)
      ::Say( nY - nYOffset, nX - 0, hb_ntoc( nI,0 ),CLR_RED , , ::oFont, .t.,.t., TA_CENTER )
   NEXT
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: cyclometric circle

Postby AntoninoP » Wed Jul 13, 2022 8:50 am

Silvio.Falconi wrote:Because with yourvsource test i have the number 90 on the middle of circle , the number 90 must be on the top of circle, the number 45 on the Bottom, please the First picture i published


swap sin and cos and change signs until it works

Code: Select all  Expand view
     nAngolo := 2* Pgreco() / nTotalNumbers * ( nI - 1 )
      nY := INT( yCent - nRaggio * COS(nAngolo) )
      nX := INT( xCent + nRaggio * SIN(nAngolo) )
      Ellipse(hDC, nX,nY ,nX-3,nY+3,aTcPen[2])
      aadd( ::apos , {nI,nY,nX} )
      nY := INT(  yCent - (nRaggio+nDeltaR) * COS(nAngolo))
      nX := INT(  xCent + (nRaggio+nDeltaR) * SIN(nAngolo))
    ::Say( nY - nYOffset, nX - 0, hb_ntoc( nI,0 ), , , ::oFont, .t.,.t., TA_CENTER )
 


elementary geometry, you really didn't get there?
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: cyclometric circle

Postby Silvio.Falconi » Wed Jul 13, 2022 6:54 pm

Sorry for the absence I had family problems related to my 91 year old mother

I tried to solve the problems of both the displacement of numbers (thanks to Jimmy) and also the visualization of geometric figures.

Antonino, I'm sorry but your code always sets me the 90 in half circle, while the couple 90 | 01 must be top position

Last Release It run with Intenet because I take the data on a website

Image

my intention is that when I select a row of the oBrw it must show me the relative figure

First problem is that the numbers are not sorted from the smallest to the largest so the figure is wrong,
how make to create an aNumeri array where I have from column 2 to column 6 on order ?

as I do to sort the numbers (from column 2 to column 6), be careful I don't have to change the browse, but when I call it function

oCicloMetric:Distance_Multiple(aNumeri)

p.s. I set the possiblity to show on/off the numbers on big cicle

the Source
Code: Select all  Expand view
#include "fivewin.ch"
#include "constant.ch"

// TCyclometric class for Italian Lottery


#define darkgray    nRgb(169,169,169)
#define darkorange  nRgb(255,140,0)
#define darkred     nRgb(139,0,0)
#define lightblue    nRgb(173,216,230)

#define TA_CENTER         6
#define COLOR_BTNFACE 15
#define PS_SOLID   0



Function Test()
  local oCicloMetric
  local aCicloMetric:=array(11)
  local oDlg,oFont,oBold
  local oBtnPos,oBtnClose
  local nBottom   := 33
  local nRight    := 120
  local nWidth    := Max( nRight * DLG_CHARPIX_W, 180 )
  local nHeight   := nBottom * DLG_CHARPIX_H
  local cUrl:="http://www.televideo.rai.it/televideo/pub/solotesto.jsp?pagina=786"
  local adata:=TestUrl( cUrl )
  local oBrw


   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-10
   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-12  BOLD

   DEFINE DIALOG oDlg SIZE  nWidth, nHeight  ;
      PIXEL TRUEPIXEL  FONT oFont   ;  //RESIZABLE
      TiTle "Manage Ciclometric"


     @ 50,500 XBROWSE oBrw OF oDlg SIZE 300,250 PIXEL NOBORDER;
      COLS 1,2,3,4,5,6;
      HEADERS "Ruota", "E1", "E2", "E3", "E4", "E5" ;
      SIZES  80,30,30,30,30,30  ;
      ARRAY adata ;
      CELL LINES

    WITH OBJECT oBrw
      :nRowHeight    := 20
      :nClrBorder := CLR_GRAY
      :lDrawBorder := .t.
      :nColorBox := CLR_HRED

      :lHeader             := .f.
      :lHscroll            := .f.
      :lvscroll            := .f.
      :l2007               := .F.
      :l2015               := .t.

      :nStretchCol         := STRETCHCOL_WIDEST
      :lAllowRowSizing     := .F.
      :lAllowColSwapping   := .F.
      :lAllowColHiding     := .F.
      :lRecordSelector     := .F.
      :nColDividerStyle    := LINESTYLE_LIGHTGRAY
      :nRowDividerStyle    := LINESTYLE_LIGHTGRAY


       :CreateFromCode()
   End








 //------------------------------------------------------------------------//

   oCicloMetric:= TCyclometric():New(15,15,410,410, oDlg,380)






   @ 100,10 BUTTON oBtnClose PROMPT "Close" of oDlg  SIZE 80,22 ACTION oDlg:End()
   @ 100,10 BUTTON oBtnPos PROMPT "Test position" of oDlg  SIZE 80,22 ;
    ACTION  oCicloMetric:Distance_Multiple(11,40,45,54,68)



     oDlg:bResized := <||
     local oRect := oDlg:GetCliRect()
        oBtnClose:nLeft    := oRect:nRight - 100
        oBtnClose:nTop     := oRect:nBottom - 45
        oBtnPos:nLeft      := oRect:nLeft +10
        oBtnPos:nTop       := oRect:nBottom - 45
                 RETURN NIL
                       >



   ACTIVATE DIALOG oDlg CENTERED ;
   ON INIT ( Eval(oDlg:bResized))

   RELEASE FONT oFont, oBold
   Return nil

//---------------------------------------------------------------------------//

CLASS TCyclometric FROM TControl

   CLASSDATA lRegistered AS LOGICAL
   DATA nDiametro
   DATA oFont,oBold
   DATA apos  AS ARRAY

   DATA lShowNumbers AS LOGICAL init .T.

   METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, nDiametro) CONSTRUCTOR
   METHOD Init( hDlg )
   METHOD End() INLINE if( ::hWnd == 0, ::Destroy(), Super:End() )
   METHOD Destroy()
   METHOD Display()
   METHOD Paint()
   METHOD Line( nTop, nLeft, nBottom, nRight, oPen )
   METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,lTransparent, nAlign )
   METHOD Distance(num1,num2)
   METHOD Distance_Multiple(num1,num2,num3,num4,num5)
   METHOD Say_distance(num1,num2)
ENDCLASS

METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, nDiametro, lDesign,lShowNumbers ) CLASS  TCyclometric

DEFAULT  nDiametro     := 200             ,;
         nHeight       := 200             ,;
         nLeft         := 10              ,;
         nTop          := 10              ,;
         nWidth        := 200             ,;
         lDesign       := .f.             ,;
         lShowNumbers  := .t.             ,;
         oWnd          := GetWndDefault()

 ::nId         := ::GetNewId()
 ::nTop        := nTop
 ::nLeft       := nLeft
 ::nBottom     := nTop + nHeight - 1
 ::nRight      := nLeft + nWidth - 1

 ::oWnd        := oWnd
 ::lDrag       = lDesign
 ::oBrush := TBrush():New(,GetSysColor(COLOR_BTNFACE) )
 ::apos := {}

 ::nDiametro   =  nDiametro

 ::oFont     = TFont():New( "Tahoma", 0, -10 )
 ::oBold     = TFont():New( "Verdana", 0, -10, , .t. )

 ::nStyle   := nOr( WS_CHILD, WS_VISIBLE, WS_TABSTOP, WS_CLIPSIBLINGS )
 ::Register( nOr( CS_VREDRAW, CS_HREDRAW ) )

 ::lShowNumbers = lShowNumbers


   if ! Empty( oWnd:hWnd )
       ::Create()
       ::Default()
      ::lVisible = .t.
      oWnd:AddControl( Self )
   else
      oWnd:DefControl( Self )
      ::lVisible = .f.
   endif

   if lDesign
      ::CheckDots()
   endif
   Return self

//--------------------------------------------------------------------------------------------------------//
METHOD Init( hDlg ) CLASS  TCyclometric

   Super:Init( hDlg )

   return nil
//--------------------------------------------------------------------------------------------------------//
METHOD Destroy() CLASS  TCyclometric
   if ::hWnd != 0
      ::Super:Destroy()
   endif
return nil
//--------------------------------------------------------//
METHOD Display() CLASS  TCyclometric
   ::BeginPaint()
   ::Paint()
   ::EndPaint()
return 0
//--------------------------------------------------------//


METHOD Paint() CLASS  TCyclometric
   local nI
   local  nRaggio := (::nDiametro/2)
   local  xCent   := ::nLeft+nRaggio
   local  yCent   := ::nTop+nRaggio
   local  aTcPen := array(4)
   local  nTotalNumbers := 90
   local step_fi := PI() / 4.5 / 10  // add by Jimmy
   local hDc:=::getDc(), nDeltaR
   local nRaggioSay,nY2,nX2

    aTcPen[1] := CREATEPEN( PS_SOLID, 3, darkgray )
    aTcPen[2] := CREATEPEN( PS_SOLID, 3, darkred )

     //draw the circle
    Ellipse(hDC,::nLeft,::nTop,::nLeft+::nDiametro,::nTop+ ::nDiametro,aTcPen[1])


   //draw the numbers
   nYOffset = ::oFont:nHeight / 2
   nXOffset = ::oFont:nWidth / 2
   nDeltaR := ::oFont:nHeight

   FOR nI = 1 TO nTotalNumbers
      nAngolo := 2* Pgreco() / nTotalNumbers * ( nI - 1 )
      nY := INT( nRaggio * SIN(( ni-22.5) * step_fi ) + yCent)
      nX := INT( nRaggio * COS(( ni-22.5) * step_fi ) + xCent)

      // small  circles
      Ellipse(hDC, nX,nY ,nX-3,nY+3,aTcPen[2])

     // Save the positions of numbers
      aadd( ::apos , {nI,nY,nX} )



      If ::lShowNumbers
         nRaggioSay := (::nDiametro/2) + 10
         nY2 := INT( nRaggioSay * SIN(( ni-22.5) * step_fi ) + yCent)
         nX2 := INT( nRaggioSay * COS(( ni-22.5) * step_fi ) + xCent)
        ::Say( nY2 - nYOffset, nX2 - 0, hb_ntoc( nI,0 ),CLR_RED , , ::oFont, .t.,.t., TA_CENTER )
      Endif

    //Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel, lTransparent, nAlign )
NEXT




  ::ReleaseDC()

   return nil
//--------------------------------------------------------------//
STAT FUNC Pgreco(); RETURN (3.1415926536)
//--------------------------------------------------------------//

METHOD Line( nTop, nLeft, nBottom, nRight, nColor,nspessore ) CLASS  TCyclometric

 *  local hPen := if( oPen = nil, 0, oPen:hPen )

 local  oPen := CreatePen(PS_SOLID, nspessore, nColor  )

 local   hOldPen
 ::GetDC()
   hOldPen := SelectObject( ::hDC, oPen )
   MoveTo( ::hDC, nLeft, nTop )
   LineTo( ::hDC, nRight, nBottom, oPen )
  SelectObject( ::hDC, hOldPen )
   ::ReleaseDC()

return nil
//--------------------------------------------------------------//
METHOD Say( nRow, nCol, cText, nClrFore, nClrBack, oFont, lPixel,;
            lTransparent, nAlign ) CLASS  TCyclometric

   DEFAULT nClrFore := ::nClrText,;
           nClrBack := ::nClrPane,;
           oFont    := ::oFont,;
           lPixel   := .f.,;
           lTransparent := .f.

   if ValType( nClrFore ) == "C"      //  xBase Color string
      nClrBack = nClrFore
      nClrFore = nGetForeRGB( nClrFore )
      nClrBack = nGetBackRGB( nClrBack )
   endif

   ::GetDC()

   DEFAULT nAlign := GetTextAlign( ::hDC )

   WSay( ::hWnd, ::hDC, nRow, nCol, cValToChar( cText ), nClrFore, nClrBack,;
         If( oFont != nil, oFont:hFont, 0 ), lPixel, lTransparent, nAlign )

   ::ReleaseDC()

return nil
//--------------------------------------------------------------//

METHOD Distance(num1,num2)  CLASS  TCyclometric
   local  aNumpos := ::apos
   local nAt1,nAt2
   local oPen,hOldPen
   local aRect:= {}
   local nDistanza,nYOffset,nXOffset, nY,nX

  // xbrowser aNumpos

   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )

   aRect:= {aNumpos[nAt1][2],aNumpos[nAt1][3],aNumpos[nAt2][2],aNumpos[nAt2][3]}

   ::line( aRect[1],aRect[2],aRect[3],aRect[4], CLR_RED)


   // draw the distance number
         IF num2>num1
             nDistanza:= num2-num1
          else
             nDistanza:= num1-num2
          Endif
          If nDistanza > 45
            nDistanza:= 90-nDistanza
         Endif

       nYOffset = ::oFont:nHeight / 2
       nXOffset = ::oFont:nWidth / 2

       nY  := aRect[2]
       nX  := aRect[4]

  ::Say( nY - nYOffset, nX - nXOffset, LTRIM( STRzero( nDistanza,2 ) ), , , ::oFont, .t.,;
            .t., nil )

   return nil

 //--------------------------------------------------------------//

 METHOD Distance_Multiple(num1,num2,num3,num4,num5)  CLASS  TCyclometric
   local  aNumpos := ::apos
   local nAt1,nAt2,nAt3,nAt4,nAt5
   local oPen,hOldPen
   local aRect:= {}
   local nDistanza,nYOffset,nXOffset, nY,nX
    local  nRaggio := (::nDiametro/2)
   local  xCent   := ::nLeft+nRaggio
   local  yCent   := ::nTop+nRaggio
   local aPoints   := array(5)

  // xbrowser aNumpos
   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )
   nAt3:= AScan( aNumpos, { | a | a[1] = num3 } )
   nAt4:= AScan( aNumpos, { | a | a[1] = num4 } )
   nAt5:= AScan( aNumpos, { | a | a[1] = num5 } )


     aPoints [5]  := {aNumpos[nAt5][2], aNumpos[nAt5][3]}
     aPoints [4]  := {aNumpos[nAt4][2], aNumpos[nAt4][3]}
     aPoints [3]  := {aNumpos[nAt3][2], aNumpos[nAt3][3]}
     aPoints [2]  := {aNumpos[nAt2][2], aNumpos[nAt2][3]}
     aPoints [1]  := {aNumpos[nAt1][2], aNumpos[nAt1][3]}


     ::line( aPoints [1][1],aPoints [1][2],aPoints [2][1],aPoints [2][2], lightblue,3)

     ::Say_distance(num1,num2)

     ::line( aPoints [2][1],aPoints [2][2],aPoints [3][1],aPoints [3][2], lightblue,3)

     ::Say_distance(num2,num3)

     ::line( aPoints [3][1],aPoints [3][2],aPoints [4][1],aPoints [4][2], lightblue,3)

     ::Say_distance(num3,num4)

     ::line( aPoints [4][1],aPoints [4][2],aPoints [5][1],aPoints [5][2], lightblue,3)

     ::Say_distance(num4,num5)


     ::line( aPoints [5][1],aPoints [5][2],aPoints [1][1],aPoints [1][2], lightblue,3)

     ::Say_distance(num5,num1)


     ::ReleaseDC()
     return nil

//-----------------------------------------------------------------------//
 METHOD Say_distance(num1,num2) CLASS  TCyclometric
  local nDistanza:= 0
   local nAt1,nAt2
   local  aNumpos := ::apos
   local aRect:= {}
   local nYOffset,nXOffset, nY,nX

   //calc the distance
    IF num2>num1
             nDistanza:= num2-num1
          else
             nDistanza:= num1-num2
          Endif
          If nDistanza > 45
            nDistanza:= 90-nDistanza
         Endif

  // Print the distance
       nYOffset = ::oFont:nHeight / 2
       nXOffset = ::oFont:nWidth / 2


   nAt1:= AScan( aNumpos, { | a | a[1] = num1 } )
   nAt2:= AScan( aNumpos, { | a | a[1] = num2 } )



   IF aNumpos[nAt1][3] > aNumpos[nAt2][3]
      nX := aNumpos[nAt2][3] + ( aNumpos[nAt1][3] - aNumpos[nAt2][3] ) /2
   ELSE
      nX := aNumpos[nAt1][3] + ( aNumpos[nAt2][3] - aNumpos[nAt1][3] ) /2
   ENDIF

   IF aNumpos[nAt1][2] > aNumpos[nAt2][2]
      nY := aNumpos[nAt2][2] + ( aNumpos[nAt1][2] - aNumpos[nAt2][2] ) /2
   ELSE
      nY := aNumpos[nAt1][2] + ( aNumpos[nAt2][2] - aNumpos[nAt1][2] ) /2
   ENDIF

   ::Say( nY - nYOffset, nX - 0, LTRIM( STRzero( nDistanza,2 ) ), , , ::oFont, .t.,.t., nil )

return Nil


  Function TestUrl( cUrl )
        local cRet:=""
        local cData:=""
        local cFile := "test.txt"
        local cBuff
        local nHndl
        local aShow:={}
        local nI

        IF IsInternet()
               cRet := WebPageContents( cUrl )
               cData := WebPageContents( cUrl )
        if Empty( cRet )
          ? "Invalid URL"
       else
            //per la data estrazione
            cData := subStr( cData, at( "ALMANACCO",  cData )+9 )
            cData := allTrim( subStr( cData, 1, at("BARI",  cData ) -1 ) )

            // per il blocco Bari - Nazionale
            cRet := subStr( cRet, at( "BARI", cRet ) )
            cRet := allTrim( subStr( cRet, 1, at( "Controlla", cRet ) - 1 ) )

            nHndl := fCreate( cFile )
            fWrite( nHndl, cRet )
            fClose( nHndl )
            IF ( nHndl := fOpen( cFile ) ) < 1
                msgStop( "UNABLE TO OPEN: " + cFile  )
            ELSE
                aShow := {}
                WHILE hb_fReadLine( nHndl, @cBuff, chr( 10 ) ) == 0
                    cBuff := allTrim( cBuff )
                    IF ! empty( cBuff )
                        aAdd( aShow, {} )
                        aAdd( aTail( aShow ), subStr( cBuff, 1, 11 ) )
                        FOR nI := 12 TO 28 STEP 4
                            aAdd( aTail( aShow ), subStr( cBuff, nI, 2 ) )
                        NEXT
                    ENDIF
                ENDDO
                * xBrowse( aShow )
                ferase(cfile)
                return aShow
            ENDIF
         endif
      else
         MsgAlert("Controlla la connessione su internet!","EasyLotto")
          endif
        return nil




If I made

:bChange := { ||Showform(oBrw,oCicloMetric) }






























Code: Select all  Expand view
Function Showform(oBrw,oCicloMetric)
   local aNumeri:= {}
   local atemp:= {}
   local cText
   local num1,num2,num3,num4,num5
   AAdd(atemp,oBrw:aArrayData[ oBrw:nArrayAt ] )

   cText:=atemp[1][1]  //text
   num1 :=atemp[1][2]
   num2 :=atemp[1][3]
   num3 :=atemp[1][4]
   num4 :=atemp[1][5]
   num5 :=atemp[1][6]

    aNumeri := {num1,num2,num3,num4,num5}

    xbrowser aNumeri

   ASort( aNumeri, nil, nil, { |x| x[ 1 ] < x[ 1 ] } )

   xbrowser aNumeri
   *oCicloMetric:Distance_Multiple(11,40,45,54,68)
 Return nil



it not sort the numbers , so How I must make ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: cyclometric circle

Postby Silvio.Falconi » Wed Jul 13, 2022 8:31 pm

It's ok
Code: Select all  Expand view
Function Showform(oBrw,oCicloMetric)
   local aNumeri:= {}
   local atemp:= {}
   local cText
   local num1,num2,num3,num4,num5
   AAdd(atemp,oBrw:aArrayData[ oBrw:nArrayAt ] )

   cText:=atemp[1][1]  //text
   num1 :=atemp[1][2]
   num2 :=atemp[1][3]
   num3 :=atemp[1][4]
   num4 :=atemp[1][5]
   num5 :=atemp[1][6]

    aNumeri := {num1,num2,num3,num4,num5}

   ASort( aNumeri, nil, nil, { |x,y| x < y } )

   num1 :=aNumeri[1]
   num2 :=aNumeri[2]
   num3 :=aNumeri[3]
   num4 :=aNumeri[4]
   num5 :=aNumeri[5]

   oCicloMetric:Distance_Multiple(val(num1),val(num2),val(num3),val(num4),val(num5))

   Return nil



 


Only when I change the record not erase the oldest lines

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: cyclometric circle

Postby Silvio.Falconi » Thu Jul 14, 2022 9:58 am

Another problem
If I created 11 object of my class and I wish show le lines then not run ok because on Paint method the class created the ::apos positions array , so when I call method distance_Multiple() not found ::apos I not understood why

while If I make only one Obj run ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: cyclometric circle

Postby Antonio Linares » Thu Jul 14, 2022 12:00 pm

Dear Silvio,

Could you share the most recent code to test it ?

many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42097
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: cyclometric circle

Postby Silvio.Falconi » Thu Jul 14, 2022 12:41 pm

I sent you Yesterday on afternoon at your mail
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: cyclometric circle

Postby Silvio.Falconi » Fri Jul 29, 2022 4:14 pm

I insert a Paint before of distance_multiple() method

oCiclo:Paint()
oCiclo:Distance_Multiple(val(num1),val(num2),val(num3),val(num4),val(num5),nColor,oCiclo:apos)




Image



Now How I can to refill the area with transparent color ?


Image

I tried with FillRectEx( ::hDC, aPoints, aGrad)
Last edited by Silvio.Falconi on Fri Dec 02, 2022 1:13 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: cyclometric circle

Postby Antonio Linares » Sat Jul 30, 2022 2:12 am

Dear Silvio,

Congratulations for the nice progress :-)

Where to find the source code for FillRectEx() ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42097
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests