<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - EMF+ rendering problems"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114738">114738</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>EMF+ rendering problems
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.4.4.2 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bugreporter70@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=138713" name="attach_138713" title="Test EMF+ file in dual EMF/EMF+ format.">attachment 138713</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=138713&action=edit" title="Test EMF+ file in dual EMF/EMF+ format.">[details]</a></span>
Test EMF+ file in dual EMF/EMF+ format.

I'm a software developer and recently added transparency support to my app
using GDI+ which requires EMF+ for transparency support when exporting.

Although my EMF+ images appear fine in MS Office, they aren't rendered properly
in LibreOffice 5.4.4.2. I later installed 6.0 and although some issues were
fixed, some things were made much worse.

1. Prior to 6.0, rotated text was rendered as horizontal text. In 6.0, the
rotated text doesn't appear at all.

2. 5.4 properly renders colors with transparency. 6.0 renders colors with
transparency as totally opaque.

I've cobbled together some source code from MSDN that demonstrates the
problems. I was originally testing the code against 5.4 so some issues have
already been fixed in 6.0.

        Metafile metafile(L"test.emf", hdc, EmfTypeEmfPlusDual, NULL);
        {
                Graphics graphics(&metafile);
                SolidBrush solidBrush(Color(255, 0, 0, 255));
                SolidBrush transparentBrush(Color(128, 0, 0, 255)); // 6.0
renders as opaque
                Pen bluePen(Color(255, 0, 0, 255));
                Pen greenPen(Color(255, 0, 255, 0));

                // Issue #1: 5.4 can't render bezier spline. Fixed in 6.0
                graphics.DrawBezier(&bluePen, 30, 20, 80, 60, 120, 180, 140,
50);

                // Issue #2: 5.4 draws text but won't rotate it. 6.0 renders
nothing.
                // Add some text (drawn with antialiasing) to the metafile.
                FontFamily fontFamily(L"Arial");
                Gdiplus::Font font(&fontFamily, 24, FontStyleRegular,
UnitPixel);
                graphics.SetTextRenderingHint(TextRenderingHintAntiAlias);
                graphics.DrawString(L"Transparent Text", 16, &font, 
                        PointF(50.0f, 50.0f), &transparentBrush);
                graphics.RotateTransform(30.0f);
                graphics.DrawString(L"Rotated Text", 12, &font, 
                        PointF(50.0f, 50.0f), &solidBrush);
                graphics.ResetTransform() ;

                GraphicsPath clip;
                clip.AddRectangle(Rect(150, 10, 20, 50));
                graphics.SetClip(&clip);
                // Add an ellipse (drawn with antialiasing) to the metafile.
                graphics.SetSmoothingMode(SmoothingModeHighQuality);
                graphics.FillEllipse(&transparentBrush, Rect(150, 10, 25, 75));
                graphics.ResetClip();

                // Issue #3: 5.4 doesn't support ResetClip() so the following
will be clipped out. Fixed in 6.0.
                // Avoided problem by using Save/Restore of graphics state
instead.

                // Add a rectangle and an ellipse to the metafile.
                graphics.DrawRectangle(&greenPen, Rect(50, 10, 25, 75));
                graphics.DrawEllipse(&greenPen, Rect(100, 10, 25, 75));
        }</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>