Skip to content

Shape appply fillpaternImage + opacity #2438

Open

Description

Hi
I have face the problem that when I apply opacity that 0<opacity<1 for the Konva.Path node. It makes my image rendering wrong. But it still work correctly for the opacity 1

const shapeNode = new Konva.Path({
id,
width,
height,

  stroke,
  strokeWidth: shapeStrokeWidth,
  fillPatternRepeat: 'no-repeat',
  data: path,
  opacity, // apply it here
});

if (src) {
try {
const image = await loadImage(imagePath);
shapeNode.fillPatternImage(image as any);

  } catch (error: any) {
    console.error(`Failed to load image: ${error.message}`);
  }
}

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions