Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Svg images as background for WinUI3 renderer #8911

Merged
merged 15 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
meetikasharma marked this conversation as resolved.
Show resolved Hide resolved
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"backgroundImage": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3MDAiICBoZWlnaHQ9IjI5NC40IiB2aWV3Qm94PSIwIDAgNzAwLjAwMDAxIDI5NC40MjI1OCI+IAo8c3R5bGU+CiAgCiAgLnRlc3QgewogICAgYW5pbWF0aW9uOiBmYWRlIDNzIGluZmluaXRlIGFsdGVybmF0ZTsgCiAgICAKICB9CiAgCiAgQGtleWZyYW1lcyBmYWRlIHsKICAgIAogICAgZnJvbSB7CiAgICAgIG9wYWNpdHk6IDAKICAgIH0KICAgIAogICAgdG8gewogICAgICAKICAgICAgb3BhY2l0eToxCiAgICB9CiAgICAKICB9CiAgCiAgPC9zdHlsZT4KICAKICA8cGF0aCBjbGFzcz0idGVzdCIgZD0iTTYwMi4yIDEyOC42Yy0xMS43IDIuNy00Mi42IDQuMi00Mi42IDQuMmwtMy44IDEyLjJzMTUuMy0xLjMgMjYuNS0uMmMwIDAgMy42LS4zIDQgNCAuMiA0LjQtLjMgOS0uMyA5cy0uMyAyLjctNCAzLjRjLTQuMy43LTMzLjMgMi0zMy4zIDJMNTQ0IDE3OXMtMS43IDMuNiAyLjIgMi42YzMuNi0xIDM0LTY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UgMS4yIDYzLjQgMjIuMiA0LjIgMzguOCAzLjMgMzguOCAzLjNzODEtMi4zIDgzLjMtNTRjMi41LTUxLjgtODEtMTAxLjQtMTQyLjUtMTE3QzU2LjggMTQuNCAyMiAyNS44IDE5IDI3LjNjLTMuMyAxLjYtLjMgMi4yLS4zIDIuMlMyMiAzMCAyOCAzMmM2IDIgMS4yIDUgMS4yIDVDMTguNyA0MC42IDcgMzguNSA0LjcgMzMuN2MtMi4zLTQuNyAxLjUtOSA2LTE1LjMgNC4yLTYuNSA5LTYuMyA5LTYuMyA3Ni0yNi41IDE2OC44IDIxIDE2OC44IDIxIDg2LjggNDMuOCAxMDEuNiA5NS4zIDEwMCAxMTUuMy0xLjQgMTkuNy05IDUzLTYyLjUgNjkuMk01OSAxNDZjLTguNiA0LTIuNiAxMC40LTIuNiAxMC40IDE2LjIgMTcuMyAzNiAyOC4yIDU1IDM1IDIuMi0zMCAyLTQwLjcgMi01NS44Qzg0IDEzNy42IDY3IDE0Mi40IDU5IDE0NiIvPiA8L3N2Zz4=",
"body": [
{
"type": "TextBlock",
"text": "This card must have a background image parsed from a dataUri",
"wrap": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"backgroundImage": {
"url": "https://adaptivecards.io/content/adaptive-card.svg",
"verticalAlignment": "center",
"horizontalAlignment": "center"
},
"body": [
{
"type": "TextBlock",
"text": "Text in body"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 1"
}
]
},
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 2"
}
]
}
]
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Text 1 in Container"
},
{
"type": "TextBlock",
"text": "Text 2 in Container"
},
{
"type": "TextBlock",
"text": "Text 3 in Container"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"backgroundImage": {
"url": "https://adaptivecards.io/content/adaptive-card.svg",
"fillMode": "repeat"
},
"body": [
{
"type": "TextBlock",
"text": "Text in body"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 1"
}
]
},
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 2"
}
]
}
]
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Text 1 in Container"
},
{
"type": "TextBlock",
"text": "Text 2 in Container"
},
{
"type": "TextBlock",
"text": "Text 3 in Container"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"backgroundImage": {
"url": "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/car.svg",
"fillMode": "repeatHorizontally",
"verticalAlignment": "center"
},
"body": [
{
"type": "TextBlock",
"text": "Text in body"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 1"
}
]
},
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 2"
}
]
}
]
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Text 1 in Container"
},
{
"type": "TextBlock",
"text": "Text 2 in Container"
},
{
"type": "TextBlock",
"text": "Text 3 in Container"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"backgroundImage": {
"url": "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/car.svg",
"fillMode": "repeatVertically",
"horizontalAlignment": "center"
},
"body": [
{
"type": "TextBlock",
"text": "Text in body"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 1"
}
]
},
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 2"
}
]
}
]
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Text 1 in Container"
},
{
"type": "TextBlock",
"text": "Text 2 in Container"
},
{
"type": "TextBlock",
"text": "Text 3 in Container"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"backgroundImage": {
"url": "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/car.svg",
"fillMode": "repeat"
},
"body": [
{
"type": "TextBlock",
"text": "Text in body"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 1"
}
]
},
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 2"
}
]
}
]
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Text 1 in Container"
},
{
"type": "TextBlock",
"text": "Text 2 in Container"
},
{
"type": "TextBlock",
"text": "Text 3 in Container"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"backgroundImage": {
"url": "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/car.svg",
"fillMode": "repeatHorizontally",
"verticalAlignment": "center"
},
"body": [
{
"type": "TextBlock",
"text": "Text in body"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 1"
}
]
},
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Text in Column 2"
}
]
}
]
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "Text 1 in Container"
},
{
"type": "TextBlock",
"text": "Text 2 in Container"
},
{
"type": "TextBlock",
"text": "Text 3 in Container"
}
]
}
]
}
Loading
Loading