openfl / openfl-html5

[deprecated] OpenFL HTML5 backend
Other
0 stars 1 forks source link

Bitmap fills for LineTo/CurveTo #51

Closed jgranick closed 10 years ago

jgranick commented 10 years ago

51 Issue by lpmitchell,

LineTo and CurveTo don't create the bitmap pattern fill and in most cases will currently draw black shapes.

Simple test project available here: https://dl.dropboxusercontent.com/u/10641626/Github/OpenFL-TestApp.zip

jgranick commented 10 years ago

Comment by lpmitchell:

I've spent some time diving more deeply into the Graphics class and improving its behaviour.

The test app above has been updated to show more drawing functions, here's a screenshot of how flash will render the test: https://db.tt/HbFEIrAC

With the latest commits (about to be added) HTML5 is very close to matching flash: https://db.tt/Au2QOUw4. There are some limitations in HTML5 canvas drawing which make some things difficult (such as changing lineStyle mid-fill).

It doesn't match the behaviour of Neko, which doesn't support repeating fills when a matrix is used: https://db.tt/ryhbRVWc. I used flash as the target for implementation.

jgranick commented 10 years ago

Comment by lpmitchell:

Closing due to deprecation - I'll transition these changes and send a pull request to openfl/openfl