Bug 105822 - "Magnetic disk / Direct access storage / Direct data" shapes' rendering broken with transparency
Summary: "Magnetic disk / Direct access storage / Direct data" shapes' rendering broke...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: easyHack
Depends on:
Blocks: Gallery Shapes
  Show dependency treegraph
 
Reported: 2017-02-07 10:09 UTC by Nil
Modified: 2025-10-01 13:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Half transparent "Magnetic Disc" (6.86 KB, image/png)
2017-02-07 10:09 UTC, Nil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nil 2017-02-07 10:09:24 UTC
Created attachment 130973 [details]
Half transparent "Magnetic Disc"

Hello!

What I have done:
* I placed a "Magnetic Disc" on the drawing area (blue cylinder) and I went to its properties / Area / Transparency setting. Chose solid and set 50% transparency.

Expected behavior:
* A similar blue cylinder than the original with half transparency

Actual behavior:
* The lower half of the ellipse on top seems to be rendered twice. See attachment.

Regards,
Darabos, Edvárd Konrád

Version: 5.2.5.1 (x64)
Build ID: 0312e1a284a7d50ca85a365c316c7abbf20a4d22
CPU Threads: 8; OS Version: Windows 6.1; UI Render: default; 
Locale: en-US (en_US); Calc: group
Comment 1 Regina Henschel 2017-02-07 12:45:34 UTC
I see the problem in too. It occurs already in OpenOffice.

You can use the cylinder from the "Basic Shapes". It has a similar problem, that the upper part is not a transparent as expected, but there it effects the entire ellipse and that does not look so ugly.
Comment 2 QA Administrators 2018-02-08 03:35:14 UTC Comment hidden (obsolete)
Comment 3 Roman Kuznetsov 2018-06-29 19:40:27 UTC
still repro in 

Version: 6.1.0.0.beta2+ (x64)
Build ID: fe1a23b5c49c94410a604c8d4a6f50f43d575403
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:libreoffice-6-1, Time: 2018-06-17_06:31:41
Locale: ru-RU (ru_RU); Calc: CL
Comment 4 QA Administrators 2019-06-30 02:51:00 UTC Comment hidden (obsolete)
Comment 5 Nil 2019-06-30 08:29:12 UTC
Problem still exists.

Version: 6.2.4.2 (x64)
Build ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU threads: 8; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: hu-HU (en_US); UI-Language: en-US
Calc: threaded
Comment 6 QA Administrators 2021-06-30 03:54:45 UTC Comment hidden (obsolete)
Comment 7 Stéphane Guillou (stragu) 2023-10-01 22:21:23 UTC
Still reproduced in recent trunk build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e9a0c97de95688b2f86bbb4dd8c823af5442401c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Same with:
* Shapes > Flowchart > Direct access storage
* Gallery > Flow chart > Direct data
Comment 8 QA Administrators 2025-10-01 03:12:39 UTC Comment hidden (obsolete)
Comment 9 Regina Henschel 2025-10-01 09:54:13 UTC
It is still a problem in Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b1c0c4838d2e006ffa8e72516569ce8d13bdbe01
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

For the Magnetic disk I see the following reason:

The current commands in file markup to draw the path are:
draw:enhanced-path="
M 0 3400 Y 10800 0 21600 3400 L 21600 18200 Y 10800 21600 0 18200 Z N
M 0 3400 Y 10800 6800 21600 3400 N
"
The part `M 0 3400 Y 10800 6800 21600 3400 N` draws the upper down arc. It is an open path, but nevertheless it is filled. The start and end point are connected with a fictive line and that area is then filled. This part needs an additional NOFILL command. In file markup it would be `M 0 3400 Y 10800 6800 21600 3400 F N`

The definition for this shape is in msoFlowChartMagneticDisk in https://opengrok.libreoffice.org/xref/core/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx?r=254546523f2b77e1f79a60b73712e04f233136a3#5592

There the "nofill" command has to be added to mso_sptFlowChartMagneticDiskSegm[]
Instead of
{
    0x4000, 0xa802, 0x0001, 0xa802, 0x6000, 0x8000,
    0x4000, 0xa802, 0x8000
};
it has to be
{
    0x4000, 0xa802, 0x0001, 0xa802, 0x6000, 0x8000,
    0x4000, 0xa802, 0xaa00, 0x8000
};

The F for "nofill" in file markup corresponds to 0xaa00 in the shape definitions.

Find more about the custom-shapes in https://wiki.documentfoundation.org/Development/Custom_Shape_Orientation_Guide

I have not examined the other mentioned shapes.

At least for the FlowChartMagneticDisk this can be an easy-hack.
Comment 10 Regina Henschel 2025-10-01 13:13:12 UTC
propose it as easyhack