Stencyl 3.4.0 is now out. Get it now!

[0.41] Bitmap drawing extension

LIBERADO

  • *
  • Posts: 2421
I am testing it, I love this extension.

I see that polygons, bezier curves and lines can not be cleared.
Is it due to some Haxe limitation? Or could it be implemented someday?
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

yoplalala

  • *
  • Posts: 1412
Oh, no , I could implement  it . I'll implement it in the next version if you wish ;)
for the polygons, normally the can be cleared. there should be "outlined, filled, both, clear draw, clear fill, clear both" as an option.

LIBERADO

  • *
  • Posts: 2421
Wow... the new "clear" feature takes into account the opacity level chosen in the "Fill colour" block.
It is fantastic.

<a href="http://www.filz.us/files/91dc0ac3/4bc/BitMap_Utilities_Extension.swf" target="_blank" class="new_win">http://www.filz.us/files/91dc0ac3/4bc/BitMap_Utilities_Extension.swf</a>

Oh, no , I could implement  it . I'll implement it in the next version if you wish ;)
for the polygons, normally the can be cleared. there should be "outlined, filled, both, clear draw, clear fill, clear both" as an option.
  :) Waiting for the next version.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

yoplalala

  • *
  • Posts: 1412
Haha ! Thanks Liberado ! The new version is nearly finished , just missing the xml blocks, there's plenty of  new features :)

yoplalala

  • *
  • Posts: 1412
@Liberado

Here is the new version !

« Last Edit: October 08, 2015, 02:25:58 am by yoplalala »

LIBERADO

  • *
  • Posts: 2421
 :) This extension is being extremely powerful. Thanks again!

I have tested it, and I have found three bugs:

Bug 1:  In the "rectangle" block, the "rotated" value doesn't work when the "clear" option is selected.
Bug 2: In the "round rectangle" block, the "rotated" value doesn't work when the "clear" option is selected.
Bug 3: In the "[draw] at center (x:[ ] y:[ ])..." block, the word "polygon" is missing?

And three suggestions:

Suggestion 1: At the end of the block "Draw image with rotation on image", you could add "using [Effect]" (to select Add, Alpha, Darken, Difference, etc. as in the similar block of the image API)
Suggestion 2: How about if you add also this simple but useful block?: "Rotate [image] (x[ ] y[ ] angle[ ])"
Suggestion 3: Can you do that images rotate with anti-aliasing to prevent the very jagged and unaesthetic lines?

« Last Edit: October 08, 2015, 09:38:51 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

yoplalala

  • *
  • Posts: 1412
The bugs are corrected :)
And your first suggestion is now done.
Quote
Suggestion 2: How about if you add also this simple but useful block?: "Rotate [image] (x[ ] y[ ] angle[ ])"
But I don't think I can do anything for your second suggestion :( Rotation works by applying a matrix when drawing a shape / image.
Quote
Suggestion 3: Can you do that images rotate with anti-aliasing to prevent the very jagged and unaesthetic lines?
And I'm seeing your third suggestion now  :).
Hmm, I think I can.  But I don't see much difference :(

« Last Edit: October 08, 2015, 10:15:56 am by yoplalala »

LIBERADO

  • *
  • Posts: 2421
The bugs are corrected :)
And your first suggestion is now done.
Thanks for fixing the bugs and considering my suggestion.

But I don't think I can do anything for your second suggestion :( Rotation works by applying a matrix when drawing a shape / image.
Ok, I did not know that.

And I'm seeing your third suggestion now  :) .
Hmm, I think I can.  But I don't see much difference :(
In my tests, the lack of auto-aliasing is very noticeable in the image rotation.
I think the anti-aliasing implementation would be a good improvement.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

PhaserRave

  • *
  • Posts: 81
These are great, thanks!
Would it be possible to add blocks for grabbing the image of a tile at a specified row and column? Or maybe to grab the tile image using the tile ID.

« Last Edit: July 12, 2016, 06:01:32 pm by PhaserRave »
"I refuse to answer that question on the grounds that I don't know the answer." -Zaphod Beeblebrox

Max Finch

  • *
  • Posts: 2180
Is there an option to put text on top of an image? Instead of just lines?

That feature combined with the screenshot social media share would make a great tool for custom score sharing

yoplalala

  • *
  • Posts: 1412
You can already draw text with the block  palette/ images / draw on images / draw text on image .
I usually combine this block with the extension :)

Max Finch

  • *
  • Posts: 2180
Ah, haven't used the program in months. Thanks for informing me :)

LIBERADO

  • *
  • Posts: 2421
New Suggestion: @yoplalala, you could add a new "set pixel" block with a field to set the opacity because currently we can't draw individual pixels on transparent images. The current "set pixel" block of the Image API doesn't have a field to set the opacity, so it doesn't work on transparent image areas, it draws nothing!

This problem was commented in the Forum: http://community.stencyl.com/index.php/topic,49189.0.html

« Last Edit: February 20, 2017, 03:52:38 pm by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

yoplalala

  • *
  • Posts: 1412
Here's ba version compatible with Stencyl 3.5 :)
And 2 new blocks.
- set pixel  opacity
- get pixel opacity

For the first one , you need  to put the opacity between 0 and 1.
And the second you receive a value between 0 and 255.
Kind of strange , but I felt the user should get the exact real value with "get".
With set it should be coherent with all other blocks where you set the opacity between 0 and 1.

LIBERADO

  • *
  • Posts: 2421
Awesome! I was waiting for this new feature to be available to finish some of my games.

Thank you very much.  :)
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.