maui icon indicating copy to clipboard operation
maui copied to clipboard

[Shapes] Path render wrong position

Open gxrsprite opened this issue 2 years ago • 8 comments

Description

There is a svg.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1654175462579" class="icon" viewBox="0 0 1024 1024" version="1.1"
    xmlns="http://www.w3.org/2000/svg" p-id="2178"
    xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
    <defs>
        <style type="text/css"></style>
    </defs>
    <path d="M353.6 865.6h-192c-17.6 0-32-14.4-32-32v-704c0-17.6 14.4-32 32-32h640c17.6 0 32 14.4 32 32v256c0 17.6 14.4 32 32 32s32-14.4 32-32v-256c0-52.8-43.2-96-96-96h-640c-52.8 0-96 43.2-96 96v704c0 52.8 43.2 96 96 96h192c17.6 0 32-14.4 32-32s-14.4-32-32-32z"  fill="#13227a"></path>
    <path d="M737.6 289.6c0-17.6-14.4-32-32-32h-448c-17.6 0-32 14.4-32 32s14.4 32 32 32h448c17.6 0 32-14.4 32-32zM257.6 449.6c-17.6 0-32 14.4-32 32s14.4 32 32 32h96c17.6 0 32-14.4 32-32s-14.4-32-32-32h-96z"  fill="#13227a"></path>
    <path d="M948.8 936L892.8 880c89.6-112 81.6-275.2-20.8-379.2-56-56-128-83.2-201.6-83.2s-145.6 27.2-201.6 83.2c-110.4 110.4-110.4 291.2 0 403.2 56 56 128 83.2 201.6 83.2 62.4 0 124.8-20.8 177.6-62.4l56 56c6.4 6.4 14.4 9.6 22.4 9.6s16-3.2 22.4-9.6c12.8-12.8 12.8-32 0-44.8z m-278.4-12.8c-59.2 0-113.6-22.4-156.8-64-41.6-41.6-64-97.6-64-156.8 0-59.2 22.4-113.6 64-156.8 41.6-41.6 97.6-64 156.8-64s113.6 22.4 156.8 64c41.6 41.6 64 97.6 64 156.8 0 59.2-22.4 113.6-64 156.8-43.2 41.6-97.6 64-156.8 64z"  fill="#13227a"></path>
</svg>

And it render in Chrome image

I convert it to xaml render in wpf

    <Viewbox>
        <Grid>
            <Path Data="M353.6 865.6h-192c-17.6 0-32-14.4-32-32v-704c0-17.6 14.4-32 32-32h640c17.6 0 32 14.4 32 32v256c0 17.6 14.4 32 32 32s32-14.4 32-32v-256c0-52.8-43.2-96-96-96h-640c-52.8 0-96 43.2-96 96v704c0 52.8 43.2 96 96 96h192c17.6 0 32-14.4 32-32s-14.4-32-32-32z" Fill="#13227a" />
            <Path Data="M737.6 289.6c0-17.6-14.4-32-32-32h-448c-17.6 0-32 14.4-32 32s14.4 32 32 32h448c17.6 0 32-14.4 32-32zM257.6 449.6c-17.6 0-32 14.4-32 32s14.4 32 32 32h96c17.6 0 32-14.4 32-32s-14.4-32-32-32h-96z" Fill="#13227a" />
            <Path Data="M948.8 936L892.8 880c89.6-112 81.6-275.2-20.8-379.2-56-56-128-83.2-201.6-83.2s-145.6 27.2-201.6 83.2c-110.4 110.4-110.4 291.2 0 403.2 56 56 128 83.2 201.6 83.2 62.4 0 124.8-20.8 177.6-62.4l56 56c6.4 6.4 14.4 9.6 22.4 9.6s16-3.2 22.4-9.6c12.8-12.8 12.8-32 0-44.8z m-278.4-12.8c-59.2 0-113.6-22.4-156.8-64-41.6-41.6-64-97.6-64-156.8 0-59.2 22.4-113.6 64-156.8 41.6-41.6 97.6-64 156.8-64s113.6 22.4 156.8 64c41.6 41.6 64 97.6 64 156.8 0 59.2-22.4 113.6-64 156.8-43.2 41.6-97.6 64-156.8 64z" Fill="#13227a" />
        </Grid>
    </Viewbox>

It also render right. Screenshot in preview window. image

But if put it in maui xaml image All things position is based left 0 top 0

Steps to Reproduce

  1. Create a MAUI App
  2. Add Xaml to MainPage

Version with bug

6.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows, I was not able test on other platforms

Affected platform versions

Windows SDK 10.0.19041.0

Did you find any workaround?

No response

Relevant log output

No response

gxrsprite avatar Jun 02 '22 13:06 gxrsprite

I had tried something like this before in Xamarin forms. The advantage, you can make every path clickable. That would be good if positioned correctly

HausBJB avatar Jun 02 '22 19:06 HausBJB

The start point rendering position of all shapes is incorrect

601093318 avatar Jun 09 '22 01:06 601093318

@jsuarezruiz

601093318 avatar Jun 09 '22 01:06 601093318

not repro with vs main build 32609.239 image

VincentBu avatar Jun 10 '22 03:06 VincentBu

How to use your version "main build 32609.239"

601093318 avatar Jun 10 '22 08:06 601093318

@VincentBu

601093318 avatar Jun 10 '22 08:06 601093318

It's an internal version. You may have to wait for update.

VincentBu avatar Jun 13 '22 01:06 VincentBu

@VincentBu when and in what version is that update comming im running into the exact same Problem with drawing lines.

rxDietel avatar Sep 20 '22 06:09 rxDietel

Verified this on Visual Studio Enterprise 17.6.0 Preview 7.0. This issue does not repro on Windows 11 and Android 13.0 with below Project: 7700.zip

image

XamlTest avatar May 15 '23 07:05 XamlTest

Hi @gxrsprite. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar May 15 '23 07:05 ghost