Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Bug with ellipse command and using MakeColor() with alpha value.

Author
Message
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 25th Jun 2021 14:59
Paul (or anybody in-the-know) -

The "What's New" notes for Build 2020.11.16 include

DrawLine, DrawBox, and DrawEllipse now accept colors with alpha values to draw partially transparent shapes

Using the MakeColor() command with a 4th parameter for alpha level works, but when the ellipse shape is drawn with a partially transparent color, there is a problem.

In the example ellipse I've included here, you can see a square shape in the ellipse, and also a cross-hair.



The DrawBox() command works fine, no problem.

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 25th Jun 2021 19:06 Edited at: 25th Jun 2021 19:29


are you on WIN, Rich?

added to Git
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]

Attachments

Login to view attachments
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 26th Jun 2021 16:37
Yes, Windows10, using the June updated AGK2 Classic in Tier 1.

Thanks for posting in the git, I went there but didn't see a section for AppGameKit classic.
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Jul 2021 04:06
If I had to take a guess, the issue was probably always there but without alpha values it was never apparent until now. It looks like it's calculating the alpha pixel in some areas more than once, having an additive effect. The crosshair could be a simple precision issue with how it fills the circle, because it only needs to calculate pixel positions for a quarter of the circle and a simple translation of that quarter to the other 3 quadrants.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 14th Jul 2021 21:36
"The crosshair could be a simple precision issue with how it fills the circle, because it only needs to calculate pixel positions for a quarter of the circle and a simple translation of that quarter to the other 3 quadrants."

Interesting point, and one to keep in mind when looking for maximum efficiency when coding anything involving horizontal/vertical symmetry!

Login to post a reply

Server time is: 2024-03-29 06:36:41
Your offset time is: 2024-03-29 06:36:41