Coder Social home page Coder Social logo

Comments (10)

PaNaVTEC avatar PaNaVTEC commented on July 17, 2024

At this time you can use "drawableView.setBackground..." But I don't think is a good idea because at each draw will re-paint the background + gestures. I will think on that.

from drawableview.

omidaminiva avatar omidaminiva commented on July 17, 2024

yes I agree it is not a good idea since you cannot choose the scaletype for background. I will look forward to see this feature on this library.

from drawableview.

PaNaVTEC avatar PaNaVTEC commented on July 17, 2024

In the develop branch you can set background color and border color for canvas. I will look for a better solution for draw a bitmap.

from drawableview.

omidaminiva avatar omidaminiva commented on July 17, 2024

I tried the bg color and border and it works great.

from drawableview.

jongha avatar jongha commented on July 17, 2024

Nice. When it will stable release?

from drawableview.

amigax avatar amigax commented on July 17, 2024

did this ever get done ?

from drawableview.

PaNaVTEC avatar PaNaVTEC commented on July 17, 2024

As I was saying previously, nothing stops you to do: drawableView.setBackground...

The optimization for that never got implemented, feel free to submit PRs with a better implementation, I will gladly take a look and merge it 👍

from drawableview.

amigax avatar amigax commented on July 17, 2024

Thanks I managed to hack a solution together, will make it more elegant. But basically it involves painting a bitmap and scaling it up to the canvas size, it runs fast if the bitmap is not huge :) Great lib btw, thank you for your hard work.

from drawableview.

amigax avatar amigax commented on July 17, 2024

Actually I really cannot understand why the background is getting scaled each time even when it is in a different view behind this one. Real shame.

from drawableview.

JorgeAmVF avatar JorgeAmVF commented on July 17, 2024

I tried the bg color and border and it works great.

@omidaminiva, could you, please, inform how did you achieve that?

I tried using the develop-branch methods, however, I couldn't achieve that not even by setting the background programatically as it gets the color, but when I save the image into the gallery, it gets a black background as if it's transparent and whether I set the background from the layout it gets over the drawing stroke.

I might be overlooking something, so any help would be appreciated.

from drawableview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.