Skip to content

Shifting of painting after complete drawing #51

Closed Answered by hm21
Chris2137 asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, I did some tests and we have two options now.

Option 1:

To recalculate the layer position, I can add a function inside the ProImageEditorConfigs that allows you to recalculate the position depending on the size of your main editor. It will look like this:

 configs: ProImageEditorConfigs(
  test: (List<Offset?> offsetPositions, Size paintEditorSize, Size mainEditorSize) {
    List<Offset?> updatedOffsetPositions;

    /// recalculate offset position

    return updatedOffsetPositions;
  }
)

In the real function I will also add stroke width and all stuff because you need next to update all offset positions also to scale down the layer. In my opinion, this will be a bit hard because in…

Replies: 1 comment 14 replies

Comment options

You must be logged in to vote
14 replies
@Chris2137
Comment options

@Chris2137
Comment options

@hm21
Comment options

hm21 May 21, 2024
Maintainer

Answer selected by Chris2137
@Chris2137
Comment options

@hm21
Comment options

hm21 May 22, 2024
Maintainer

@Chris2137
Comment options

@Chris2137
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants