Code Monkey home page Code Monkey logo

Comments (7)

burhanrashid52 avatar burhanrashid52 commented on May 18, 2024

if you have enabled setPinchTextScalable(true) than you can rotate the sticker using pinch i.e rotate using two fingers

from photoeditor.

tulang3587 avatar tulang3587 commented on May 18, 2024

Sorry, I meant flipping as in mirroring the image would be a good addition.

from photoeditor.

burhanrashid52 avatar burhanrashid52 commented on May 18, 2024

Any general use case for mirroring sticker ?

from photoeditor.

tulang3587 avatar tulang3587 commented on May 18, 2024

I think it's a pretty common function in sticker editing apps. Right now manually adding a mirrored bitmap works, but won't it be better if the functionality is available from the library itself?

Probably by adding a 'flip' button on the frame (like the old Aviary SDK):

1 cldzuyzmbypyxq8hu8xuzw

from photoeditor.

burhanrashid52 avatar burhanrashid52 commented on May 18, 2024

As of now their is no scope for this feature in the library.Hence as alternate solution you can mirror the bitmap before adding it to PhotoEditorView

This code will mirror the bitmap

BitmapDrawable flip(BitmapDrawable d)
{
    Matrix m = new Matrix();
    m.preScale(-1, 1);
    Bitmap src = d.getBitmap();
    Bitmap dst = Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), m, false);
    dst.setDensity(DisplayMetrics.DENSITY_DEFAULT);
    return new BitmapDrawable(dst);
}

Ref: https://stackoverflow.com/questions/7925278/drawing-mirrored-bitmaps-in-android

from photoeditor.

tulang3587 avatar tulang3587 commented on May 18, 2024

Yeah, I suppose we can use that option instead. I'll close this issue.

Thanks for this library!

from photoeditor.

burhanrashid52 avatar burhanrashid52 commented on May 18, 2024

Your welcome :)

from photoeditor.

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.