Recent

Poll

Vote: What's the best project of this year?

"ball" by raw
1 (3.7%)
"bgragraphics" by j-g (pocket watch)
2 (7.4%)
"duplo6" by bylaardt
7 (25.9%)
"glslideshow" by handoko
2 (7.4%)
"mariocronch" by ericktux
0 (0%)
"movingdots" by lainz
1 (3.7%)
"movingdotsgl" by lainz
0 (0%)
"relogio" by bylaardt
5 (18.5%)
"starsfieldshooter" by turrican
0 (0%)
"steampunkclock" by bylaardt
1 (3.7%)
"sudoku" by user137
5 (18.5%)
"furiouspaladin" by handoko
3 (11.1%)
"educrace" by lulu
0 (0%)

Total Members Voted: 26

Author Topic: Graphics Contest 2017, please vote now!  (Read 199602 times)

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: Graphics Contest 2017, please vote now!
« Reply #300 on: August 20, 2017, 03:10:23 am »
The error being 'identifier idents no member "Width"' - there is another error noted for "Height" as well - which I assumed to mean that BGRABitmap V9.5 differs from V9.2.1 by adding a 'width' and 'height' property.

I just dug up a complete BGRABitmap 7.2 source tree I had lying around on my computer (from who knows when... a long time ago, to be sure!) and I can confirm that the Width and Height properties were alive and well. Frankly I'm quite confident that they've probably always been there, since the very first version... what kind of image class would not have Width and Height? That would be insane! Haha.

So yeah, I imagine it's likely some weird bug related to duplicate files on your end, as you had suggested...

Also, you definitely don't have the most recent upload of my version... I can specifically tell as I've since made the UpdateButtonImage method a member of an "advanced record" called TSlideShowRenderer (along with all of the other image and rendering-related methods, essentially), and it starts at line 718. Would recommend re-downloading it! You can just go back to my initial post and grab the same zip file, as I was simply editing the post and swapping out the attachment as I went.
« Last Edit: August 20, 2017, 03:36:03 am by Akira1364 »

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: Graphics Contest 2017, please vote now!
« Reply #301 on: August 20, 2017, 10:13:04 am »
I can confirm that the Width and Height properties were alive and well. Frankly I'm quite confident that they've probably always been there, since the very first version... what kind of image class would not have Width and Height? That would be insane! Haha.
:-[  I should have thought that comment through :)
Quote from: Akira1364
Also, you definitely don't have the most recent upload of my version... I can specifically tell as I've since made the UpdateButtonImage method a member of an "advanced record" called TSlideShowRenderer (along with all of the other image and rendering-related methods, essentially), and it starts at line 718. Would recommend re-downloading it! You can just go back to my initial post and grab the same zip file, as I was simply editing the post and swapping out the attachment as I went.
Ah!  Now I remember that I had a problem looking for which post your latest version was attached to and thinking "Why not attach it to THIS post?" then being distracted by some external 'life' event and not getting back to it.

I'll have another search and create a new folder for more tests.
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: Graphics Contest 2017, please vote now!
« Reply #302 on: August 20, 2017, 07:48:13 pm »

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: Graphics Contest 2017, please vote now!
« Reply #303 on: August 21, 2017, 12:41:45 am »
Here's a direct link to my original post:
Thanks - that make life so much easier  -  well so I thought :)

I first deleted all the old files, then extracted the new  -  only to find that the 'new' .zip was only 3 files; frmMain.ifm & .pas plus uniGraphics.pas. The other 4 files were recovered from the [bin] and - - - - -  compile fails again for no identifier idents to member "width" and "height".

At least I no longer have hints about duplicates though!
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: Graphics Contest 2017, please vote now!
« Reply #304 on: August 21, 2017, 12:51:09 am »
I first deleted all the old files, then extracted the new  -  only to find that the 'new' .zip was only 3 files; frmMain.ifm & .pas plus uniGraphics.pas.

