sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: [vector_graphics] Optimize paths
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/24_

Original report by @dnfield on Mar 24, 2022

Tessellating paths is showing good results. We should extend this to strokes as well as fills. 

---
Comment by @c-h-i-a-m-a-k-a-2 on Jul 26, 2022
Stats from GPay sample assets:


<img width="593" alt="Screen Shot 2022-07-26 at 11 11 08 AM" src="https://user-images.githubusercontent.com/106709586/181080602-bb9b26af-ab4f-4f33-8262-427957bd677b.png">
Repository: flutter
Issue: [vector_graphics] Add support for relative text sizing
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/45_

Original report by @jonahwilliams on Mar 31, 2022
Repository: flutter
Issue: [vector_graphics] Add support for relative size paths
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/46_

Original report by @jonahwilliams on Mar 31, 2022
Repository: flutter
Issue: [vector_graphics] Consider applying color filters to the rasterized vector graphic instead of the resulting image
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/72_

Original report by @jonahwilliams on May 20, 2022

Context: https://github.com/dnfield/vector_graphics/pull/71/files/f6ebe3b00725a95710a345e9e0642fd2911e69ce#diff-6aefb41d5a9139706f33aa4ae6d68a7ed1c69f1ec5ae78f16dbb1f1cc2bee325

The idea is that since some filter types may be expensive, it could be beneficial to performance to instead rasterize them instead of using Paint on the drawImage call. The trade-off here is that we'd have to re-rasterize if the filter changed
Repository: flutter
Issue: [vector_graphics] Set up Skia Gold
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/76_

Original report by @jonahwilliams on May 21, 2022

This may require moving to a flutter org repo.

I'd like to use an existing SVG test suite to ensure we're rendering correctly, especially as we work on new optimizations and features. I'd also like to not rely so much on customer scubas, as the volume itself is difficult to deal with
Repository: flutter
Issue: [vector_graphics] <image> preserveAspectRatio support
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/112_

Original report by @jonahwilliams on Aug 2, 2022

Currently images are simply stretched to fill the given bounds. We should implement https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio to allow customizing how this behaves
Repository: flutter
Issue: [vector_graphics] runtime themeing of colors
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/119_

Original report by @jonahwilliams on Aug 17, 2022

I've spoken to several client teams that use some combination of SVG parsing and the SVG theme API to provide dynamic colors to an SVG. We should support a compile time option for this, perhaps accepting a map of identifier -> color in the VectorGraphic constructor.

TBD: how should we indicate dynamic color in the SVG?

---
Comment by @dnfield on Aug 17, 2022
I think part of this would be needing to make `currentColor` work.

Do you have some examples of what you'd like to support?

And is this `runtime` or `compiletime` support?

---
Comment by @jonahwilliams on Aug 17, 2022
Does currentColor work with more than one color? It would have to be runtime support, but implemented so that the compiler didn't optimize these colors out 

---
Comment by @dnfield on Aug 17, 2022
No, currentColor is just one color and a hard coded string in the doc.

Every time I've come up against this problem it hasn't been clear to me how to do it in an abstract way short of just offering color filtering. I vaguely remember considering some kind of `Map<Color, Color>` solution, but also being worried it'd get hard to reason about when tranparency/gradients/overlapping colors get involved.

---
Comment by @jonahwilliams on Aug 17, 2022
Yeah, if you have a dynamic color you basically can't do any optimizations/folding with it. I think that could still work, but we'd also still need a way to declare it, and I wonder if we could just steal use css classes or ids?

---
Comment by @dnfield on Aug 17, 2022
It'd help to have some examples of what the internal customers are currently doing and what they expect to achieve.
Repository: flutter
Issue: [vector_graphics] Optimize patterns
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/122_

Original report by @dnfield on Aug 23, 2022

Patterns which only ever tile their image once do not need to create an image shader and can be replaced with a simple draw call.
Repository: flutter
Issue: [vector_graphics] Overdraw optimization can leave artifacts
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/139_

Original report by @dnfield on Oct 3, 2022

This svg:

```
<svg xmlns="http://www.w3.org/2000/svg" 
    xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="57 42 20 20">
    <g>
        <g>
            <path d=" M 77 49.767 L 74.095 49.767 L 74.095 44.905 L 69.233 44.905 L 69.233 42 L 77 42 L 77 49.767 Z " fill="rgb(111,161,234)"/>
            <rect x="70.937" y="42.145" width="2.905" height="8.93" transform="matrix(-0.707,-0.707,0.707,-0.707,90.618,130.756)" fill="rgb(111,161,234)"/>
        </g>
    </g>
</svg>
```

