Recent

Author Topic: BGRABitmap (or another) canvas for html  (Read 530 times)

mosquito

  • New Member
  • *
  • Posts: 26
BGRABitmap (or another) canvas for html
« on: February 18, 2021, 10:41:24 am »
With what we have today (transpilers or wasm), could we show a canvas (BGRA or Another) written in fpc in html?
« Last Edit: February 18, 2021, 11:52:24 am by mosquito »

lainz

  • Hero Member
  • *****
  • Posts: 4026
  • Leandro Diaz
Re: BGRABitmap (or another) canvas for html
« Reply #1 on: February 19, 2021, 03:35:23 am »
Not right now.
Why do you need that? In my opinion is better to use a Javascript library. These can do the same that bgrabitmap does, like drawing images, curves, svg all already possible whit the library you like more.
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

mosquito

  • New Member
  • *
  • Posts: 26
Re: BGRABitmap (or another) canvas for html
« Reply #2 on: February 19, 2021, 08:34:52 am »
Thanks. I don't need it for something in particular, but to know if with the current state of pas2js or wasm it was possible to at least display a canvas (not a complete application, lcl, etc.)

Just to know if something written in BGRA would be reusable for the web. I have also seen the possibility of writing inside BGRA with an HTML5 canvas, and I think there is another library in the repo. But it's not what I'm looking for.

lainz

  • Hero Member
  • *****
  • Posts: 4026
  • Leandro Diaz
Re: BGRABitmap (or another) canvas for html
« Reply #3 on: February 19, 2021, 11:24:55 pm »
Well if you use BGRABitmap Canvas2D you can reuse that in the web for sure.

I think for UI is better html and css, and for drawing in the web use a dedicated library, it should be optimized for the web and well tested. There is webgl not only canvas, and that can speed up your drawing.
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

 

TinyPortal © 2005-2018