That has been the case with all of the zip files I've uploaded. I've never included the entire project tree. It's always just been those three files.

Regarding your problem though.. that is extremely strange! I honestly don't think it has anything to do with BGRABitmap at all. Is it possible that the compiler is referring to the Width and Height properties of TRect, and not TBGRABitmap? What version of FPC are you using? Also, when you right-click on the TRect part of the variable declaration "Rect: TRect" (at line 722 of my most recent upload) and choose "find declaration of TRect", which file exactly are you brought to?

Additionally, what happens if you change the variable name "Rect" to "ARect"? (Make sure you change it in all the places it occurs in the overall UpdateButtonImage procedure, obviously.) This is what I would probably have called it from the outset had I originally written the method myself, as there is of course an RTL method also called Rect that returns a TRect. (And in my experience variables that have the same name as methods that are visible to the unit they're declared in are almost always bad news bears.) It's not unlikely that the naming conflict could be at least part of your issue...
« Last Edit: August 21, 2017, 04:19:06 am by Akira1364 »

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: Graphics Contest 2017, please vote now!
« Reply #305 on: August 21, 2017, 10:20:27 am »
That has been the case with all of the zip files I've uploaded. I've never included the entire project tree. It's always just been those three files.
Ah...  I've probably been confused because I've also been downloading Handoko's files as well - though keeping each in separate folders!

Quote from: Akira1364
Regarding your problem though.. that is extremely strange! I honestly don't think it has anything to do with BGRABitmap at all. Is it possible that the compiler is referring to the Width and Height properties of TRect, and not TBGRABitmap? What version of FPC are you using?
The error is flagged at line 736 :
Code: Pascal  [Select][+][-]
  1.   Thumbnail := TBGRABitmap(BaseImage.Resample(ARect.Width, ARect.Height));
Using FPC 3.0

Quote from: Akira1364
Also, when you right-click on the TRect part of the variable declaration "Rect: TRect" (at line 722 of my most recent upload) and choose "find declaration of TRect", which file exactly are you brought to?
Classesh.inc - line 28
Code: Pascal  [Select][+][-]
  1.    TRect=Types.TRect;

Quote from: Akira1364
Additionally, what happens if you change the variable name "Rect" to "ARect"? (Make sure you change it in all the places it occurs in the overall UpdateButtonImage procedure, obviously.)
As you can see from the first 'Code' extract above, did that - 9 occasions - but no change to the result.
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Graphics Contest 2017, please vote now!
« Reply #306 on: August 21, 2017, 10:23:15 am »
Have you tried to delete the lib folder. I ever have weird issue happened after I combined codes from different version. It worked just weird, even I rebuilt the project. It solved after I delete the lib folder. Maybe you can try to do the same.

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: Graphics Contest 2017, please vote now!
« Reply #307 on: August 21, 2017, 10:48:01 am »
Have you tried to delete the lib folder.
Yes - it went with the first clear-out.
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: Graphics Contest 2017, please vote now!
« Reply #308 on: August 21, 2017, 11:11:01 am »
glSlideshow version 0.95

--- edit ---
Almost forget to mention, the code needs LazOpenGLContext package to compile. To enable it:
Lazarus main menu > Package > Install/Uninstall Packages > select: LazOpenGLContext 0.0.1 > click: Install Selection > Save and rebuild IDE.

I'm having a similar problem compiling this version as I have with Akira's 

uniGraphics.pas(108,8) Error: identifier idents no member "Height"

A total of 23 errors between lines 108 and 143 of uniGraphics.pas  ie. anywhere ther is a mention of Rect.Width or Rect.Height.
TRect again points to Types.TRect in classesh.inc as expected.

In case I had some residual code conflicts I again cleared the folder completely before downloading and extracting the .ZIP file again.

I also tested after adding the LazOpenGLContext package - just in case that solved both issues - irrespective of the lack of any logic in that action  :)
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Graphics Contest 2017, please vote now!
« Reply #309 on: August 21, 2017, 11:30:48 am »
glSlideshow version 0.95