![image](https://user-images.githubusercontent.com/8620741/193667548-4cbef805-be3a-43bd-926b-b92984af9966.png)


---
Comment by @dnfield on Oct 3, 2022
In this case, because the paths are the same color, we could safely merge them instead of creating distinct ones. If they were different colors, we could not and would end up with these AA related issues.
Repository: flutter
Issue: [vector_graphics] Extract Impeller tessellation code to allow for stroke to vertices conversion
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/158_

Original report by @jonahwilliams on Nov 5, 2022

With impeller we believe that this will still be a performant path. Furthermore, it may allow even more SVG simplification if we the overdraw optimizer can work on these paths. FYI @dnfield
Repository: flutter
Issue: [vector_graphics] Combine shapes where possible
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/159_

Original report by @dnfield on Nov 7, 2022

We can do this for shapes with identical painting properties when

- The shapes have no overlap
- Any overlap is completely opaque

This would have the benefit of safely removing overdraw in some cases.
Repository: flutter
Issue: [vector_graphics] Pattern sizing is wrong
Labels: package,team-engine,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/182_

Original report by @dnfield on Feb 13, 2023

The size of the pattern is being calculated - it's being done in reference to the root viewbox instead of the destination shape - this will often mean that the pattern image is being drawn with too much spacing around it instead of tiling nicely inside the shape. I'll file a separate bug for that.

For example, the SVG at https://developer.mozilla.org/en-US/docs/Web/SVG/Element/pattern shoudl show ten repeated "stars" across the first circle, but in our case it's calculating the width of the star image based on the viewbox (so 10% of 230 which is 23) instead of the width of the circle (which is 100, so 10% should be 10).

SVG:

```
<svg viewBox="0 0 230 100" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <pattern id="star" viewBox="0,0,10,10" width="10%" height="10%">
      <polygon points="0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2" />
    </pattern>
  </defs>

  <circle cx="50" cy="50" r="50" fill="url(#star)" />
  <circle
    cx="180"
    cy="50"
    r="40"
    fill="none"
    stroke-width="20"
    stroke="url(#star)" />
</svg>
```
Repository: flutter
Issue: [vector_graphics] Allow transition between placeholder and loaded image to have an animation
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/193_

Original report by @jaggernod on Mar 9, 2023

Images fetched from the network can take significant time to load. 
Unfortunately, when a placeholder is defined and the remote asset is loaded we see an immediate switch (pop-in).

Could we provide animation for the transition or have a crossfade (with user-defined duration) between the placeholder and the final image?

The original `flutter_svg` already had this question [posted](https://github.com/dnfield/flutter_svg/issues/796). 

P.S. Thank you for the package. It is really useful 

---
Comment by @dnfield on Mar 9, 2023
I'm open to this but doubt I will have time to work on it myself anytime soon.
Repository: flutter
Issue: [vector_graphics] Question/Improvement: Invalid double "100%"
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/209_

Original report by @AlexDochioiu on Jul 1, 2023

Hey,

I saw this issue reported in Crashlytics. Seems that one SVG contains a percentage instead of a double value somewhere. Not sure whether this is something that could be supported as a feature, or if it's a bad SVG in the first place. 

Unfortunately my app deals with a lot of unmanaged online content and I do not have means to obtain the actual SVG that caused this issue.

Sorry for being a bit vague ; I don't really have more info I can provide though.

<img width="585" alt="image" src="https://github.com/dnfield/vector_graphics/assets/38853913/d56bd1be-18b7-48b3-ba2d-745d1452f7f8">


---
Comment by @fransdhinta on Oct 3, 2024
I had the same issue, when using the [flutter_svg](https://pub.dev/packages/flutter_svg) package that depends on this package, and saw a similar error. After checking, this was because when calling the **parseDouble** function, it returned double.parse instead of double.tryParse, in my case it tried to parse "none".
I suggest a fix or check this PR: https://github.com/dnfield/vector_graphics/pull/257 to change the return of **parseDouble** to always double.tryParse so that it will return `null` instead of throwing an error if it parses an invalid String
Repository: flutter
Issue: [vector_graphics] not support svg group
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/214_

Original report by @kecson on Sep 7, 2023

https://api-mainnet.suifrens.sui.io/suifrens/0xb58aa2d1d137e480f8bd55094da2bb569cd51e2eb7d9415f7cd5a3c40cbd580b/svg
![](https://user-images.githubusercontent.com/10434414/265985767-eebf7a36-4577-49e2-8524-acc1ae768f83.png)
Repository: flutter
Issue: [vector_graphics] Ignore hits on transparent parts of the image
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/217_

Original report by @bramp on Oct 10, 2023

It seems the entire rectangle of the `RenderVectorGraphic` [absorbs hits](https://github.com/dnfield/vector_graphics/blob/c1782b87502fe0e4760dff748bd0cfdcd9407672/packages/vector_graphics/lib/src/render_vector_graphic.dart#L188) (for example when a user taps the screen).

Would it be possible to adjust the hitTestSelf to only return true if the hit is on a non-transparent part of the SVG?



---
Comment by @dnfield on Oct 10, 2023
That would be expensive and probably not quite the desired behavior in a lot of cases.

Imagine, for example, you have an icon you're painting on a button - you don't want to do expensive hit testing logic to see if the hit falls within some complicated path describing the outline of the icon just to end up getting a hit on the button "under" it...

---
Comment by @bramp on Oct 10, 2023
Oh absolutely, it's not desirable for every use case. Maybe I should have framed it as "Could you make it optional" to ignore hits in the transparent parts of the SVG.

In my use case, I have a circular button drawn as a SVG, and with the current hit test you can hit outside of the bounds of what's visible, which is undesirable.

I suspect the work around, is for me calculating a mask and implementing my own "hit test" on top of the SVG.
Repository: flutter
Issue: [vector_graphics] optimize-clips incorrect with clipPath
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/226_

Original report by @xvrh on Jan 5, 2024

I have this icon

```xml
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="none">
    <defs>
        <clipPath id="a">
            <path fill="#fff" d="M0 0h15v15H0z"/>
        </clipPath>
    </defs>
    <g fill="#374957" clip-path="url(#a)">
        <path d="M11.875 1.25h-.625V.625a.625.625 0 1 0-1.25 0v.625H5V.625a.625.625 0 0 0-1.25 0v.625h-.625A3.129 3.129 0 0 0 0 4.375v7.5A3.129 3.129 0 0 0 3.125 15h8.75A3.129 3.129 0 0 0 15 11.875v-7.5a3.129 3.129 0 0 0-3.125-3.125ZM1.25 4.375A1.875 1.875 0 0 1 3.125 2.5h8.75a1.875 1.875 0 0 1 1.875 1.875V5H1.25v-.625Zm10.625 9.375h-8.75a1.875 1.875 0 0 1-1.875-1.875V6.25h12.5v5.625a1.875 1.875 0 0 1-1.875 1.875Z"/>
        <path d="M7.5 10.313a.937.937 0 1 0 0-1.875.937.937 0 0 0 0 1.874ZM4.375 10.313a.937.937 0 1 0 0-1.875.937.937 0 0 0 0 1.874ZM10.625 10.313a.937.937 0 1 0 0-1.875.937.937 0 0 0 0 1.874Z"/>
    </g>
</svg>
```

When I compile it with `vector_graphics_compiler` like this:

`dart run vector_graphics_compiler -i assets/calendar.svg -o assets/calendar.vec`

<img width="214" alt="Screenshot 2024-01-05 at 11 33 27" src="https://github.com/dnfield/vector_graphics/assets/5110923/286a4574-9405-46df-8856-4a622f59a0ab">

If I pass `--no-optimize-clips` to the compiler, it works correctly.
Repository: flutter
Issue: [vector_graphics] Support libpathops on Linux arm.
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/238_

Original report by @aebrahim on Apr 23, 2024

In the file `packages/vector_graphics_compiler/lib/src/_initialize_path_ops_io.dart`, Linux (and Windows) are always assumed to be 64 bit. This leads to the following error when running on Linux ARM64: `Could not locate libpathops at /usr/lib/flutter/bin/cache/artifacts/engine/linux-x64/libpath_ops.so`

Another approach would be to leverage [`Abi.current()`](https://api.dart.dev/stable/2.18.6/dart-ffi/Abi-class.html)
Repository: flutter
Issue: [vector_graphics] isn't run for flutter web
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/241_

Original report by @JgomesAT on May 24, 2024

When I try to run my code with vector graphics compiler in Flutter Web, the command always finishes with Exit and don't run the code

---
Comment by @alod2019 on May 25, 2024
I can confirm. In my case the assets section of pubspec.yaml has vector_graphics_compiler appied to folders rather than separte files. On MacOS  web build just crashes with 
```
Compiling lib/main.dart for the Web...                          
Target web_release_bundle failed: ProcessException: Too many open files
  Command: /Users/admin/flutter-3.22.1/bin/cache/dart-sdk/bin/dart run vector_graphics_compiler --input=/var/folders/6h/rfdkq1md3v79423cgp0_kpbh0000gn/T/flutter_tools.tfmC7z/ic_calendar.svg-transformOutput0.svg --output=/var/folders/6h/rfdkq1md3v79423cgp0_kpbh0000gn/T/flutter_tools.tfmC7z/ic_calendar.svg-transformOutput1.svg
#0      _ProcessImpl._start (dart:io-patch/process_patch.dart:402:33)
#1      Process.start (dart:io-patch/process_patch.dart:38:20)
#2      _runNonInteractiveProcess (dart:io-patch/process_patch.dart:579:18)
#3      Process.run (dart:io-patch/process_patch.dart:49:12)
#4      LocalProcessManager.run (package:process/src/interface/local_process_manager.dart:72:22)
#5      ErrorHandlingProcessManager.run.<anonymous closure> (package:flutter_tools/src/base/error_handling_io.dart:661:24)
#6      _run (package:flutter_tools/src/base/error_handling_io.dart:556:20)
#7      ErrorHandlingProcessManager.run (package:flutter_tools/src/base/error_handling_io.dart:660:12)
#8      AssetTransformer._applyTransformer (package:flutter_tools/src/build_system/tools/asset_transformer.dart:115:56)
#9      AssetTransformer.transformAsset (package:flutter_tools/src/build_system/tools/asset_transformer.dart:64:70)
<asynchronous suspension>
```
on Windows the picture is better and some of SVG files are transformed but finally build also fails with a file error

---
Comment by @willhlas on May 28, 2024
I had this issue too but just needed to update my flutter version to `3.22.1`! Maybe try this?

---
Comment by @alod2019 on May 29, 2024
my crashlog above shows that it happens with flutter 3.22.1
Repository: flutter
Issue: [vector_graphics] IMPROVEMENT: add an arg to skip non svg files
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/250_

Original report by @alefwd on Jul 30, 2024

I have a folder /assets where I have a mix of svgs and json files, and I cannot change this. I would like to be able to apply the vector_graphics_compiler transformation to the folder.
When I tried something like:
```
    - path: assets/
      transformers:
        - package: vector_graphics_compiler
```
I received exceptions relative to transforming the json files.

What I propose is either to skip non svg files by default, or to enable it using an arg:
```
    - path: assets/
      transformers:
        - package: vector_graphics_compiler
           args: ['--svg-only']
```


---
Comment by @t-unit on Aug 9, 2024
I also run into this sometimes with files generated by the OS, very annoying. E.g. for `.DS_Store`:

```
Target debug_android_application failed: Error: User-defined transformation of asset "/Users/***/assets/vector/.DS_Store" failed.
Transformer process terminated with non-zero exit code: 1
Transformer package: vector_graphics_compiler
Full command: /Users/***/flutter/bin/cache/dart-sdk/bin/dart run vector_graphics_compiler --input=/var/folders/5l/cwy_qpwn32bf5r7qcnz2ns740000gn/T/flutter_tools.1xhZrW/.DS_Store-transformOutput0 --output=/var/folders/5l/cwy_qpwn32bf5r7qcnz2ns740000gn/T/flutter_tools.1xhZrW/.DS_Store-transformOutput1
stdout:
XXXXXXXXXXX /var/folders/5l/cwy_qpwn32bf5r7qcnz2ns740000gn/T/flutter_tools.1xhZrW/.DS_Store-transformOutput0 XXXXXXXXXXXXX
FileSystemException: Failed to decode data using encoding 'utf-8', path = '/var/folders/5l/cwy_qpwn32bf5r7qcnz2ns740000gn/T/flutter_tools.1xhZrW/.DS_Store-transformOutput0'
#0      _File._tryDecode (dart:io/file_impl.dart:615:7)
#1      _File.readAsStringSync (dart:io/file_impl.dart:624:7)
#2      IsolateProcessor._process.<anonymous closure> (file:///Users/***/.pub-cache/hosted/pub.dev/vector_graphics_compiler-1.1.11+1/bin/util/isolate_processor.dart:110:37)
isolate_processor.dart:110
#3      _RemoteRunner._run (dart:isolate:1090:47)
#4      _RemoteRunner._remoteExecute (dart:isolate:1084:12)
#5      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:300:17)
#6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
```
Repository: flutter
Issue: [vector_graphics] Reverse the compile of svg back to svg files
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/253_

Original report by @richardshephard1 on Aug 21, 2024

Hi there,

We have a number of `svg.vec` files that have been compiled but we no longer have the raw svg text. 

On an Android app we load them via SvgPicture.

Is there a way of reversing the compile process and output the text version? 

I couldn't see an interface in SvgPicture to give the svg xml either?
Repository: flutter
Issue: [vector_graphics] image elements within .svg files cause run time crash
Labels: package,p: vector_graphics

_Imported from https://github.com/dnfield/vector_graphics/issues/256_

Original report by @ChristianEdwardPadilla on Sep 19, 2024

An [image element](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/image) within an SVG file parsed with this package was observed to cause crashes at run time with the following stack trace:

```
_TypeError: Flutter framework
  at FlutterVectorGraphicsListener.onDrawImage	(listener.dart: 773)
  at VectorGraphicsCodec.decode	(vector_graphics_codec.dart: 218)
  at decodeVectorGraphics.process.<anonymous closure>	(listener.dart: 99)
  at <asynchronous gap>	(async)
  at VectorGraphicWidgetState._loadPicture.<anonymous closure> (#2)	(vector_graphics.dart: 369)
  at <asynchronous gap>	(async)
  at VectorGraphicWidgetState._loadAssetBytes.<anonymous closure>	(vector_graphics.dart: 402)
  at <asynchronous gap>	(async)
```

(internal tracking issue b/368358823)
Repository: node
Issue: doc: missing data for `URLSearchParams(urlSearchParams)` constructor
Labels: doc

### Affected URL(s)

https://nodejs.org/docs/latest/api/url.html

### Description of the problem

the history info of the two features doesn't mention these changes below

`URLSearchParams` constructor accepts a `URLSearchParams` object since v7.5.0, though this can be include as an iterable object (but the case is that the support for an iterable object only after v7.10.0)

`URL.prototype.searchParams` returns an empty list when being constructed before v7.5.0

see https://github.com/mdn/browser-compat-data/pull/24998
see https://github.com/mdn/browser-compat-data/pull/24997

also reference to https://github.com/nodejs/node/pull/55840
Repository: godot
Issue: [3.x] Controller Triggers stay pressed on Android
Labels: bug,platform:android,topic:input

### Tested versions

Reproducible in Android, using Xbox controller with godot engine 3.6 stable

### System information

Android 13 godot 3.6 stable

### Issue description

On Android, Controller Triggers once pressed, stay pressed until the game is restarted

the same of [this issue](https://github.com/godotengine/godot/issues/79263)

### Steps to reproduce

Use controller in android

### Minimal reproduction project (MRP)

Any project
Repository: PowerToys
Issue: Workspaces does not retain application order
Labels: Issue-Bug,Status-In progress,Needs-Triage,Needs-Team-Response,Product-Workspaces

### Microsoft PowerToys version

0.86.0

### Installation method

GitHub

### Running as admin

No

### Area(s) with issue?

Workspaces

### Steps to reproduce

Starting in the 0.86.0 update, Workspaces no longer opens applications in the correct order. To replicate:

1. Open the same application multiple times with different files
2. Capture the workspace, and specify the command line arguments to open the correct file for each instance of the application if necessary
3. Close all files and launch the workspace. The files do not open in the order specified in the workspace 

### ✔️ Expected Behavior

In version 0.85.1 and prior, the applications launched in the order they are shown in the workspace edit section (1 opens first, 2 second, etc). When there are multiple instances of a single application, this affects the order in which the files appear on the taskbar when hovering over the app.

### ❌ Actual Behavior

Workspaces does not respect the order in which the apps are listed in the edit workspace section, at least when a single app is open multiple times with a different file specified for each instance of the app. I did not test with multiple apps. Reverting back to 0.85.1 and the apps are opened in the correct order.

### Other Software

_No response_