Setting antialias of window to true affects sourceRect

Need help with a script? This is the place to discuss how to get your code running!

Setting antialias of window to true affects sourceRect

Postby HairyHighlandCow » Thu Mar 16, 2017 8:01 am

When the new antialias property of a window is set to true in SC 4.8, graphics containing picturedata and using a custom sourcerect do not display the image correctly.

I've attached an example image: here the picturedata is a sprite with two lozenges on top of each other. Normally only one of these should appear in the graphic. However, when the antialias of the window is set to true, the sourcerect is ignored and a squished version of the whole sprite appears inside the graphic.

sourceRect-issue.jpg
sourceRect-issue.jpg (9.69 KiB) Viewed 736 times


All the best,

Alec
Externals, projects and software made with SC:
www.hairyhighlandcow.net/software/SC-projects.html
User avatar
HairyHighlandCow
 
Posts: 256
Joined: Sun Jul 06, 2008 1:45 pm
Location: London, UK

Re: Setting antialias of window to true affects sourceRect

Postby sctell » Thu Mar 16, 2017 11:04 am

I can confirm having also noticed this.


All the best

Terry
sctell
 
Posts: 1150
Joined: Sun Jul 06, 2008 10:41 am

Re: Setting antialias of window to true affects sourceRect

Postby codegreen » Thu Mar 16, 2017 11:23 am

Thanks for the heads-up.

PictureData is another area where I didn't have time to completely nail down everything before b25 expired.

I don't know if it's mentioned in the release notes, but PD is now by default all being drawn with Quartz instead of QuickDraw. This changes the gamma curves slightly and adds antialiasing and superior scaling, but it also played havoc with the dozens of pages of gruesome low-level code that actually implement all the various PD placement, scaling, stretching, and clipping options (which now operate in an inverted coordinate space).

Unlike the rest of the updated PD code due to time constraints I don't think the revised sourceRect section was even tested, so I'm not really shocked it has issues...

-Mark
codegreen
 
Posts: 1556
Joined: Mon Jul 14, 2008 11:03 pm

Re: Setting antialias of window to true affects sourceRect

Postby HairyHighlandCow » Fri Mar 24, 2017 4:38 am

Well, it's cool to see anti-aliased native draw graphics in SC. Thanks again for all your hard work!
Alec
Externals, projects and software made with SC:
www.hairyhighlandcow.net/software/SC-projects.html
User avatar
HairyHighlandCow
 
Posts: 256
Joined: Sun Jul 06, 2008 1:45 pm
Location: London, UK


Return to Scripting in SuperTalk

Who is online

Users browsing this forum: No registered users and 1 guest

cron