New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Radial Progress Bar #113
Comments
Hi. Anyone else with this issue? |
Hi, I currently use only releases of FPC and Lazarus. |
Hi. Sorry what does that mean? So are you saying this version of Lazarus is not supported? Up to what version is supported? Is the version that the installer installs not supported? |
Hello, I cannot reproduce the bug, though I tried on Linux amd64 with Lazarus 2.2.0RC1 and did not get any problem. The bug may be related to the trunk branch. fpcupdeluxe can install latest trunk version though it is experimental. I suggest you try with the regular installer on SourceForge: |
OK arm Linux. I don't have arm Linux to test.
The source code of this control is pretty simple can you take a look?
El dom., 8 de agosto de 2021 10:39, JacoFourie ***@***.***>
escribió:
… OK I have now installed version Lazarus 2.2.0RC2 ra829c6f1f0 FPC 3.2.2
arm-linux-gtk2
And I have the same issue.
[image: image]
<https://user-images.githubusercontent.com/17771641/128633882-67f771c5-b20e-4feb-bf1d-4455ee68dc48.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7QUQ5W6YUCUGGEBTAOG23T32CH5ANCNFSM5APSRXLA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
It looks like the Height value is null. If I hard code it to 100 it shows at the correct place. |
Try replacing height with clientheight or canvas. height.
El dom., 8 de agosto de 2021 10:56, JacoFourie ***@***.***>
escribió:
… It looks like the Height value is null. If I hard code it to 100 it shows
at the correct place.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7QUQ5BUYGW6Z4ZBKG777TT32EJ7ANCNFSM5APSRXLA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
OK so Height does have a value in it. I am still looking where this is coming from. I will install this version on Windows and look if I get the same issue. |
If this is a arm linux issue where do I report it? |
OK so it definitely has something to do with the value y = Height / 2. If I hard code the y value in my app with 80 then all works fine on version 2.3.0 and version 2.2.0 RC 2 |
OK so if I use a variable of type single and round it so the divide is not an issue then it works. If you do the calculation (Height / 2) in the pass to the arc function then it does not work temp_height : single; temp_height := round(Height / 2); FreeAndNil(FBitmap); FBitmap.Canvas2D.beginPath; |
So is this a dataype issue? Is there not some setting that I need to set in the IDE for compiling? |
OK. Seems a bug in FPC.
El dom., 8 de agosto de 2021 12:44, JacoFourie ***@***.***>
escribió:
… So is this a dataype issue? Is there not some setting that I need to set
in the IDE for compiling?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7QUQ3TKPNT2HCQRCVZDPDT32Q57ANCNFSM5APSRXLA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
When you say a bug in FPC is there a bug in the version of FPC I am using? Where should I ask about it? |
You must ask in the fpc bug tracker.
El dom., 8 de agosto de 2021 18:03, JacoFourie ***@***.***>
escribió:
… When you say a bug in FPC is there a bug in the version of FPC I am using?
Where should I ask about it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7QUQYZL3NNPLYNMBUXE4DT33WJFANCNFSM5APSRXLA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Yes there's a bug in arm.
If you can create a fork of the dev branch of bgracontrols and fix the
controls for arm with the intermediate calculations... Easier than waiting
fpc to fix it.
El dom., 8 de agosto de 2021 19:27, JacoFourie ***@***.***>
escribió:
… FPC 3.2.3 also has the issue on Arm. But on Windows it is fine. So is
there an issue with FPC on Arm Linux according to you?
[image: image]
<https://user-images.githubusercontent.com/17771641/128647472-23377dcd-af97-4115-9287-01778f41abce.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7QUQ6WOXTCHB377TCT3LDT34AGTANCNFSM5APSRXLA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Where to declare the bug: https://gitlab.com/freepascal.org/fpc/source/-/issues It might help if you can reproduce the bug with a simple program, without any library, just with one a function with the same signature. Note that if it works in FPC 3.3.1 and not in FPC 3.2.2, it might already have been fixed in trunk. |
Thanks. I am trying to install FPC 3.3.1 but the installer now has an error and bombs out. They moved all the stuff over from svn to GitLab and now TRUNK does not seem to work with Fpcupdeluxe. I tried to make a small program but it works in the small program. Will update as I progress. I don't need to have this working yet. I am just making sure stuff still works in the new version so when I do move over it still works and I do not have an issue then. |
So using the latest Lazarus IDE and the Latest FPC I have to replace all the calculations in the arc call. Then the control works at run time. `procedure TBCRadialProgressBar.RenderControl; begin temp_height := Height; FreeAndNil(FBitmap); temp_width := Width / 2; FBitmap.Canvas2D.beginPath; if LineWidth=0 then FBitmap.Canvas2D.lineWidth := EffectiveLineWidth; FBitmap.Canvas2D.beginPath; FBitmap.Canvas2D.lineWidth := EffectiveLineWidth; if MaxValue = 0 then textBmp := TextShadow(Width, Height, textStr, Font.Height, But at design time in the GUI builder it is still wrong. Is the same code not called in the design time interface to create the control? |
This is so scary. How can FPC do this? I print the value of Height and Width before I call arc. And then again inside arc. Before the call writeln('Width : ' + floattostr(Width)); writeln('Half Width : ' + floattostr(Width / 2)); // FBitmap.Canvas2D.arc(temp_width, temp_height, temp_height2, 0, temp_pi, False); and then inside the arc procedure at th start of the proc. procedure TBGRACanvas2D.arc(x, y, radius, startAngleRadCW, endAngleRadCW: single; And here is the output. This is very scary that FPC does this. Y should be 100, yet it is 3.390625 Width : 200 |
Hello Jaco To see the changes in the designer you need to recompile Lazarus. As you did when you installed BGRAControls in the first place. About trunk I understand it is frightening. I cannot help with that, but it is common to have bugs in trunk |
Cool glad you have a solution |
Hi. I am running the new version of Lazarus.
Lazarus 2.3.0 r65462 FPC 3.2.2 arm-linux-gtk2
The progress bar is not in the center anymore.
The text was updated successfully, but these errors were encountered: