Author Topic: January 2023  (Read 1250 times)

Malkom

  • Administrator
  • Newbie
  • *****
  • Posts: 461
  • Here to help you
January 2023
« on: January 31, 2023, 01:58:42 PM »
Here is a brief progress report on HN v5 development for the month of January 2023.

The aim is to get the Chart demo project running inside HN5 Creator IDE.

The development is being carried out on a Windows 7 x64 machine building for x32.
Note, x64 builds work just as well as x32 ones.

The development language is Free Pascal which should ensure HN5 will be able to run on a variety of older and newer Operating Systems.
The main targets being Windows, MacOS + OS X, and then Linux.


HN5 CREATOR

Runtime Engine

More progress made on the graphics for drawing to canvases.
Commands for drawing rectangles, empty and filled, circles etc are now working.

The first screen shot below relates to running the Chart project's button 'DrawChart' script.
The axis shows clearly but no bars are drawn because the Chart's HN script DrawBars needs debugging.


Runtime shows result of pressing the DrawChart button: http://www.tigabyte.com/Screenshots/01-2023/DrawChart_Graphics_w7_x32.jpg

Editor showing some of the DrawBars script: http://www.tigabyte.com/Screenshots/01-2023/Editor_DrawBars_script.jpg


Code: [Select]
@ Draws bars and finds axis limits for DrawLabels subroutine.

Global redPen,greenPen,bluePen
Global xBase,yBase,yTop,cWidth,cHeight
Global xaMax,yaMax

Local n,x,y,num,h
Local ylist,xlist,yscale,xscale,ymax,xmax
Local ynlines,xnlines

@ *** Find x scale ***
Put field 1 into xlist
Put LinesFN(xlist) into xnlines
If xnlines=0 Then
    Put 1 into xscale
Else
    Put 0 into xmax
    For n=1 to xnlines
        Put line n of xlist into num
        If num>xmax Then
            Put num into xmax
        EndIf
    EndFor
    If xmax=0 Then
        Put 1 into xscale
    Else
        Put cWidth into xscale
        Subtract 20 from xscale
        Subtract xBase from xscale
        Divide xscale by xmax
    EndIf
EndIf
Put xmax into xaMax


@ *** Find y scale ***
Put field 2 into ylist
Put LinesFN(ylist) into ynlines
If ynlines=0 Then
    Put 1 into yscale
Else
    Put 0 into ymax
    For n=1 to ynlines
        Put line n of ylist into num
        If num>ymax Then
            Put num into ymax
        EndIf
    EndFor
    If ymax=0 Then
        Put 1 into yscale
    Else
        Put yBase into yscale
        Subtract yTop from yscale
        Divide yscale by ymax
    EndIf
EndIf
Put ymax into yaMax


@ *** Draw Bars ***
If xnlines>0 Then
    CanvasSetColor 1,redPen,greenPen,bluePen
    For n=1 to xnlines
        @ X
        Put line n of xlist into x
        Multiply x by xscale
        Add xBase to x
        @ Y
        Put line n of ylist into h
        Multiply h by yscale
        Put yBase into y
        Subtract h from y
        @ Draw bar
        CanvasFillRect 1,x,y,10,h
    EndFor
EndIf





February 2023

Work will again be focused on the graphics engine with the aim of displaying the Chart's graph.

I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

Peter1001

  • Newbie
  • *
  • Posts: 1
Re: January 2023
« Reply #1 on: August 25, 2023, 02:13:23 PM »
Development has stopped?!
Thanks

Malkom

  • Administrator
  • Newbie
  • *****
  • Posts: 461
  • Here to help you
Re: January 2023
« Reply #2 on: August 26, 2023, 02:17:06 PM »
Development has stopped?!
Thanks
Hi Peter,
Thank you  for your post.
Development did come to a complete halt for while - due to health issues in February - I'm 69 so not as resiliant.
Anyhow, since then I've had feedback from a few people and been working quietly on the Windows Free Pascal version.
A few things have been fixed and improved - with aim to get a usable alpha out - then perhaps some actual user feedback.
Main thing though was a better plan to cope with the different sub-projects.
All the best,
Malcolm
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.