An issue with the stroke alignment using Plugin API

Hi Penpot community,

I’m building a plugin that manages color palette, and I’m struggling with the Boards I generate using the Plugin API.

As you can see in the attachment, the strokes are set to “inner” (sorry for the French word “intérieur”, it actually means “inner”), but they appear to be put on “center” on the canvas. When I put the strokes on “outer”, then “inner”, the issue is resolved.

Here is the code snippet I used to configure the strokes:

shape.strokes = [
      {
        strokeColor: '#000000',
        strokeOpacity: 0.05,
        strokeAlignment: 'inner',
        strokeWidth: 1,
      },
    ]

Here is another picture to illustrate the issue:

The Boards are pretty complex, with a lot of flexible items, depending on the number of color shades.
I can share my document if you need a deeper investigation.

It looks like you’ve found a bug :open_mouth:

I’ve added it to our issue tracker, we’ll fix it eventually (Taiga).

Thanks for the report!

1 Like

I’m making Pepot struggle with my generated documentation haha :joy:

Thanks for having reported this bug @myfunnyandy :grinning_face_with_smiling_eyes:

1 Like