--- edit ---
Almost forget to mention, the code needs LazOpenGLContext package to compile. To enable it:
Lazarus main menu > Package > Install/Uninstall Packages > select: LazOpenGLContext 0.0.1 > click: Install Selection > Save and rebuild IDE.

I'm having a similar problem compiling this version as I have with Akira's 

uniGraphics.pas(108,8) Error: identifier idents no member "Height"

A total of 23 errors between lines 108 and 143 of uniGraphics.pas  ie. anywhere ther is a mention of Rect.Width or Rect.Height.
TRect again points to Types.TRect in classesh.inc as expected.

In case I had some residual code conflicts I again cleared the folder completely before downloading and extracting the .ZIP file again.

I also tested after adding the LazOpenGLContext package - just in case that solved both issues - irrespective of the lack of any logic in that action  :)
Can it be a difference on fpc version? for example you are using version 3 and those are in trunk? http://forum.lazarus.freepascal.org/index.php?topic=29450.0
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: Graphics Contest 2017, please vote now!
« Reply #310 on: August 21, 2017, 11:50:00 am »
Can it be a difference on fpc version? for example you are using version 3 and those are in trunk? http://forum.lazarus.freepascal.org/index.php?topic=29450.0
The logic seems sound taazz.  I've been investigating a bit deeper - by tracing back through the definitions from Rect : TRect   ->  TRect=Types.TRect   ->   TRect = Windows.TRect   ----  eventually getting to :
Code: Pascal  [Select][+][-]
  1.      RECT = record
  2.           case Integer of
  3.              0: (Left,Top,Right,Bottom : Longint);
  4.              1: (TopLeft,BottomRight : TPoint);
  5.           end;
  6.      LPRECT = ^RECT;
  7.      _RECT = RECT;
  8.      TRECT = RECT;
  9.  
...in struct.inc

and of course there is no Height or Width mentioned!

It may well be that I will have to await the posting of a compiled binary to see the full working programs. It had occurred to me that I might try to add a 'Save Project' option to Handoko's V0.95 but that aspiration has just disappeared  :(
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Graphics Contest 2017, please vote now!
« Reply #311 on: August 21, 2017, 02:08:48 pm »
glSlideshow Version 0.96

Changes:
Nothing special, just made it compilable on some FPC/Lazarus combinations.

Hello, I made a quick fix for "cannot compile issue" (TRect related). Please test it.

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: Graphics Contest 2017, please vote now!
« Reply #312 on: August 21, 2017, 03:08:08 pm »
glSlideshow Version 0.96
I made a quick fix for "cannot compile issue" (TRect related). Please test it.
Hooray!  -  successful compile  using FPC 3.0/Laz 1.6   :D 

HOWEVER  (sorry Handoko!)  -   I have a destructive streak !!   >:D 
-   Selecting images on my system at random I find some kill the program and others display 'jagged' - broken up - though I can't now find one to attach as a screen-shot.

I've put 4 on my site  -  www.crescentcomputing.co.uk/LAZ/handoko  -  for you to test on your system.
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: Graphics Contest 2017, please vote now!
« Reply #313 on: August 21, 2017, 03:39:54 pm »
Everything is working correctly here on my Linux64. I need more information.

J-G

  • Hero Member
  • *****
  • Posts: 953
Re: Graphics Contest 2017, please vote now!
« Reply #314 on: August 21, 2017, 05:11:41 pm »
Everything is working correctly here on my Linux64. I need more information.
That is good to know at least.

As you can see from the attached screen-shot the basic appearance is not the same as yours, in-as-much-as the [ProportionalScaling] box overwrites the [Background] button and there is no annotation on the slider bars. This screen grab was prior to [Run] of course and since the file is approaching the max allowable size, I'll post another three shots of just the view-area grabbed during a run.
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

 

TinyPortal © 2005-2018