bgrabitmap / lazpaint

🎨 Cross-platform image editor with raster and vector layers similar to Paint.Net written in Lazarus (Free Pascal)
https://lazpaint.github.io/
GNU General Public License v3.0
401 stars 55 forks source link

mirror painting or mandala #94

Open lainz opened 4 years ago

lainz commented 4 years ago

In the other issue *suggestion, i recommended you to try pixelitor, when painting with the brush it has mirror effect, to duplicate the drawing in the other side, four sides, etc.

Another thing that can be really nice is to paint mandalas, where the content is duplicated around the center, like a lot of mirrors around a circle. I dont thing this is hard to do, well for me yes I can not imagine how to do it...

circular17 commented 4 years ago

I see. Well indeed that's not so complicated.

circular17 commented 4 years ago

In fact, this can be done now by duplicating the layer and the flipping it horizontally and vertically.

lainz commented 4 years ago

Great, im not painting too much lately but I will try the newest additions when you are ready to release them. BTW using lazpaint in all regular work in the day to take screenshots of the screen and crop these images, picking colors as well.

circular17 commented 4 years ago

These features already exist. I am not talking here about doing it in real time. But you can draw some lines, and then duplicate the layer and flip it. And you would get a similar result.

Though that may not be handy enough. If that's the case, I would remove the low priority tag.

lainz commented 4 years ago

No it's ok. I'm just saying that I'm using lazpaint for that things I know these features already exist these are really nice. It was just a general comment not relevant with the mandala thing.

About the mandala it's ok the low priority. I'm still using lazpaint for these other things. And now I have no tablet to paint so it will be hard to draw a mandala. Better designing one with the vector tools and duplicating / mirroring as you say.

Keep going!

lainz commented 4 years ago

Hey but I have a new android tablet. Maybe we can experiment with it and drawing. I don't promise nothing but I will see if there's a way to use bgrabitmap on android studio or at least draw something with bgra on it.

circular17 commented 4 years ago

Ok I got it.

That would be cool to have BGRA on Android and on iPhone.

lainz commented 4 years ago

Yes. I added a new comment on the forum.

Maybe making a .so library is the way to go. Common code between android and iOS can be shared in the .so and specific platform details in their native languages.

Or use castle game engine that supports android and iOS and it's all fpc to draw the screen but to generate the pixels using bgrabitmap.

Anyways any option requires a more or less complex setup of the environment..

circular17 commented 4 years ago

I don't know as I don't have experience with Android and iOS. I understand that Android and iOS are kind of Linux so that they are similar at some level. Though I remember that Android is based on Java whereas iOS is not.

Doing a library is interesting, though I think that if we can compile it as a library, we can compile a Pascal application as well.

About the rendering context, that's indeed something to consider. BGRABitmap can be used without GUI so this can be used in an application that has another access to the screen. That would be a first step indeed. If that works, we could consider doing a package for those rendering contexts.

lainz commented 4 years ago

Doing a library is interesting, though I think that if we can compile it as a library, we can compile a Pascal application as well.

Yes that's true.

About the rendering context, that's indeed something to consider.

I don't know the details too, since I've not made that kind of programming with Lazarus. But seems that castle game engine is one that's cross platform (desktop and mobile on a single project), we can for example render to texture the canvas and draw on screen, like you did for opengl? There's no LCL for iOS and Android. On Android there is LAMW for GUI, but I don't know if there is something like LAMW for iOS. So we can have one project for all with castle game engine, or have different projects for each OS if there's no cross platform GUI.

I know someone did a game for iOS using the .so trick (a bomberman game that don't remember the website and published in the app store), but is too much work and we need to debug 2 things insted of one (the library and the application), so I as well prefer to compile the program that the bgrabitmap package is already tested.

lainz commented 4 years ago

So basically for now there is no easy way to do mobile cross platform in Lazarus. There's no easy full support for web compilation too so better stick with the good lazpaint for desktop until we can experiment something in the future.

circular17 commented 4 years ago

Yeah. If we can make it work well for desktop that's already great.

fredvs commented 4 years ago

Doing a library is interesting, though I think that if we can compile it as a library, we can compile a Pascal application as well.

uos: https://github.com/fredvs/uos

has a library version that can produce native Java library too. https://github.com/fredvs/uoslib

The library loaded by Java applications on Intel cpu works perfectly. Also tested on Android machine, with a application done with Android SDK and it works too.

For this, uos uses a "uos_flat.pas" unit that converts all OOP methods of "uos.pas" into simple exported methods compatible for universal native library .