We have added a new graphics::Graphics API for rendering 2D graphics. It is pretty similar to the old gfx::Graphics used by the FWT engine. This build includes two implementation of this API:
You can run the testGraphics pod to see both implementations side-by-side. Note on OS X you must remove the -XstartOnFirstThread option from the bin/fanlaunch script.
This feature adds a bunch of new APIs to the graphics API:
New graphics APIs: GraphicsEnv, Graphics, Image, Stroke, Paint
Canvas rendering via Elem.renderCanvas
New Java2D graphics implementation
Deprecate Font.metrics & DeviceContext in favor of Graphics.metrics
Deprecate Int/Float clip in favor of clamp
Duration.clamp
Str.eachWhile
WebOutStream.main
ConcurrentMap.getAndSet
dom: ResizeObserver
SlimerDudeTue 26 Apr 2022
Hooray! :)
LightDyeSat 14 May 2022
This is awesome Brian. Good job Fantom team. I'm liking the new additions, including the Graphics API.
Just wanted to mention that I downloaded it on my Mac using Firefox and I have had no issues. However, I tried to download it on a Windows PC where I have to use Chrome unfortunately, and it won't let me saying "fantom-1.0.78.zip is not commonly downloaded and may be dangerous". Of course any powerful tool can be dangerous if misused, but the way that's presented by Google Chrome may discourage people from downloading Fantom unfortunately. The reason given by Chrome is " Uncommon: You tried to download an unfamiliar and potentially dangerous piece of software."
I believe this only occurs when Chrome is set to use "Safe Browsing with enhanced protection", but still, I wonder if is there anything that could be done with Google to prevent Chrome from misleading people about Fantom.
brianMon 16 May 2022
The reason given by Chrome is " Uncommon: You tried to download an unfamiliar and potentially dangerous piece of software."
I expect that is because there is a batch file in it. But the download is straight from github so I am not sure there anything we can do to mitigate that issue.
brian Tue 26 Apr 2022
New Graphics API
We have added a new
graphics::Graphics
API for rendering 2D graphics. It is pretty similar to the old gfx::Graphics used by the FWT engine. This build includes two implementation of this API:dom::Elem.renderCanvas
You can run the
testGraphics
pod to see both implementations side-by-side. Note on OS X you must remove the-XstartOnFirstThread
option from the bin/fanlaunch script.This feature adds a bunch of new APIs to the
graphics
API:graphics::GraphicsEnv
: controller for environmentgraphics::Image
: bitmap or vector graphics assetgraphics::Stroke
: stroke width, caps, joins, dashesgraphics::Paint
: future base type for gradients, image fillsNew APIs
Misc new APIs:
sys::Int.clamp
sys::Float.clamp
sys::Duration.clamp
sys::Str.eachWhile
concurrent::ConcurrentMap.getAndSet
dom::ResizeObserver
web::WebOutStream.main
Change Log
Build 1.0.78 (26 Apr 2022)
SlimerDude Tue 26 Apr 2022
Hooray! :)
LightDye Sat 14 May 2022
This is awesome Brian. Good job Fantom team. I'm liking the new additions, including the Graphics API.
Just wanted to mention that I downloaded it on my Mac using Firefox and I have had no issues. However, I tried to download it on a Windows PC where I have to use Chrome unfortunately, and it won't let me saying "fantom-1.0.78.zip is not commonly downloaded and may be dangerous". Of course any powerful tool can be dangerous if misused, but the way that's presented by Google Chrome may discourage people from downloading Fantom unfortunately. The reason given by Chrome is " Uncommon: You tried to download an unfamiliar and potentially dangerous piece of software."
I believe this only occurs when Chrome is set to use "Safe Browsing with enhanced protection", but still, I wonder if is there anything that could be done with Google to prevent Chrome from misleading people about Fantom.
brian Mon 16 May 2022
I expect that is because there is a batch file in it. But the download is straight from github so I am not sure there anything we can do to mitigate that issue.