Bug 439759 - Fill Rectangle with pattern in Vector Layer loads damaged pattern after reopen
Summary: Fill Rectangle with pattern in Vector Layer loads damaged pattern after reopen
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Vector (other bugs)
Version First Reported In: 5.2.9
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-11 17:55 UTC by David
Modified: 2025-05-02 07:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Initially exported .svg file (50.77 KB, image/svg+xml)
2021-07-15 19:08 UTC, Ahab Greybeard
Details
exported after importing the initial .svg file (50.93 KB, image/svg+xml)
2021-07-15 19:09 UTC, Ahab Greybeard
Details
Example file with pattern fill on a vector shape (250.29 KB, application/zip)
2024-01-22 11:09 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2021-07-11 17:55:24 UTC
SUMMARY
The pattern is damaged when it's used to fill Rectangle in Vector Layer, the file is saved, Krita is closed, and the file is reopened.

It looks similar to bug ID: 402978.

STEPS TO REPRODUCE
1. Create a vector layer
2. In Patterns, load a custom pattern (BMP file in my case)
3. Create a rectangle filled by the custom pattern from the previous step; a rectangle big enough where the pattern is repeated
4. Save the file
5. Close Krita
6. Reopen the file

OBSERVED RESULT
The pattern in the rectangle is damaged: the pattern appears to get a small grid on top of it.

EXPECTED RESULT
The pattern is not damaged; the pattern is the same as before save.

SOFTWARE/OS VERSIONS
Krita

 Version: 4.4.5
 Languages: en_GB, en, en_US, en, en_GB, en, en_US, en, en_GB, en, en_US, en, en_GB, en, en_US, en, cs_CZ, cs, en_US, en
 Hidpi: true

Qt

  Version (compiled): 5.12.9
  Version (loaded): 5.12.9

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.19043
  Pretty Productname: Windows 10 (10.0)
  Product Type: windows
  Product Version: 10

OpenGL Info
 
  Vendor:  "Google Inc." 
  Renderer:  "ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)" 
  Version:  "OpenGL ES 3.0 (ANGLE 2.1.0.57ea533f79a7)" 
  Shading language:  "OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0.57ea533f79a7)" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
     Version: 3.0
     Supports deprecated functions false 
     is OpenGL ES: true 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsAngleD3D11: true 
  isQtPreferAngle: true
Comment 1 Ahab Greybeard 2021-07-15 19:08:12 UTC
I can replicate and confirm this for the 4.4.0 onwards appimages including the July 13 5.0.0-prealpha (git f5040d8) appimage.

The problem happens when a vector fill pattern is read, i.e. brought into krita.

I made a vector rectangle filled with a star pattern then Layer -> Exported it as 'starpatdirect1.svg' (attached).

That starpatdirect1.svg file is shown correctly by a file viewer and also can be opened and displayed correctly in Inkscape.

If I then Layer -> Import starpatdirect1.svg, the star pattern fill has a grid of transparent lines on it.
Layer - Exporting this as 'starpatdirect2.png' (attached) gives an .svg file that does not show the pattern in a file viewer and is not displayed in Inkscape.

starpatdirect2.svg can be Layer -> Imported into krita to show exactly the same transparent grid on it.

Examination of the .svg files shows a subtle difference in formating and additional transform actions.
Comment 2 Ahab Greybeard 2021-07-15 19:08:46 UTC
Created attachment 140089 [details]
Initially exported .svg file
Comment 3 Ahab Greybeard 2021-07-15 19:09:37 UTC
Created attachment 140090 [details]
exported after importing the initial .svg file
Comment 4 Tiar 2024-01-22 11:09:18 UTC
Created attachment 165124 [details]
Example file with pattern fill on a vector shape

We no longer can create files with pattern fill (see bug 403140), however we can still load them afaik, and I think they still suffer from this issue.

In the attachment, in the original file there was no white cross, and when opening this file in f3bb64bec1 (5.2+, master), a white cross appears in the pattern.