Hello.
Point(x,y) returns right color under Windows, but wrong color under Linux and Mac OS
From same source - under Windows I got C0C0C0 color ,under Linux - 3C0000.
x,y coordinates is doesn't matter.
Best Wishes.
// Moved from "Bugs - Linux" to "Linux" (Kiffi)
Point(x,y) returns wrong collor
-
- Enthusiast
- Posts: 125
- Joined: Wed May 20, 2020 5:19 pm
- Location: The 3rd planet in the Solar System
- Contact:
Point(x,y) returns wrong collor
Mac Studio M1Max, PB 6.03Arm64 and x64.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Point(x,y) returns wrong collor
Hello dibor
Windows defaults to RGB format. Perhaps Linux and MAC are using a different format/colour space?
Edit: Apple's own colour picker has issues (or at least confusion):
https://apple.stackexchange.com/questio ... oose-color
Windows defaults to RGB format. Perhaps Linux and MAC are using a different format/colour space?
Edit: Apple's own colour picker has issues (or at least confusion):
https://apple.stackexchange.com/questio ... oose-color
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Enthusiast
- Posts: 125
- Joined: Wed May 20, 2020 5:19 pm
- Location: The 3rd planet in the Solar System
- Contact:
Re: Point(x,y) returns wrong collor
Hi.
Tnx for answer.
I am do not care about color formats.
Compiler mast to care.
Point function supported by ALL OS's, so I do not need to do any manipulation for getting pixel color in any OS
May be I am wrong or do not understand something
Tnx for answer.
I am do not care about color formats.
Compiler mast to care.
Point function supported by ALL OS's, so I do not need to do any manipulation for getting pixel color in any OS
Code: Select all
If StartDrawing(WindowOutput(#Window_MainWindow)) ;
WinBackColor = Point(0,0)
Debug WinBackColor
StopDrawing()
EndIf
Mac Studio M1Max, PB 6.03Arm64 and x64.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
Re: Point(x,y) returns wrong collor
in this case ... you have to "eat" all events on Linux and Mac, if this "GetWindowColor" is directly after Windowcreation !
Only after the events from the creation process are done, you can read the color. On windows you don't need it, but on the other os.
Only after the events from the creation process are done, you can read the color. On windows you don't need it, but on the other os.
Code: Select all
While WindowEvent() : Wend
If StartDrawing(WindowOutput(#Window_MainWindow)) ;
WinBackColor = Point(0,0)
Debug WinBackColor
StopDrawing()
EndIf
-
- Enthusiast
- Posts: 125
- Joined: Wed May 20, 2020 5:19 pm
- Location: The 3rd planet in the Solar System
- Contact:
Re: Point(x,y) returns wrong collor
Sure, I am take windows color and put it as background color of the canvas buttons.Bisonte wrote:i, if this "GetWindowColor" is directly after Windowcreation !
Mac Studio M1Max, PB 6.03Arm64 and x64.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
Re: Point(x,y) returns wrong collor
That's not what Bisonte wrote.
On Linux and OSX you have to wait until the window creation is complete before you can read the color.
So you have to add a short delay and wait until all (first) window events are finished, like Bisonte wrote in his example.
On Linux and OSX you have to wait until the window creation is complete before you can read the color.
So you have to add a short delay and wait until all (first) window events are finished, like Bisonte wrote in his example.
Last edited by infratec on Wed Jul 08, 2020 12:35 pm, edited 1 time in total.
-
- Enthusiast
- Posts: 125
- Joined: Wed May 20, 2020 5:19 pm
- Location: The 3rd planet in the Solar System
- Contact:
Re: Point(x,y) returns wrong collor
Thank you are Bisonte and infratec
Will try to do so, hope this hepls
Will try to do so, hope this hepls
Mac Studio M1Max, PB 6.03Arm64 and x64.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
-
- Enthusiast
- Posts: 125
- Joined: Wed May 20, 2020 5:19 pm
- Location: The 3rd planet in the Solar System
- Contact:
Re: Point(x,y) returns wrong collor
Thank you again to Bisonte and infratec
Did it !!!
So this is not a bug this is unknowing programming under Linux and OSX(and Windows also)
I am amateur in the programming.
Thank you are again
Code: Select all
While WindowEvent() : Wend
So this is not a bug this is unknowing programming under Linux and OSX(and Windows also)
I am amateur in the programming.
Thank you are again
Mac Studio M1Max, PB 6.03Arm64 and x64.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
Macbook Air M2, PB 6.03Arm64 and x64.
Windows 10, PB 6.03 x64 and x86.
Re: Point(x,y) returns wrong collor
@dibor: No problem. But in the future you should always have bugs confirmed by others before posting them in the bug forum.
Greetings ... Peter
Greetings ... Peter
Hygge