burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.07k stars 981 forks source link

Set shape opacity on shapeBuilder doesn't work #516

Closed lolegrand closed 1 year ago

lolegrand commented 1 year ago

Describe the bug The opacity is not set when using "withShapeOpacity" on shape builder.

To Reproduce Steps to reproduce the behavior:

  1. Create a new ShapeBuilder
  2. Set the opacity using withShapeOpacity method
  3. set the shape on the photoEditor using the setShape method

Expected behavior Set the opacity

Smartphone Info:

Code sample

    override fun onClickValidateColor(color: Int, opacity: Int, brush: Int) {
        photoEditor.setBrushDrawingMode(true)

        val shapeBuilder = ShapeBuilder()
            .withShapeOpacity(opacity * 255 / 100)
            .withShapeSize(brush.toFloat())
            .withShapeColor(color)

        photoEditor.setShape(shapeBuilder)

        this.opacity = opacity
        this.brush = brush
        this.color = color
    }
wasky commented 1 year ago

Duplicate of #493. Fixed by #495.

burhanrashid52 commented 1 year ago

Duplicate of #493. Fixed by #495.

The only thing pending from my side is to publish this on maven.

lolegrand commented 1 year ago

Oh, sorry i hadn't noticed the issue. Good work for the lib otherwise 👍

burhanrashid52 commented 1 year ago

Please check this in the newly Published 3.0.0 version. If it still persists then please reopen this issue.

gabrielnakhata commented 1 year ago

@burhanrashid52, Good Afternoon! #493 -> #495 has already been validated and accepted, but has not yet been published on maven.

wasky commented 1 year ago

The fix is already released in version 3.0.0.

gabrielnakhata commented 1 year ago

hey @wasky it's true i forgot to update to 3.0.0, rsrs :)