mirror of
https://github.com/fathyb/carbonyl.git
synced 2024-09-11 02:45:31 +03:00
feat: add Docker image (#4)
This commit is contained in:
parent
e692e202f5
commit
b3885f64d0
90
Dockerfile
90
Dockerfile
@ -1,4 +1,6 @@
|
||||
FROM debian:11 AS chromium-build
|
||||
# Build environment
|
||||
# ==========================
|
||||
FROM --platform=linux/amd64 debian:11 AS chromium-build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@ -9,34 +11,104 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV CHROMIUM_BUILDTOOLS_PATH=/app/electron/src/buildtools
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git sudo curl ccache python3 bzip2 xz-utils && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
git clone --depth 1 --single-branch https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
|
||||
COPY electron/.gclient electron/
|
||||
COPY scripts/gclient.sh scripts/
|
||||
RUN --mount=type=cache,target=/app/.git_cache scripts/gclient.sh
|
||||
RUN --mount=type=cache,target=/app/.git_cache scripts/gclient.sh --revision "src/electron@cb22573c3e76e09df9fbad36dc372080c04d349e"
|
||||
|
||||
RUN electron/src/build/install-build-deps.sh
|
||||
|
||||
COPY scripts/patch.sh /app/scripts/
|
||||
COPY src/chromium.patch /app/src/
|
||||
RUN scripts/patch.sh
|
||||
COPY src/skia.patch /app/src/
|
||||
RUN scripts/patch.sh && ccache --max-size=0
|
||||
|
||||
FROM chromium-build AS chromium-arm64
|
||||
ENV CCACHE_DIR=/app/.ccache
|
||||
ENV CCACHE_CPP2=yes
|
||||
ENV CCACHE_SLOPPINESS=time_macros
|
||||
|
||||
|
||||
# ARM64 binaries
|
||||
# ==============
|
||||
FROM --platform=linux/amd64 chromium-build AS chromium-arm64
|
||||
|
||||
RUN electron/src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
|
||||
|
||||
COPY scripts/gn.sh /app/scripts/
|
||||
RUN GN_ARGS='target_cpu="arm64" cc_wrapper="env CCACHE_DIR=/app/.ccache CCACHE_SLOPPINESS=time_macros ccache"' \
|
||||
RUN GN_ARGS='cc_wrapper="ccache" target_cpu="arm64"' \
|
||||
scripts/gn.sh release
|
||||
|
||||
COPY scripts/ninja.sh /app/scripts/
|
||||
RUN --mount=type=cache,target=/app/.ccache \
|
||||
--mount=type=cache,target=/app/.git_cache \
|
||||
electron/src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm64 && \
|
||||
scripts/ninja.sh release -j200
|
||||
|
||||
FROM chromium-arm64
|
||||
RUN electron/src/electron/script/strip-binaries.py -d electron/src/out/release --target-cpu=arm64 && \
|
||||
ninja -C electron/src/out/release electron:electron_dist_zip
|
||||
|
||||
|
||||
# AMD64 binaries
|
||||
# ==============
|
||||
FROM --platform=linux/amd64 chromium-build AS chromium-amd64
|
||||
|
||||
RUN electron/src/build/linux/sysroot_scripts/install-sysroot.py --arch=amd64
|
||||
|
||||
COPY scripts/gn.sh /app/scripts/
|
||||
RUN GN_ARGS='cc_wrapper="ccache"' \
|
||||
scripts/gn.sh release
|
||||
|
||||
COPY scripts/ninja.sh /app/scripts/
|
||||
RUN --mount=type=cache,target=/app/.ccache \
|
||||
--mount=type=cache,target=/app/.git_cache \
|
||||
scripts/ninja.sh release -j200
|
||||
|
||||
RUN electron/src/electron/script/strip-binaries.py -d electron/src/out/release && \
|
||||
ninja -C electron/src/out/release electron:electron_dist_zip
|
||||
|
||||
|
||||
# Release binaries
|
||||
# ================
|
||||
FROM debian:11 AS html2svg-binaries
|
||||
|
||||
RUN apt-get update && apt-get install -y unzip
|
||||
|
||||
COPY --from=chromium-arm64 /app/electron/src/out/release/dist.zip /arm64.zip
|
||||
COPY --from=chromium-amd64 /app/electron/src/out/release/dist.zip /amd64.zip
|
||||
RUN unzip /arm64.zip -d /arm64
|
||||
RUN unzip /amd64.zip -d /amd64
|
||||
|
||||
# TypeScript build
|
||||
# ================
|
||||
FROM --platform=$BUILDPLATFORM node:18 AS html2svg-js
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock /app/
|
||||
RUN yarn
|
||||
|
||||
COPY tsconfig.json /app/
|
||||
COPY src /app/src
|
||||
RUN yarn tsc -b
|
||||
|
||||
# Main image
|
||||
# ==========
|
||||
FROM node:18
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --yes \
|
||||
libglib2.0-0 libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libgtk-3-0 libgbm1 libasound2 \
|
||||
xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock /app/
|
||||
RUN yarn --production
|
||||
|
||||
ARG TARGETARCH
|
||||
COPY --from=html2svg-js /app/build /app/build
|
||||
COPY --from=html2svg-binaries /${TARGETARCH} /runtime
|
||||
COPY /scripts/docker-entrypoint.sh /app/scripts/docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/app/scripts/docker-entrypoint.sh"]
|
||||
|
||||
COPY --from=chromium-build /app/electron/src/out /app/electron/src/out
|
||||
|
106
google.svg
106
google.svg
@ -1,106 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="3456" height="2102">
|
||||
<defs>
|
||||
<g id="group_0">
|
||||
<rect fill="white" width="3456" height="2102"/>
|
||||
<clipPath id="cl_3">
|
||||
<rect width="300" height="300"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path fill="none" stroke="black" stroke-width="1" stroke-miterlimit="10" transform="scale(2 2)" d="M12 27L12 147Q12 147.368 12.0181 147.736Q12.0361 148.104 12.0722 148.47Q12.1083 148.837 12.1624 149.201Q12.2164 149.565 12.2882 149.926Q12.3601 150.288 12.4495 150.645Q12.539 151.002 12.6459 151.354Q12.7528 151.707 12.8768 152.053Q13.0009 152.4 13.1418 152.74Q13.2827 153.08 13.4402 153.413Q13.5976 153.746 13.7712 154.071Q13.9448 154.396 14.1341 154.712Q14.3234 155.027 14.528 155.334Q14.7325 155.64 14.9519 155.935Q15.1712 156.231 15.4048 156.516Q15.6384 156.801 15.8857 157.073Q16.133 157.346 16.3934 157.607Q16.6538 157.867 16.9266 158.114Q17.1995 158.362 17.4841 158.595Q17.7687 158.829 18.0645 159.048Q18.3603 159.267 18.6664 159.472Q18.9726 159.677 19.2885 159.866Q19.6043 160.055 19.929 160.229Q20.2538 160.402 20.5867 160.56Q20.9195 160.717 21.2597 160.858Q21.5999 160.999 21.9467 161.123Q22.2934 161.247 22.6457 161.354Q22.9981 161.461 23.3553 161.55Q23.7125 161.64 24.0736 161.712Q24.4348 161.784 24.799 161.838Q25.1633 161.892 25.5297 161.928Q25.8962 161.964 26.264 161.982Q26.6318 162 27 162L147 162Q147.368 162 147.736 161.982Q148.104 161.964 148.47 161.928Q148.837 161.892 149.201 161.838Q149.565 161.784 149.926 161.712Q150.288 161.64 150.645 161.55Q151.002 161.461 151.354 161.354Q151.707 161.247 152.053 161.123Q152.4 160.999 152.74 160.858Q153.08 160.717 153.413 160.56Q153.746 160.402 154.071 160.229Q154.396 160.055 154.712 159.866Q155.027 159.677 155.334 159.472Q155.64 159.267 155.935 159.048Q156.231 158.829 156.516 158.595Q156.801 158.362 157.073 158.114Q157.346 157.867 157.607 157.607Q157.867 157.346 158.114 157.073Q158.362 156.801 158.595 156.516Q158.829 156.231 159.048 155.935Q159.267 155.64 159.472 155.334Q159.677 155.027 159.866 154.712Q160.055 154.396 160.229 154.071Q160.402 153.746 160.56 153.413Q160.717 153.08 160.858 152.74Q160.999 152.4 161.123 152.053Q161.247 151.707 161.354 151.354Q161.461 151.002 161.55 150.645Q161.64 150.288 161.712 149.926Q161.784 149.565 161.838 149.201Q161.892 148.837 161.928 148.47Q161.964 148.104 161.982 147.736Q162 147.368 162 147L162 27Q162 26.6318 161.982 26.264Q161.964 25.8962 161.928 25.5297Q161.892 25.1633 161.838 24.799Q161.784 24.4348 161.712 24.0736Q161.64 23.7125 161.55 23.3553Q161.461 22.9981 161.354 22.6457Q161.247 22.2934 161.123 21.9467Q160.999 21.5999 160.858 21.2597Q160.717 20.9195 160.56 20.5867Q160.402 20.2538 160.229 19.929Q160.055 19.6043 159.866 19.2885Q159.677 18.9726 159.472 18.6664Q159.267 18.3603 159.048 18.0645Q158.829 17.7687 158.595 17.4841Q158.362 17.1995 158.114 16.9266Q157.867 16.6538 157.607 16.3934Q157.346 16.133 157.073 15.8857Q156.801 15.6384 156.516 15.4048Q156.231 15.1712 155.935 14.9519Q155.64 14.7325 155.334 14.528Q155.027 14.3234 154.712 14.1341Q154.396 13.9448 154.071 13.7712Q153.746 13.5976 153.413 13.4402Q153.08 13.2827 152.74 13.1418Q152.4 13.0009 152.053 12.8768Q151.707 12.7528 151.354 12.6459Q151.002 12.539 150.645 12.4495Q150.288 12.3601 149.926 12.2882Q149.565 12.2164 149.201 12.1624Q148.837 12.1083 148.47 12.0722Q148.104 12.0361 147.736 12.0181Q147.368 12 147 12L27 12Q26.6318 12 26.264 12.0181Q25.8962 12.0361 25.5297 12.0722Q25.1633 12.1083 24.799 12.1624Q24.4348 12.2164 24.0736 12.2882Q23.7125 12.3601 23.3553 12.4495Q22.9981 12.539 22.6457 12.6459Q22.2934 12.7528 21.9467 12.8768Q21.5999 13.0009 21.2597 13.1418Q20.9195 13.2827 20.5867 13.4402Q20.2538 13.5976 19.929 13.7712Q19.6043 13.9448 19.2885 14.1341Q18.9726 14.3234 18.6664 14.528Q18.3603 14.7325 18.0645 14.9519Q17.7687 15.1712 17.4841 15.4048Q17.1995 15.6384 16.9266 15.8857Q16.6538 16.133 16.3934 16.3934Q16.133 16.6538 15.8857 16.9266Q15.6384 17.1995 15.4048 17.4841Q15.1712 17.7687 14.9519 18.0645Q14.7325 18.3603 14.528 18.6664Q14.3234 18.9726 14.1341 19.2885Q13.9448 19.6043 13.7712 19.929Q13.5976 20.2538 13.4402 20.5867Q13.2827 20.9195 13.1418 21.2597Q13.0009 21.5999 12.8768 21.9467Q12.7528 22.2934 12.6459 22.6457Q12.539 22.9981 12.4495 23.3553Q12.3601 23.7125 12.2882 24.0736Q12.2164 24.4348 12.1624 24.799Q12.1083 25.1633 12.0722 25.5297Q12.0361 25.8962 12.0181 26.264Q12 26.6318 12 27"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path fill="none" stroke="black" stroke-width="1" stroke-miterlimit="10" transform="scale(2 2)" d="M19 28L19 160Q19 160.221 19.0108 160.442Q19.0217 160.662 19.0433 160.882Q19.065 161.102 19.0974 161.321Q19.1298 161.539 19.1729 161.756Q19.216 161.972 19.2697 162.187Q19.3234 162.401 19.3875 162.613Q19.4517 162.824 19.5261 163.032Q19.6005 163.24 19.6851 163.444Q19.7696 163.648 19.8641 163.848Q19.9586 164.048 20.0627 164.243Q20.1669 164.437 20.2804 164.627Q20.394 164.816 20.5168 165Q20.6395 165.184 20.7711 165.361Q20.9027 165.539 21.0429 165.71Q21.1831 165.88 21.3314 166.044Q21.4798 166.208 21.636 166.364Q21.7923 166.52 21.956 166.669Q22.1197 166.817 22.2905 166.957Q22.4612 167.097 22.6387 167.229Q22.8162 167.36 22.9999 167.483Q23.1836 167.606 23.3731 167.72Q23.5626 167.833 23.7574 167.937Q23.9523 168.041 24.152 168.136Q24.3517 168.23 24.5558 168.315Q24.76 168.399 24.968 168.474Q25.176 168.548 25.3874 168.612Q25.5989 168.677 25.8132 168.73Q26.0275 168.784 26.2442 168.827Q26.4609 168.87 26.6794 168.903Q26.898 168.935 27.1178 168.957Q27.3377 168.978 27.5584 168.989Q27.7791 169 28 169L160 169Q160.221 169 160.442 168.989Q160.662 168.978 160.882 168.957Q161.102 168.935 161.321 168.903Q161.539 168.87 161.756 168.827Q161.972 168.784 162.187 168.73Q162.401 168.677 162.613 168.612Q162.824 168.548 163.032 168.474Q163.24 168.399 163.444 168.315Q163.648 168.23 163.848 168.136Q164.048 168.041 164.243 167.937Q164.437 167.833 164.627 167.72Q164.816 167.606 165 167.483Q165.184 167.36 165.361 167.229Q165.539 167.097 165.71 166.957Q165.88 166.817 166.044 166.669Q166.208 166.52 166.364 166.364Q166.52 166.208 166.669 166.044Q166.817 165.88 166.957 165.71Q167.097 165.539 167.229 165.361Q167.36 165.184 167.483 165Q167.606 164.816 167.72 164.627Q167.833 164.437 167.937 164.243Q168.041 164.048 168.136 163.848Q168.23 163.648 168.315 163.444Q168.399 163.24 168.474 163.032Q168.548 162.824 168.612 162.613Q168.677 162.401 168.73 162.187Q168.784 161.972 168.827 161.756Q168.87 161.539 168.903 161.321Q168.935 161.102 168.957 160.882Q168.978 160.662 168.989 160.442Q169 160.221 169 160L169 28Q169 27.7791 168.989 27.5584Q168.978 27.3377 168.957 27.1178Q168.935 26.898 168.903 26.6794Q168.87 26.4609 168.827 26.2442Q168.784 26.0275 168.73 25.8132Q168.677 25.5989 168.612 25.3874Q168.548 25.176 168.474 24.968Q168.399 24.76 168.315 24.5558Q168.23 24.3517 168.136 24.152Q168.041 23.9523 167.937 23.7574Q167.833 23.5626 167.72 23.3731Q167.606 23.1836 167.483 22.9999Q167.36 22.8162 167.229 22.6387Q167.097 22.4612 166.957 22.2905Q166.817 22.1197 166.669 21.956Q166.52 21.7923 166.364 21.636Q166.208 21.4798 166.044 21.3314Q165.88 21.1831 165.71 21.0429Q165.539 20.9027 165.361 20.7711Q165.184 20.6395 165 20.5168Q164.816 20.394 164.627 20.2804Q164.437 20.1669 164.243 20.0627Q164.048 19.9586 163.848 19.8641Q163.648 19.7696 163.444 19.6851Q163.24 19.6005 163.032 19.5261Q162.824 19.4517 162.613 19.3875Q162.401 19.3234 162.187 19.2697Q161.972 19.216 161.756 19.1729Q161.539 19.1298 161.321 19.0974Q161.102 19.065 160.882 19.0433Q160.662 19.0217 160.442 19.0108Q160.221 19 160 19L28 19Q27.7791 19 27.5584 19.0108Q27.3377 19.0217 27.1178 19.0433Q26.898 19.065 26.6794 19.0974Q26.4609 19.1298 26.2442 19.1729Q26.0275 19.216 25.8132 19.2697Q25.5989 19.3234 25.3874 19.3875Q25.176 19.4517 24.968 19.5261Q24.76 19.6005 24.5558 19.6851Q24.3517 19.7696 24.152 19.8641Q23.9523 19.9586 23.7574 20.0627Q23.5626 20.1669 23.3731 20.2804Q23.1836 20.394 22.9999 20.5168Q22.8162 20.6395 22.6387 20.7711Q22.4612 20.9027 22.2905 21.0429Q22.1197 21.1831 21.956 21.3314Q21.7923 21.4798 21.636 21.636Q21.4798 21.7923 21.3314 21.956Q21.1831 22.1197 21.0429 22.2905Q20.9027 22.4612 20.7711 22.6387Q20.6395 22.8162 20.5168 22.9999Q20.394 23.1836 20.2804 23.3731Q20.1669 23.5626 20.0627 23.7574Q19.9586 23.9523 19.8641 24.152Q19.7696 24.3517 19.6851 24.5558Q19.6005 24.76 19.5261 24.968Q19.4517 25.176 19.3875 25.3874Q19.3234 25.5989 19.2697 25.8132Q19.216 26.0275 19.1729 26.2442Q19.1298 26.4609 19.0974 26.6794Q19.065 26.898 19.0433 27.1178Q19.0217 27.3377 19.0108 27.5584Q19 27.7791 19 28"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path fill="none" stroke="black" stroke-width="1" stroke-miterlimit="10" transform="scale(2 2)" d="M53 63L53 76Q53 76.2455 53.012 76.4907Q53.0241 76.7359 53.0481 76.9802Q53.0722 77.2245 53.1082 77.4673Q53.1442 77.7101 53.1921 77.9509Q53.24 78.1917 53.2997 78.4298Q53.3593 78.6679 53.4306 78.9028Q53.5019 79.1378 53.5845 79.3689Q53.6672 79.6 53.7612 79.8268Q53.8551 80.0536 53.9601 80.2756Q54.0651 80.4975 54.1808 80.714Q54.2965 80.9305 54.4227 81.141Q54.5489 81.3516 54.6853 81.5557Q54.8217 81.7598 54.9679 81.957Q55.1141 82.1542 55.2699 82.3439Q55.4256 82.5337 55.5905 82.7156Q55.7553 82.8975 55.9289 83.0711Q56.1025 83.2447 56.2844 83.4095Q56.4663 83.5744 56.6561 83.7301Q56.8458 83.8858 57.043 84.0321Q57.2402 84.1783 57.4443 84.3147Q57.6484 84.4511 57.859 84.5773Q58.0695 84.7035 58.286 84.8192Q58.5025 84.9349 58.7244 85.0399Q58.9464 85.1449 59.1732 85.2388Q59.4 85.3327 59.6311 85.4154Q59.8622 85.4981 60.0971 85.5694Q60.3321 85.6407 60.5702 85.7003Q60.8083 85.76 61.0491 85.8078Q61.2899 85.8557 61.5327 85.8918Q61.7755 85.9278 62.0198 85.9519Q62.2641 85.9759 62.5093 85.988Q62.7545 86 63 86L92 86Q92.2455 86 92.4907 85.988Q92.7359 85.9759 92.9802 85.9519Q93.2245 85.9278 93.4673 85.8918Q93.7101 85.8557 93.9509 85.8078Q94.1917 85.76 94.4298 85.7003Q94.6679 85.6407 94.9028 85.5694Q95.1378 85.4981 95.3689 85.4154Q95.6 85.3327 95.8268 85.2388Q96.0536 85.1449 96.2755 85.0399Q96.4975 84.9349 96.714 84.8192Q96.9305 84.7035 97.141 84.5773Q97.3516 84.4511 97.5557 84.3147Q97.7598 84.1783 97.957 84.0321Q98.1542 83.8858 98.3439 83.7301Q98.5337 83.5744 98.7156 83.4095Q98.8975 83.2447 99.0711 83.0711Q99.2446 82.8975 99.4095 82.7156Q99.5744 82.5337 99.7301 82.3439Q99.8858 82.1542 100.032 81.957Q100.178 81.7598 100.315 81.5557Q100.451 81.3516 100.577 81.141Q100.703 80.9305 100.819 80.714Q100.935 80.4975 101.04 80.2756Q101.145 80.0536 101.239 79.8268Q101.333 79.6 101.415 79.3689Q101.498 79.1378 101.569 78.9028Q101.641 78.6679 101.7 78.4298Q101.76 78.1917 101.808 77.9509Q101.856 77.7101 101.892 77.4673Q101.928 77.2245 101.952 76.9802Q101.976 76.7359 101.988 76.4907Q102 76.2455 102 76L102 63Q102 62.7545 101.988 62.5093Q101.976 62.2641 101.952 62.0198Q101.928 61.7755 101.892 61.5327Q101.856 61.2899 101.808 61.0491Q101.76 60.8083 101.7 60.5702Q101.641 60.3321 101.569 60.0971Q101.498 59.8622 101.415 59.6311Q101.333 59.4 101.239 59.1732Q101.145 58.9464 101.04 58.7244Q100.935 58.5025 100.819 58.286Q100.703 58.0695 100.577 57.859Q100.451 57.6484 100.315 57.4443Q100.178 57.2402 100.032 57.043Q99.8858 56.8458 99.7301 56.6561Q99.5744 56.4663 99.4095 56.2844Q99.2446 56.1025 99.0711 55.9289Q98.8975 55.7553 98.7156 55.5905Q98.5337 55.4256 98.3439 55.2699Q98.1542 55.1142 97.957 54.9679Q97.7598 54.8217 97.5557 54.6853Q97.3516 54.5489 97.141 54.4227Q96.9305 54.2965 96.714 54.1808Q96.4975 54.0651 96.2755 53.9601Q96.0536 53.8551 95.8268 53.7612Q95.6 53.6673 95.3689 53.5846Q95.1378 53.5019 94.9028 53.4306Q94.6679 53.3593 94.4298 53.2997Q94.1917 53.24 93.9509 53.1921Q93.7101 53.1443 93.4673 53.1082Q93.2245 53.0722 92.9802 53.0482Q92.7359 53.0241 92.4907 53.012Q92.2455 53 92 53L63 53Q62.7545 53 62.5093 53.012Q62.2641 53.0241 62.0198 53.0482Q61.7755 53.0722 61.5327 53.1082Q61.2899 53.1443 61.0491 53.1921Q60.8083 53.24 60.5702 53.2997Q60.3321 53.3593 60.0971 53.4306Q59.8622 53.5019 59.6311 53.5846Q59.4 53.6673 59.1732 53.7612Q58.9464 53.8551 58.7244 53.9601Q58.5025 54.0651 58.286 54.1808Q58.0695 54.2965 57.859 54.4227Q57.6484 54.5489 57.4443 54.6853Q57.2402 54.8217 57.043 54.9679Q56.8458 55.1142 56.6561 55.2699Q56.4663 55.4256 56.2844 55.5905Q56.1025 55.7553 55.9289 55.9289Q55.7553 56.1025 55.5905 56.2844Q55.4256 56.4663 55.2699 56.6561Q55.1141 56.8458 54.9679 57.043Q54.8217 57.2402 54.6853 57.4443Q54.5489 57.6484 54.4227 57.859Q54.2965 58.0695 54.1808 58.286Q54.0651 58.5025 53.9601 58.7244Q53.8551 58.9464 53.7612 59.1732Q53.6672 59.4 53.5845 59.6311Q53.5018 59.8622 53.4306 60.0971Q53.3593 60.3321 53.2997 60.5702Q53.24 60.8083 53.1921 61.0491Q53.1442 61.2899 53.1082 61.5327Q53.0722 61.7755 53.0482 62.0198Q53.0241 62.2641 53.012 62.5093Q53 62.7545 53 63"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path fill="none" stroke="black" stroke-width="1" stroke-miterlimit="10" transform="scale(2 2)" d="M53 125L53 129Q53 129.147 53.0072 129.294Q53.0145 129.442 53.0289 129.588Q53.0433 129.735 53.0649 129.88Q53.0865 130.026 53.1153 130.171Q53.144 130.315 53.1798 130.458Q53.2156 130.601 53.2584 130.742Q53.3011 130.883 53.3507 131.021Q53.4003 131.16 53.4567 131.296Q53.5131 131.432 53.5761 131.565Q53.639 131.698 53.7085 131.828Q53.7779 131.958 53.8536 132.085Q53.9293 132.211 54.0112 132.333Q54.093 132.456 54.1807 132.574Q54.2685 132.692 54.3619 132.806Q54.4554 132.92 54.5543 133.029Q54.6532 133.138 54.7574 133.243Q54.8615 133.347 54.9706 133.446Q55.0798 133.545 55.1936 133.638Q55.3075 133.731 55.4258 133.819Q55.5441 133.907 55.6666 133.989Q55.789 134.071 55.9154 134.146Q56.0417 134.222 56.1716 134.292Q56.3015 134.361 56.4347 134.424Q56.5678 134.487 56.7039 134.543Q56.84 134.6 56.9786 134.649Q57.1173 134.699 57.2583 134.742Q57.3992 134.784 57.5421 134.82Q57.685 134.856 57.8295 134.885Q57.9739 134.913 58.1196 134.935Q58.2653 134.957 58.4119 134.971Q58.5585 134.986 58.7056 134.993Q58.8527 135 59 135L96 135Q96.1473 135 96.2944 134.993Q96.4415 134.986 96.5881 134.971Q96.7347 134.957 96.8804 134.935Q97.0261 134.913 97.1705 134.885Q97.315 134.856 97.4579 134.82Q97.6007 134.784 97.7417 134.742Q97.8827 134.699 98.0213 134.649Q98.16 134.6 98.2961 134.543Q98.4322 134.487 98.5653 134.424Q98.6985 134.361 98.8284 134.292Q98.9583 134.222 99.0846 134.146Q99.2109 134.071 99.3334 133.989Q99.4559 133.907 99.5742 133.819Q99.6925 133.731 99.8064 133.638Q99.9202 133.545 100.029 133.446Q100.138 133.347 100.243 133.243Q100.347 133.138 100.446 133.029Q100.545 132.92 100.638 132.806Q100.731 132.692 100.819 132.574Q100.907 132.456 100.989 132.333Q101.071 132.211 101.146 132.085Q101.222 131.958 101.292 131.828Q101.361 131.698 101.424 131.565Q101.487 131.432 101.543 131.296Q101.6 131.16 101.649 131.021Q101.699 130.883 101.742 130.742Q101.784 130.601 101.82 130.458Q101.856 130.315 101.885 130.171Q101.913 130.026 101.935 129.88Q101.957 129.735 101.971 129.588Q101.986 129.442 101.993 129.294Q102 129.147 102 129L102 125Q102 124.853 101.993 124.706Q101.986 124.558 101.971 124.412Q101.957 124.265 101.935 124.12Q101.913 123.974 101.885 123.829Q101.856 123.685 101.82 123.542Q101.784 123.399 101.742 123.258Q101.699 123.117 101.649 122.979Q101.6 122.84 101.543 122.704Q101.487 122.568 101.424 122.435Q101.361 122.302 101.292 122.172Q101.222 122.042 101.146 121.915Q101.071 121.789 100.989 121.667Q100.907 121.544 100.819 121.426Q100.731 121.307 100.638 121.194Q100.545 121.08 100.446 120.971Q100.347 120.861 100.243 120.757Q100.138 120.653 100.029 120.554Q99.9202 120.455 99.8064 120.362Q99.6925 120.268 99.5742 120.181Q99.4559 120.093 99.3334 120.011Q99.2109 119.929 99.0846 119.854Q98.9583 119.778 98.8284 119.708Q98.6985 119.639 98.5653 119.576Q98.4322 119.513 98.2961 119.457Q98.16 119.4 98.0213 119.351Q97.8827 119.301 97.7417 119.258Q97.6008 119.216 97.4579 119.18Q97.315 119.144 97.1705 119.115Q97.0261 119.087 96.8804 119.065Q96.7347 119.043 96.5881 119.029Q96.4415 119.014 96.2944 119.007Q96.1473 119 96 119L59 119Q58.8527 119 58.7056 119.007Q58.5585 119.014 58.4119 119.029Q58.2653 119.043 58.1196 119.065Q57.9739 119.087 57.8295 119.115Q57.685 119.144 57.5421 119.18Q57.3992 119.216 57.2583 119.258Q57.1173 119.301 56.9786 119.351Q56.84 119.4 56.7039 119.457Q56.5678 119.513 56.4347 119.576Q56.3015 119.639 56.1716 119.708Q56.0417 119.778 55.9154 119.854Q55.789 119.929 55.6666 120.011Q55.5441 120.093 55.4258 120.181Q55.3075 120.268 55.1936 120.362Q55.0798 120.455 54.9706 120.554Q54.8615 120.653 54.7574 120.757Q54.6532 120.861 54.5543 120.971Q54.4554 121.08 54.3619 121.194Q54.2685 121.307 54.1807 121.426Q54.093 121.544 54.0112 121.667Q53.9293 121.789 53.8536 121.915Q53.7779 122.042 53.7085 122.172Q53.639 122.301 53.5761 122.435Q53.5131 122.568 53.4567 122.704Q53.4003 122.84 53.3507 122.979Q53.3011 123.117 53.2584 123.258Q53.2156 123.399 53.1798 123.542Q53.144 123.685 53.1153 123.829Q53.0865 123.974 53.0649 124.12Q53.0433 124.265 53.0289 124.412Q53.0145 124.558 53.0072 124.706Q53 124.853 53 125"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path fill="none" stroke="black" stroke-width="1" stroke-miterlimit="10" transform="scale(2 2)" d="M135 63L135 76Q135 76.2455 135.012 76.4907Q135.024 76.7359 135.048 76.9802Q135.072 77.2245 135.108 77.4673Q135.144 77.7101 135.192 77.9509Q135.24 78.1917 135.3 78.4298Q135.359 78.6679 135.431 78.9028Q135.502 79.1378 135.585 79.3689Q135.667 79.6 135.761 79.8268Q135.855 80.0536 135.96 80.2756Q136.065 80.4975 136.181 80.714Q136.296 80.9305 136.423 81.141Q136.549 81.3516 136.685 81.5557Q136.822 81.7598 136.968 81.957Q137.114 82.1542 137.27 82.3439Q137.426 82.5337 137.59 82.7156Q137.755 82.8975 137.929 83.0711Q138.103 83.2447 138.284 83.4095Q138.466 83.5744 138.656 83.7301Q138.846 83.8858 139.043 84.0321Q139.24 84.1783 139.444 84.3147Q139.648 84.4511 139.859 84.5773Q140.07 84.7035 140.286 84.8192Q140.503 84.9349 140.724 85.0399Q140.946 85.1449 141.173 85.2388Q141.4 85.3327 141.631 85.4154Q141.862 85.4981 142.097 85.5694Q142.332 85.6407 142.57 85.7003Q142.808 85.76 143.049 85.8078Q143.29 85.8557 143.533 85.8918Q143.776 85.9278 144.02 85.9519Q144.264 85.9759 144.509 85.988Q144.755 86 145 86L174 86Q174.245 86 174.491 85.988Q174.736 85.9759 174.98 85.9519Q175.224 85.9278 175.467 85.8918Q175.71 85.8557 175.951 85.8078Q176.192 85.76 176.43 85.7003Q176.668 85.6407 176.903 85.5694Q177.138 85.4981 177.369 85.4154Q177.6 85.3327 177.827 85.2388Q178.054 85.1449 178.276 85.0399Q178.497 84.9349 178.714 84.8192Q178.93 84.7035 179.141 84.5773Q179.352 84.4511 179.556 84.3147Q179.76 84.1783 179.957 84.0321Q180.154 83.8858 180.344 83.7301Q180.534 83.5744 180.716 83.4095Q180.897 83.2447 181.071 83.0711Q181.245 82.8975 181.41 82.7156Q181.574 82.5337 181.73 82.3439Q181.886 82.1542 182.032 81.957Q182.178 81.7598 182.315 81.5557Q182.451 81.3516 182.577 81.141Q182.703 80.9305 182.819 80.714Q182.935 80.4975 183.04 80.2756Q183.145 80.0536 183.239 79.8268Q183.333 79.6 183.415 79.3689Q183.498 79.1378 183.569 78.9028Q183.641 78.6679 183.7 78.4298Q183.76 78.1917 183.808 77.9509Q183.856 77.7101 183.892 77.4673Q183.928 77.2245 183.952 76.9802Q183.976 76.7359 183.988 76.4907Q184 76.2455 184 76L184 63Q184 62.7545 183.988 62.5093Q183.976 62.2641 183.952 62.0198Q183.928 61.7755 183.892 61.5327Q183.856 61.2899 183.808 61.0491Q183.76 60.8083 183.7 60.5702Q183.641 60.3321 183.569 60.0971Q183.498 59.8622 183.415 59.6311Q183.333 59.4 183.239 59.1732Q183.145 58.9464 183.04 58.7244Q182.935 58.5025 182.819 58.286Q182.703 58.0695 182.577 57.859Q182.451 57.6484 182.315 57.4443Q182.178 57.2402 182.032 57.043Q181.886 56.8458 181.73 56.6561Q181.574 56.4663 181.41 56.2844Q181.245 56.1025 181.071 55.9289Q180.897 55.7553 180.716 55.5905Q180.534 55.4256 180.344 55.2699Q180.154 55.1142 179.957 54.9679Q179.76 54.8217 179.556 54.6853Q179.352 54.5489 179.141 54.4227Q178.93 54.2965 178.714 54.1808Q178.497 54.0651 178.276 53.9601Q178.054 53.8551 177.827 53.7612Q177.6 53.6673 177.369 53.5846Q177.138 53.5019 176.903 53.4306Q176.668 53.3593 176.43 53.2997Q176.192 53.24 175.951 53.1921Q175.71 53.1443 175.467 53.1082Q175.224 53.0722 174.98 53.0482Q174.736 53.0241 174.491 53.012Q174.245 53 174 53L145 53Q144.755 53 144.509 53.012Q144.264 53.0241 144.02 53.0482Q143.776 53.0722 143.533 53.1082Q143.29 53.1443 143.049 53.1921Q142.808 53.24 142.57 53.2997Q142.332 53.3593 142.097 53.4306Q141.862 53.5019 141.631 53.5846Q141.4 53.6673 141.173 53.7612Q140.946 53.8551 140.724 53.9601Q140.503 54.0651 140.286 54.1808Q140.07 54.2965 139.859 54.4227Q139.648 54.5489 139.444 54.6853Q139.24 54.8217 139.043 54.9679Q138.846 55.1142 138.656 55.2699Q138.466 55.4256 138.284 55.5905Q138.103 55.7553 137.929 55.9289Q137.755 56.1025 137.59 56.2844Q137.426 56.4663 137.27 56.6561Q137.114 56.8458 136.968 57.043Q136.822 57.2402 136.685 57.4443Q136.549 57.6484 136.423 57.859Q136.296 58.0695 136.181 58.286Q136.065 58.5025 135.96 58.7244Q135.855 58.9464 135.761 59.1732Q135.667 59.4 135.585 59.6311Q135.502 59.8622 135.431 60.0971Q135.359 60.3321 135.3 60.5702Q135.24 60.8083 135.192 61.0491Q135.144 61.2899 135.108 61.5327Q135.072 61.7755 135.048 62.0198Q135.024 62.2641 135.012 62.5093Q135 62.7545 135 63"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path fill="none" stroke="black" stroke-width="1" stroke-miterlimit="10" transform="scale(2 2)" d="M135 129L135 158Q135 158.245 135.012 158.491Q135.024 158.736 135.048 158.98Q135.072 159.224 135.108 159.467Q135.144 159.71 135.192 159.951Q135.24 160.192 135.3 160.43Q135.359 160.668 135.431 160.903Q135.502 161.138 135.585 161.369Q135.667 161.6 135.761 161.827Q135.855 162.054 135.96 162.276Q136.065 162.497 136.181 162.714Q136.296 162.93 136.423 163.141Q136.549 163.352 136.685 163.556Q136.822 163.76 136.968 163.957Q137.114 164.154 137.27 164.344Q137.426 164.534 137.59 164.716Q137.755 164.897 137.929 165.071Q138.103 165.245 138.284 165.41Q138.466 165.574 138.656 165.73Q138.846 165.886 139.043 166.032Q139.24 166.178 139.444 166.315Q139.648 166.451 139.859 166.577Q140.07 166.703 140.286 166.819Q140.503 166.935 140.724 167.04Q140.946 167.145 141.173 167.239Q141.4 167.333 141.631 167.415Q141.862 167.498 142.097 167.569Q142.332 167.641 142.57 167.7Q142.808 167.76 143.049 167.808Q143.29 167.856 143.533 167.892Q143.776 167.928 144.02 167.952Q144.264 167.976 144.509 167.988Q144.755 168 145 168L150 168Q150.245 168 150.491 167.988Q150.736 167.976 150.98 167.952Q151.224 167.928 151.467 167.892Q151.71 167.856 151.951 167.808Q152.192 167.76 152.43 167.7Q152.668 167.641 152.903 167.569Q153.138 167.498 153.369 167.415Q153.6 167.333 153.827 167.239Q154.054 167.145 154.276 167.04Q154.497 166.935 154.714 166.819Q154.93 166.703 155.141 166.577Q155.352 166.451 155.556 166.315Q155.76 166.178 155.957 166.032Q156.154 165.886 156.344 165.73Q156.534 165.574 156.716 165.41Q156.897 165.245 157.071 165.071Q157.245 164.897 157.41 164.716Q157.574 164.534 157.73 164.344Q157.886 164.154 158.032 163.957Q158.178 163.76 158.315 163.556Q158.451 163.352 158.577 163.141Q158.703 162.93 158.819 162.714Q158.935 162.497 159.04 162.276Q159.145 162.054 159.239 161.827Q159.333 161.6 159.415 161.369Q159.498 161.138 159.569 160.903Q159.641 160.668 159.7 160.43Q159.76 160.192 159.808 159.951Q159.856 159.71 159.892 159.467Q159.928 159.224 159.952 158.98Q159.976 158.736 159.988 158.491Q160 158.245 160 158L160 129Q160 128.755 159.988 128.509Q159.976 128.264 159.952 128.02Q159.928 127.776 159.892 127.533Q159.856 127.29 159.808 127.049Q159.76 126.808 159.7 126.57Q159.641 126.332 159.569 126.097Q159.498 125.862 159.415 125.631Q159.333 125.4 159.239 125.173Q159.145 124.946 159.04 124.724Q158.935 124.503 158.819 124.286Q158.703 124.07 158.577 123.859Q158.451 123.648 158.315 123.444Q158.178 123.24 158.032 123.043Q157.886 122.846 157.73 122.656Q157.574 122.466 157.41 122.284Q157.245 122.103 157.071 121.929Q156.897 121.755 156.716 121.59Q156.534 121.426 156.344 121.27Q156.154 121.114 155.957 120.968Q155.76 120.822 155.556 120.685Q155.352 120.549 155.141 120.423Q154.93 120.296 154.714 120.181Q154.497 120.065 154.276 119.96Q154.054 119.855 153.827 119.761Q153.6 119.667 153.369 119.585Q153.138 119.502 152.903 119.431Q152.668 119.359 152.43 119.3Q152.192 119.24 151.951 119.192Q151.71 119.144 151.467 119.108Q151.224 119.072 150.98 119.048Q150.736 119.024 150.491 119.012Q150.245 119 150 119L145 119Q144.755 119 144.509 119.012Q144.264 119.024 144.02 119.048Q143.776 119.072 143.533 119.108Q143.29 119.144 143.049 119.192Q142.808 119.24 142.57 119.3Q142.332 119.359 142.097 119.431Q141.862 119.502 141.631 119.585Q141.4 119.667 141.173 119.761Q140.946 119.855 140.724 119.96Q140.503 120.065 140.286 120.181Q140.07 120.296 139.859 120.423Q139.648 120.549 139.444 120.685Q139.24 120.822 139.043 120.968Q138.846 121.114 138.656 121.27Q138.466 121.426 138.284 121.59Q138.103 121.755 137.929 121.929Q137.755 122.103 137.59 122.284Q137.426 122.466 137.27 122.656Q137.114 122.846 136.968 123.043Q136.822 123.24 136.685 123.444Q136.549 123.648 136.423 123.859Q136.296 124.07 136.181 124.286Q136.065 124.503 135.96 124.724Q135.855 124.946 135.761 125.173Q135.667 125.4 135.585 125.631Q135.502 125.862 135.431 126.097Q135.359 126.332 135.3 126.57Q135.24 126.808 135.192 127.049Q135.144 127.29 135.108 127.533Q135.072 127.776 135.048 128.02Q135.024 128.264 135.012 128.509Q135 128.755 135 129"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path transform="scale(2 2)" d="M48.7126 42.6405Q48.5741 42.928 48.4217 43.2084Q48.2693 43.4888 48.1033 43.7614Q47.9373 44.0339 47.7582 44.298Q47.579 44.5621 47.3871 44.8171Q47.1952 45.0721 46.9911 45.3174Q46.7869 45.5626 46.5709 45.7976Q46.3549 46.0325 46.1277 46.2566Q45.9005 46.4807 45.6625 46.6933Q45.4245 46.906 45.1764 47.1067Q44.9283 47.3074 44.6707 47.4957Q44.413 47.684 44.1464 47.8595Q43.8798 48.0349 43.605 48.1971Q43.3301 48.3592 43.0476 48.5077Q42.7651 48.6561 42.4757 48.7905Q42.1862 48.925 41.8905 49.045Q41.5949 49.1651 41.2936 49.2705Q40.9924 49.3759 40.6864 49.4664Q40.3803 49.5569 40.0702 49.6322Q39.7601 49.7076 39.4467 49.7677Q39.1333 49.8277 38.8173 49.8723Q38.5013 49.917 38.1835 49.946Q37.8657 49.9751 37.5468 49.9885Q37.228 50.0019 36.9088 49.9997Q36.5897 49.9974 36.2711 49.9795Q35.9525 49.9616 35.6351 49.9281Q35.3177 49.8946 35.0024 49.8456Q34.687 49.7966 34.3745 49.7321Q34.0619 49.6677 33.7529 49.5879Q33.4439 49.5082 33.1392 49.4135Q32.8344 49.3187 32.5347 49.2091Q32.235 49.0994 31.941 48.9753Q31.647 48.8511 31.3595 48.7126Q31.072 48.5741 30.7916 48.4217Q30.5112 48.2693 30.2386 48.1033Q29.9661 47.9373 29.702 47.7582Q29.4379 47.579 29.1829 47.3871Q28.9279 47.1952 28.6826 46.9911Q28.4374 46.7869 28.2024 46.5709Q27.9674 46.3549 27.7434 46.1277Q27.5193 45.9005 27.3067 45.6625Q27.094 45.4245 26.8933 45.1764Q26.6926 44.9283 26.5043 44.6707Q26.3159 44.413 26.1405 44.1464Q25.9651 43.8798 25.8029 43.605Q25.6408 43.3301 25.4923 43.0476Q25.3439 42.7651 25.2095 42.4757Q25.075 42.1862 24.955 41.8905Q24.8349 41.5949 24.7295 41.2936Q24.6241 40.9924 24.5336 40.6864Q24.4431 40.3803 24.3678 40.0702Q24.2924 39.7601 24.2323 39.4467Q24.1723 39.1333 24.1276 38.8173Q24.083 38.5013 24.054 38.1835Q24.0249 37.8657 24.0115 37.5468Q23.9981 37.228 24.0003 36.9088Q24.0026 36.5897 24.0204 36.2711Q24.0383 35.9525 24.0719 35.6351Q24.1054 35.3177 24.1544 35.0024Q24.2034 34.687 24.2679 34.3745Q24.3323 34.0619 24.4121 33.7529Q24.4918 33.4439 24.5865 33.1392Q24.6813 32.8344 24.7909 32.5347Q24.9006 32.235 25.0247 31.941Q25.1489 31.647 25.2874 31.3595Q25.4259 31.072 25.5783 30.7916Q25.7307 30.5112 25.8967 30.2386Q26.0627 29.9661 26.2418 29.702Q26.421 29.4379 26.6129 29.1829Q26.8048 28.9279 27.0089 28.6826Q27.2131 28.4374 27.4291 28.2024Q27.6451 27.9674 27.8723 27.7434Q28.0995 27.5193 28.3375 27.3067Q28.5755 27.094 28.8236 26.8933Q29.0717 26.6926 29.3293 26.5043Q29.587 26.3159 29.8536 26.1405Q30.1201 25.9651 30.395 25.8029Q30.6699 25.6408 30.9524 25.4923Q31.2349 25.3439 31.5243 25.2095Q31.8138 25.075 32.1095 24.955Q32.4052 24.8349 32.7064 24.7295Q33.0076 24.6241 33.3136 24.5336Q33.6197 24.4431 33.9298 24.3678Q34.2399 24.2924 34.5533 24.2323Q34.8667 24.1723 35.1827 24.1276Q35.4987 24.083 35.8165 24.054Q36.1343 24.0249 36.4532 24.0115Q36.772 23.9981 37.0912 24.0003Q37.4103 24.0026 37.7289 24.0204Q38.0475 24.0383 38.3649 24.0719Q38.6823 24.1054 38.9976 24.1544Q39.313 24.2034 39.6255 24.2679Q39.9381 24.3323 40.2471 24.4121Q40.5561 24.4918 40.8608 24.5865Q41.1656 24.6813 41.4653 24.7909Q41.765 24.9006 42.059 25.0247Q42.353 25.1489 42.6405 25.2874Q43.1336 25.5249 43.605 25.8029Q44.0764 26.081 44.5227 26.3977Q44.9691 26.7144 45.3872 27.0675Q45.8054 27.4206 46.1924 27.8076Q46.5794 28.1946 46.9325 28.6128Q47.2856 29.0309 47.6023 29.4773Q47.919 29.9236 48.1971 30.395Q48.4751 30.8664 48.7126 31.3595L31 37"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="51" y="35" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="67" y="35" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="83" y="35" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="99" y="35" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="115" y="35" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="131" y="35" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="147" y="35" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="115" y="51" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="115" y="67" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="115" y="83" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="115" y="99" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="115" y="115" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="115" y="131" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="51" y="99" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="67" y="99" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="83" y="99" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="99" y="99" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="115" y="99" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="131" y="99" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<rect transform="scale(2 2)" x="147" y="99" width="4" height="4"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path transform="scale(2 2)" d="M83 116L83 102C83 94 89 88 97 88C105 88 111 94 111 102L111 116L106.333 111.333L101.666 116L97 111.333L92.333 116L87.666 111.333L83 116"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path fill="white" transform="scale(2 2)" d="M91 96C88 96 87 99 87 101C87 103 88 106 91 106C94 106 95 103 95 101C95 99 94 96 91 96M103 96C100 96 99 99 99 101C99 103 100 106 103 106C106 106 107 103 107 101C107 99 106 96 103 96"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path transform="scale(2 2)" d="M103 102Q103 101.902 102.99 101.804Q102.981 101.706 102.962 101.61Q102.942 101.513 102.914 101.419Q102.885 101.325 102.848 101.235Q102.81 101.144 102.764 101.057Q102.718 100.971 102.663 100.889Q102.608 100.807 102.546 100.731Q102.484 100.655 102.414 100.586Q102.345 100.516 102.269 100.454Q102.193 100.392 102.111 100.337Q102.029 100.282 101.943 100.236Q101.856 100.19 101.765 100.152Q101.675 100.115 101.581 100.086Q101.487 100.058 101.39 100.038Q101.294 100.019 101.196 100.01Q101.098 100 101 100Q100.902 100 100.804 100.01Q100.706 100.019 100.61 100.038Q100.513 100.058 100.419 100.086Q100.325 100.115 100.235 100.152Q100.144 100.19 100.057 100.236Q99.9705 100.282 99.8888 100.337Q99.8072 100.392 99.7312 100.454Q99.6553 100.516 99.5858 100.586Q99.5163 100.655 99.454 100.731Q99.3916 100.807 99.3371 100.889Q99.2825 100.971 99.2362 101.057Q99.1898 101.144 99.1522 101.235Q99.1146 101.325 99.0861 101.419Q99.0576 101.513 99.0384 101.61Q99.0193 101.706 99.0096 101.804Q99 101.902 99 102Q99 102.098 99.0096 102.196Q99.0193 102.294 99.0384 102.39Q99.0576 102.487 99.0861 102.581Q99.1146 102.675 99.1522 102.765Q99.1898 102.856 99.2362 102.943Q99.2825 103.029 99.3371 103.111Q99.3916 103.193 99.454 103.269Q99.5163 103.345 99.5858 103.414Q99.6553 103.484 99.7312 103.546Q99.8072 103.608 99.8888 103.663Q99.9705 103.718 100.057 103.764Q100.144 103.81 100.235 103.848Q100.325 103.885 100.419 103.914Q100.513 103.942 100.61 103.962Q100.706 103.981 100.804 103.99Q100.902 104 101 104Q101.098 104 101.196 103.99Q101.294 103.981 101.39 103.962Q101.487 103.942 101.581 103.914Q101.675 103.885 101.765 103.848Q101.856 103.81 101.943 103.764Q102.029 103.718 102.111 103.663Q102.193 103.608 102.269 103.546Q102.345 103.484 102.414 103.414Q102.484 103.345 102.546 103.269Q102.608 103.193 102.663 103.111Q102.718 103.029 102.764 102.943Q102.81 102.856 102.848 102.765Q102.885 102.675 102.914 102.581Q102.942 102.487 102.962 102.39Q102.981 102.294 102.99 102.196Q103 102.098 103 102"/>
|
||||
</g>
|
||||
<g clip-path="url(#cl_3)">
|
||||
<path transform="scale(2 2)" d="M91 102Q91 101.902 90.9904 101.804Q90.9807 101.706 90.9616 101.61Q90.9424 101.513 90.9139 101.419Q90.8854 101.325 90.8477 101.235Q90.8102 101.144 90.7638 101.057Q90.7175 100.971 90.6629 100.889Q90.6084 100.807 90.546 100.731Q90.4837 100.655 90.4142 100.586Q90.3447 100.516 90.2688 100.454Q90.1928 100.392 90.1111 100.337Q90.0294 100.282 89.9428 100.236Q89.8561 100.19 89.7654 100.152Q89.6746 100.115 89.5806 100.086Q89.4865 100.058 89.3902 100.038Q89.2938 100.019 89.196 100.01Q89.0983 100 89 100Q88.9017 100 88.804 100.01Q88.7062 100.019 88.6098 100.038Q88.5135 100.058 88.4194 100.086Q88.3254 100.115 88.2346 100.152Q88.1439 100.19 88.0572 100.236Q87.9706 100.282 87.8888 100.337Q87.8072 100.392 87.7312 100.454Q87.6553 100.516 87.5858 100.586Q87.5163 100.655 87.454 100.731Q87.3916 100.807 87.337 100.889Q87.2825 100.971 87.2361 101.057Q87.1898 101.144 87.1522 101.235Q87.1146 101.325 87.0861 101.419Q87.0576 101.513 87.0384 101.61Q87.0193 101.706 87.0096 101.804Q87 101.902 87 102Q87 102.098 87.0096 102.196Q87.0193 102.294 87.0384 102.39Q87.0576 102.487 87.0861 102.581Q87.1146 102.675 87.1522 102.765Q87.1898 102.856 87.2361 102.943Q87.2825 103.029 87.337 103.111Q87.3916 103.193 87.454 103.269Q87.5163 103.345 87.5858 103.414Q87.6553 103.484 87.7312 103.546Q87.8071 103.608 87.8888 103.663Q87.9706 103.718 88.0572 103.764Q88.1439 103.81 88.2346 103.848Q88.3254 103.885 88.4194 103.914Q88.5135 103.942 88.6098 103.962Q88.7062 103.981 88.804 103.99Q88.9017 104 89 104Q89.0983 104 89.196 103.99Q89.2938 103.981 89.3902 103.962Q89.4865 103.942 89.5806 103.914Q89.6746 103.885 89.7654 103.848Q89.8561 103.81 89.9428 103.764Q90.0294 103.718 90.1111 103.663Q90.1928 103.608 90.2688 103.546Q90.3447 103.484 90.4142 103.414Q90.4837 103.345 90.546 103.269Q90.6084 103.193 90.6629 103.111Q90.7175 103.029 90.7638 102.943Q90.8102 102.856 90.8477 102.765Q90.8854 102.675 90.9139 102.581Q90.9424 102.487 90.9616 102.39Q90.9807 102.294 90.9904 102.196Q91 102.098 91 102"/>
|
||||
</g>
|
||||
</g>
|
||||
</defs>
|
||||
<use href="#group_0"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 34 KiB |
23
readme.md
23
readme.md
@ -4,24 +4,21 @@ Convert HTML and `<canvas>` to SVG using Chromium.
|
||||
|
||||
## Usage
|
||||
|
||||
> A Docker image is currently being built.
|
||||
|
||||
### CLI
|
||||
|
||||
```shell
|
||||
$ html2svg http://google.com > google.svg
|
||||
```
|
||||
|
||||
### Server
|
||||
|
||||
```shell
|
||||
$ html2svg serve --port 8765
|
||||
$ curl -d http://google.com http://localhost:8765 > google.svg
|
||||
$ docker run fathyb/html2svg https://google.com > google.svg
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
> - Building Chromium for ARM on Linux or Windows is not officially supported, cross-compile from x64 instead.
|
||||
> - Building Chromium for ARM on Linux or Windows is not officially supported, cross-compile from x64 instead.
|
||||
|
||||
### Docker
|
||||
|
||||
```shell
|
||||
$ docker buildx build . --platform linux/arm64,linux/amd64
|
||||
```
|
||||
|
||||
### Local
|
||||
|
||||
1. Fetch dependencies:
|
||||
```shell
|
||||
|
9
scripts/docker-entrypoint.sh
Executable file
9
scripts/docker-entrypoint.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
export DISPLAY=:99
|
||||
|
||||
Xvfb $DISPLAY -screen 0 1920x1080x8 &
|
||||
/runtime/electron --no-sandbox --headless --disable-dev-shm-usage /app/build/html2svg.js "$@"
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
git -C electron/src apply --ignore-space-change --ignore-whitespace < src/chromium.patch
|
||||
git -C electron/src/third_party/skia apply --ignore-space-change --ignore-whitespace < src/skia.patch
|
||||
git -C electron/src apply --ignore-space-change --ignore-whitespace --reject < src/chromium.patch
|
||||
git -C electron/src/third_party/skia apply --ignore-space-change --ignore-whitespace --reject < src/skia.patch
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 6a7e5ab92e6fa..be390eac56d3c 100644
|
||||
index 97cf24ad5f4a6..c1191c49697ca 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -254,6 +254,12 @@
|
||||
@@ -256,6 +256,12 @@
|
||||
#include "content/renderer/java/gin_java_bridge_dispatcher.h"
|
||||
#endif
|
||||
|
||||
@ -15,7 +15,7 @@ index 6a7e5ab92e6fa..be390eac56d3c 100644
|
||||
using base::Time;
|
||||
using blink::ContextMenuData;
|
||||
using blink::WebContentDecryptionModule;
|
||||
@@ -3842,6 +3848,93 @@ void RenderFrameImpl::DidClearWindowObject() {
|
||||
@@ -3822,6 +3828,93 @@ void RenderFrameImpl::DidClearWindowObject() {
|
||||
|
||||
for (auto& observer : observers_)
|
||||
observer.DidClearWindowObject();
|
||||
@ -110,10 +110,10 @@ index 6a7e5ab92e6fa..be390eac56d3c 100644
|
||||
|
||||
void RenderFrameImpl::DidCreateDocumentElement() {
|
||||
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
|
||||
index edc61a93bb7a1..62c4b418aedae 100644
|
||||
index 7a096b9a887d9..7440e54650989 100644
|
||||
--- a/skia/BUILD.gn
|
||||
+++ b/skia/BUILD.gn
|
||||
@@ -307,6 +307,15 @@ component("skia") {
|
||||
@@ -316,6 +316,15 @@ component("skia") {
|
||||
]
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ index edc61a93bb7a1..62c4b418aedae 100644
|
||||
# The *_public variables should be added to 'public' not 'sources'.
|
||||
# However, Skia does not export enough *_public variables to make Chromium
|
||||
# 'gn check' clean. Until that can be done add the *_public variables to
|
||||
@@ -369,9 +378,6 @@ component("skia") {
|
||||
@@ -386,9 +395,6 @@ component("skia") {
|
||||
sources += [ "//third_party/skia/src/core/SkUtilsArm.cpp" ]
|
||||
}
|
||||
|
||||
@ -137,10 +137,10 @@ index edc61a93bb7a1..62c4b418aedae 100644
|
||||
- sources -= [ "//third_party/skia/src/utils/SkParsePath.cpp" ]
|
||||
-
|
||||
if (is_win) {
|
||||
libs = [ "fontsub.lib" ]
|
||||
}
|
||||
sources -= [
|
||||
# Keeping _win.cpp
|
||||
diff --git a/third_party/blink/public/web/web_frame_widget.h b/third_party/blink/public/web/web_frame_widget.h
|
||||
index 6264d513b398c..f304767c1bcdd 100644
|
||||
index 9b9d54e43a1a1..e2eaad722cc08 100644
|
||||
--- a/third_party/blink/public/web/web_frame_widget.h
|
||||
+++ b/third_party/blink/public/web/web_frame_widget.h
|
||||
@@ -48,6 +48,10 @@
|
||||
@ -154,7 +154,7 @@ index 6264d513b398c..f304767c1bcdd 100644
|
||||
namespace cc {
|
||||
struct ApplyViewportChangesArgs;
|
||||
class LayerTreeHost;
|
||||
@@ -227,6 +231,9 @@ class WebFrameWidget : public WebWidget {
|
||||
@@ -223,6 +227,9 @@ class WebFrameWidget : public WebWidget {
|
||||
// GPU benchmarking extension needs access to the LayerTreeHost
|
||||
friend class GpuBenchmarkingContext;
|
||||
|
||||
@ -165,7 +165,7 @@ index 6264d513b398c..f304767c1bcdd 100644
|
||||
// WebFrameWidgetImpl is the only concrete subclass that implements
|
||||
// WebFrameWidget, so that it is safe to downcast to WebFrameWidgetImpl.
|
||||
diff --git a/third_party/blink/renderer/core/frame/remote_frame_view.cc b/third_party/blink/renderer/core/frame/remote_frame_view.cc
|
||||
index 52e5d82981643..1d1865d641313 100644
|
||||
index a3e8944556ccd..874863225fda7 100644
|
||||
--- a/third_party/blink/renderer/core/frame/remote_frame_view.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/remote_frame_view.cc
|
||||
@@ -419,7 +419,9 @@ uint32_t RemoteFrameView::Print(const gfx::Rect& rect,
|
||||
@ -180,7 +180,7 @@ index 52e5d82981643..1d1865d641313 100644
|
||||
// RACE: there is a possibility that the embedding token will be null and
|
||||
// still be in a valid state. This can occur is the frame has recently
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/font.cc b/third_party/blink/renderer/platform/fonts/font.cc
|
||||
index 7b5c0ef5121e1..34718e30fb614 100644
|
||||
index 67ba540bfc2b0..f22e6988cf488 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/font.cc
|
||||
+++ b/third_party/blink/renderer/platform/fonts/font.cc
|
||||
@@ -230,15 +230,22 @@ void Font::DrawText(cc::PaintCanvas* canvas,
|
||||
|
@ -1,14 +1,34 @@
|
||||
import { app, BrowserWindow } from 'electron'
|
||||
|
||||
app.dock.hide()
|
||||
// app.commandLine.appendSwitch('enable-logging')
|
||||
app.commandLine.appendSwitch('headless')
|
||||
app.whenReady()
|
||||
.then(async () => {
|
||||
|
||||
Promise.resolve().then(async () => {
|
||||
const entry = process.argv.find(a => a.endsWith('html2svg.js'))
|
||||
const index = entry ? process.argv.indexOf(entry) : -1
|
||||
const args = process.argv.slice(Math.max(2, index + 1))
|
||||
const [url] = args
|
||||
|
||||
if (!url) {
|
||||
throw new Error('Usage: html2svg [url]')
|
||||
}
|
||||
|
||||
app.dock?.hide()
|
||||
app.commandLine.appendSwitch('headless')
|
||||
app.commandLine.appendSwitch('no-sandbox')
|
||||
app.commandLine.appendSwitch('disable-gpu')
|
||||
|
||||
await app.whenReady()
|
||||
|
||||
return url
|
||||
})
|
||||
.then(async (url) => {
|
||||
const page = new BrowserWindow({
|
||||
show: false,
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
|
||||
webPreferences: {
|
||||
sandbox: false,
|
||||
}
|
||||
})
|
||||
|
||||
try {
|
||||
@ -28,7 +48,7 @@ app.whenReady()
|
||||
|
||||
page.webContents.once('did-finish-load', listener)
|
||||
|
||||
await page.loadURL('https://yari-demos.prod.mdn.mozit.cloud/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes/_sample_.making_combinations.html')
|
||||
await page.loadURL(url)
|
||||
})
|
||||
.catch(reject),
|
||||
)
|
||||
@ -61,8 +81,8 @@ app.whenReady()
|
||||
page.destroy()
|
||||
}
|
||||
})
|
||||
.then((result) => {
|
||||
console.log(result)
|
||||
.then(async (result) => {
|
||||
await print(result)
|
||||
|
||||
process.exit(0)
|
||||
})
|
||||
@ -71,3 +91,17 @@ app.whenReady()
|
||||
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
// Electron seems to drop lines if we send them too fast on slow streams like Docker..
|
||||
async function print(output: string) {
|
||||
const awfulBugSizeHeuristic = 1024
|
||||
|
||||
for(let i = 0; i < output.length; i += awfulBugSizeHeuristic) {
|
||||
await new Promise<void>((resolve, reject) =>
|
||||
process.stdout.write(
|
||||
output.slice(i, i + awfulBugSizeHeuristic),
|
||||
error => error ? reject(error) : resolve(),
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
145
src/skia.patch
145
src/skia.patch
@ -1,63 +1,5 @@
|
||||
diff --git a/src/shaders/SkColorFilterShader.cpp b/src/shaders/SkColorFilterShader.cpp
|
||||
index 3981219cb8..42302ebfb8 100644
|
||||
--- a/src/shaders/SkColorFilterShader.cpp
|
||||
+++ b/src/shaders/SkColorFilterShader.cpp
|
||||
@@ -31,6 +31,11 @@ SkColorFilterShader::SkColorFilterShader(sk_sp<SkShader> shader,
|
||||
SkASSERT(fFilter);
|
||||
}
|
||||
|
||||
+SkShaderBase::GradientType SkColorFilterShader::asGradient(GradientInfo* info,
|
||||
+ SkMatrix* localMatrix) const {
|
||||
+ return as_SB(fShader)->asGradient(info, localMatrix);
|
||||
+}
|
||||
+
|
||||
sk_sp<SkFlattenable> SkColorFilterShader::CreateProc(SkReadBuffer& buffer) {
|
||||
auto shader = buffer.readShader();
|
||||
auto filter = buffer.readColorFilter();
|
||||
diff --git a/src/shaders/SkColorFilterShader.h b/src/shaders/SkColorFilterShader.h
|
||||
index 25dc3ca922..c5865a7cac 100644
|
||||
--- a/src/shaders/SkColorFilterShader.h
|
||||
+++ b/src/shaders/SkColorFilterShader.h
|
||||
@@ -21,6 +21,8 @@ public:
|
||||
std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(const GrFPArgs&) const override;
|
||||
#endif
|
||||
|
||||
+ GradientType asGradient(GradientInfo* info, SkMatrix* localMatrix) const override;
|
||||
+
|
||||
private:
|
||||
bool isOpaque() const override;
|
||||
void flatten(SkWriteBuffer&) const override;
|
||||
diff --git a/src/shaders/SkTransformShader.cpp b/src/shaders/SkTransformShader.cpp
|
||||
index 5e4769654e..5419ecb3bd 100644
|
||||
--- a/src/shaders/SkTransformShader.cpp
|
||||
+++ b/src/shaders/SkTransformShader.cpp
|
||||
@@ -11,6 +11,11 @@
|
||||
|
||||
SkTransformShader::SkTransformShader(const SkShaderBase& shader) : fShader{shader} {}
|
||||
|
||||
+SkShaderBase::GradientType SkTransformShader::asGradient(GradientInfo* info,
|
||||
+ SkMatrix* localMatrix) const {
|
||||
+ return as_SB(&fShader)->asGradient(info, localMatrix);
|
||||
+}
|
||||
+
|
||||
skvm::Color SkTransformShader::onProgram(skvm::Builder* b,
|
||||
skvm::Coord device, skvm::Coord local, skvm::Color color,
|
||||
const SkMatrixProvider& matrices, const SkMatrix* localM,
|
||||
diff --git a/src/shaders/SkTransformShader.h b/src/shaders/SkTransformShader.h
|
||||
index 6114b21d55..80234bc578 100644
|
||||
--- a/src/shaders/SkTransformShader.h
|
||||
+++ b/src/shaders/SkTransformShader.h
|
||||
@@ -17,6 +17,8 @@ class SkTransformShader : public SkUpdatableShader {
|
||||
public:
|
||||
explicit SkTransformShader(const SkShaderBase& shader);
|
||||
|
||||
+ GradientType asGradient(GradientInfo* info, SkMatrix* localMatrix) const override;
|
||||
+
|
||||
// Adds instructions to use the mapping stored in the uniforms represented by fMatrix. After
|
||||
// generating a new skvm::Coord, it passes the mapped coordinates to fShader's onProgram
|
||||
// along with the identity matrix.
|
||||
diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp
|
||||
index 9a7084ff3b..aae3f3a77b 100644
|
||||
index dcb51de458..1aeda3cef5 100644
|
||||
--- a/src/svg/SkSVGDevice.cpp
|
||||
+++ b/src/svg/SkSVGDevice.cpp
|
||||
@@ -48,6 +48,7 @@
|
||||
@ -136,7 +78,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
}
|
||||
|
||||
void addAttribute(const char name[], const char val[]) {
|
||||
@@ -352,6 +378,7 @@ private:
|
||||
@@ -351,6 +377,7 @@ private:
|
||||
|
||||
SkXMLWriter* fWriter;
|
||||
ResourceBucket* fResourceBucket;
|
||||
@ -144,7 +86,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
};
|
||||
|
||||
void SkSVGDevice::AutoElement::addPaint(const SkPaint& paint, const Resources& resources) {
|
||||
@@ -367,18 +394,25 @@ void SkSVGDevice::AutoElement::addPaint(const SkPaint& paint, const Resources& r
|
||||
@@ -366,18 +393,25 @@ void SkSVGDevice::AutoElement::addPaint(const SkPaint& paint, const Resources& r
|
||||
static constexpr char kDefaultFill[] = "black";
|
||||
if (!resources.fPaintServer.equals(kDefaultFill)) {
|
||||
this->addAttribute("fill", resources.fPaintServer);
|
||||
@ -175,7 +117,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
}
|
||||
|
||||
if (style == SkPaint::kStroke_Style || style == SkPaint::kStrokeAndFill_Style) {
|
||||
@@ -417,16 +451,29 @@ Resources SkSVGDevice::AutoElement::addResources(const MxCp& mc, const SkPaint&
|
||||
@@ -416,16 +450,29 @@ Resources SkSVGDevice::AutoElement::addResources(const MxCp& mc, const SkPaint&
|
||||
Resources resources(paint);
|
||||
|
||||
if (paint.getShader()) {
|
||||
@ -210,7 +152,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,6 +512,14 @@ void SkSVGDevice::AutoElement::addGradientShaderResources(const SkShader* shader
|
||||
@@ -464,6 +511,14 @@ void SkSVGDevice::AutoElement::addGradientShaderResources(const SkShader* shader
|
||||
void SkSVGDevice::AutoElement::addColorFilterResources(const SkColorFilter& cf,
|
||||
Resources* resources) {
|
||||
SkString colorfilterID = fResourceBucket->addColorFilter();
|
||||
@ -225,7 +167,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
{
|
||||
AutoElement filterElement("filter", fWriter);
|
||||
filterElement.addAttribute("id", colorfilterID);
|
||||
@@ -473,12 +528,6 @@ void SkSVGDevice::AutoElement::addColorFilterResources(const SkColorFilter& cf,
|
||||
@@ -472,12 +527,6 @@ void SkSVGDevice::AutoElement::addColorFilterResources(const SkColorFilter& cf,
|
||||
filterElement.addAttribute("width", "100%");
|
||||
filterElement.addAttribute("height", "100%");
|
||||
|
||||
@ -238,7 +180,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
{
|
||||
// first flood with filter color
|
||||
AutoElement floodElement("feFlood", fWriter);
|
||||
@@ -491,7 +540,7 @@ void SkSVGDevice::AutoElement::addColorFilterResources(const SkColorFilter& cf,
|
||||
@@ -490,7 +539,7 @@ void SkSVGDevice::AutoElement::addColorFilterResources(const SkColorFilter& cf,
|
||||
// apply the transform to filter color
|
||||
AutoElement compositeElement("feComposite", fWriter);
|
||||
compositeElement.addAttribute("in", "flood");
|
||||
@ -247,23 +189,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
}
|
||||
}
|
||||
resources->fColorFilter.printf("url(#%s)", colorfilterID.c_str());
|
||||
@@ -602,7 +651,15 @@ void SkSVGDevice::AutoElement::addShaderResources(const SkPaint& paint, Resource
|
||||
const SkShader* shader = paint.getShader();
|
||||
SkASSERT(shader);
|
||||
|
||||
+ // {
|
||||
+ // AutoElement type("text", fWriter);
|
||||
+
|
||||
+ // type.addText(SkStringPrintf("type=%d", as_SB(shader)->asGradient()));
|
||||
+ // }
|
||||
+
|
||||
if (as_SB(shader)->asGradient() != SkShaderBase::GradientType::kNone) {
|
||||
+ AutoElement defs("defs", fWriter);
|
||||
+
|
||||
this->addGradientShaderResources(shader, paint, resources);
|
||||
} else if (shader->isAImage()) {
|
||||
this->addImageShaderResources(shader, paint, resources);
|
||||
@@ -709,12 +766,16 @@ void SkSVGDevice::AutoElement::addTextAttributes(const SkFont& font) {
|
||||
@@ -707,12 +756,16 @@ void SkSVGDevice::AutoElement::addTextAttributes(const SkFont& font) {
|
||||
continue;
|
||||
}
|
||||
familySet.add(familyString.fString);
|
||||
@ -284,7 +210,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
}
|
||||
|
||||
sk_sp<SkBaseDevice> SkSVGDevice::Make(const SkISize& size, std::unique_ptr<SkXMLWriter> writer,
|
||||
@@ -723,12 +784,18 @@ sk_sp<SkBaseDevice> SkSVGDevice::Make(const SkISize& size, std::unique_ptr<SkXML
|
||||
@@ -721,12 +774,18 @@ sk_sp<SkBaseDevice> SkSVGDevice::Make(const SkISize& size, std::unique_ptr<SkXML
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
@ -304,7 +230,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
{
|
||||
SkASSERT(fWriter);
|
||||
|
||||
@@ -741,15 +808,44 @@ SkSVGDevice::SkSVGDevice(const SkISize& size, std::unique_ptr<SkXMLWriter> write
|
||||
@@ -739,15 +798,44 @@ SkSVGDevice::SkSVGDevice(const SkISize& size, std::unique_ptr<SkXMLWriter> write
|
||||
fRootElement->addAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
|
||||
fRootElement->addAttribute("width", size.width());
|
||||
fRootElement->addAttribute("height", size.height());
|
||||
@ -350,7 +276,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
SkParsePath::PathEncoding SkSVGDevice::pathEncoding() const {
|
||||
return (fFlags & SkSVGCanvas::kRelativePathEncoding_Flag)
|
||||
? SkParsePath::PathEncoding::Relative
|
||||
@@ -764,7 +860,7 @@ void SkSVGDevice::syncClipStack(const SkClipStack& cs) {
|
||||
@@ -762,7 +850,7 @@ void SkSVGDevice::syncClipStack(const SkClipStack& cs) {
|
||||
|
||||
// First, find/preserve the common bottom.
|
||||
while ((elem = iter.next()) && (rec_idx < fClipStack.size())) {
|
||||
@ -359,7 +285,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
break;
|
||||
}
|
||||
rec_idx++;
|
||||
@@ -781,6 +877,13 @@ void SkSVGDevice::syncClipStack(const SkClipStack& cs) {
|
||||
@@ -779,6 +867,13 @@ void SkSVGDevice::syncClipStack(const SkClipStack& cs) {
|
||||
AutoElement clip_path("clipPath", fWriter);
|
||||
clip_path.addAttribute("id", cid);
|
||||
|
||||
@ -373,7 +299,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
// TODO: handle non-intersect clips.
|
||||
|
||||
switch (e->getDeviceSpaceType()) {
|
||||
@@ -814,25 +917,25 @@ void SkSVGDevice::syncClipStack(const SkClipStack& cs) {
|
||||
@@ -812,25 +907,25 @@ void SkSVGDevice::syncClipStack(const SkClipStack& cs) {
|
||||
// TODO: handle shader clipping, perhaps rasterize and apply as a mask image?
|
||||
break;
|
||||
}
|
||||
@ -408,7 +334,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
rect.addRectAttributes(SkRect::MakeWH(SkIntToScalar(this->width()),
|
||||
SkIntToScalar(this->height())));
|
||||
}
|
||||
@@ -892,11 +995,11 @@ void SkSVGDevice::drawPoints(SkCanvas::PointMode mode, size_t count,
|
||||
@@ -890,11 +985,11 @@ void SkSVGDevice::drawPoints(SkCanvas::PointMode mode, size_t count,
|
||||
void SkSVGDevice::drawRect(const SkRect& r, const SkPaint& paint) {
|
||||
std::unique_ptr<AutoElement> svg;
|
||||
if (RequiresViewportReset(paint)) {
|
||||
@ -422,7 +348,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
|
||||
if (svg) {
|
||||
rect.addAttribute("x", 0);
|
||||
@@ -909,7 +1012,7 @@ void SkSVGDevice::drawRect(const SkRect& r, const SkPaint& paint) {
|
||||
@@ -907,7 +1002,7 @@ void SkSVGDevice::drawRect(const SkRect& r, const SkPaint& paint) {
|
||||
}
|
||||
|
||||
void SkSVGDevice::drawOval(const SkRect& oval, const SkPaint& paint) {
|
||||
@ -431,7 +357,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
ellipse.addAttribute("cx", oval.centerX());
|
||||
ellipse.addAttribute("cy", oval.centerY());
|
||||
ellipse.addAttribute("rx", oval.width() / 2);
|
||||
@@ -917,7 +1020,7 @@ void SkSVGDevice::drawOval(const SkRect& oval, const SkPaint& paint) {
|
||||
@@ -915,7 +1010,7 @@ void SkSVGDevice::drawOval(const SkRect& oval, const SkPaint& paint) {
|
||||
}
|
||||
|
||||
void SkSVGDevice::drawRRect(const SkRRect& rr, const SkPaint& paint) {
|
||||
@ -440,7 +366,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
elem.addPathAttributes(SkPath::RRect(rr), this->pathEncoding());
|
||||
}
|
||||
|
||||
@@ -950,7 +1053,7 @@ void SkSVGDevice::drawPath(const SkPath& path, const SkPaint& paint, bool pathIs
|
||||
@@ -948,7 +1043,7 @@ void SkSVGDevice::drawPath(const SkPath& path, const SkPaint& paint, bool pathIs
|
||||
}
|
||||
|
||||
// Create path element.
|
||||
@ -449,7 +375,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
elem.addPathAttributes(*pathPtr, this->pathEncoding());
|
||||
|
||||
// TODO: inverse fill types?
|
||||
@@ -977,7 +1080,7 @@ void SkSVGDevice::drawBitmapCommon(const MxCp& mc, const SkBitmap& bm, const SkP
|
||||
@@ -975,7 +1070,7 @@ void SkSVGDevice::drawBitmapCommon(const MxCp& mc, const SkBitmap& bm, const SkP
|
||||
SkString svgImageData("data:image/png;base64,");
|
||||
svgImageData.append(b64Data.get(), b64Size);
|
||||
|
||||
@ -458,7 +384,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
{
|
||||
AutoElement defs("defs", fWriter);
|
||||
{
|
||||
@@ -990,7 +1093,7 @@ void SkSVGDevice::drawBitmapCommon(const MxCp& mc, const SkBitmap& bm, const SkP
|
||||
@@ -988,7 +1083,7 @@ void SkSVGDevice::drawBitmapCommon(const MxCp& mc, const SkBitmap& bm, const SkP
|
||||
}
|
||||
|
||||
{
|
||||
@ -467,7 +393,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
imageUse.addAttribute("xlink:href", SkStringPrintf("#%s", imageID.c_str()));
|
||||
}
|
||||
}
|
||||
@@ -1085,8 +1188,14 @@ private:
|
||||
@@ -1083,8 +1178,14 @@ private:
|
||||
}
|
||||
|
||||
position += fOrigin;
|
||||
@ -484,7 +410,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
|
||||
if (fConstYStr.isEmpty()) {
|
||||
fConstYStr = fPosYStr;
|
||||
@@ -1128,7 +1237,7 @@ void SkSVGDevice::onDrawGlyphRunList(SkCanvas* canvas,
|
||||
@@ -1126,7 +1227,7 @@ void SkSVGDevice::onDrawGlyphRunList(SkCanvas* canvas,
|
||||
|
||||
// Emit one <text> element for each run.
|
||||
for (auto& glyphRun : glyphRunList) {
|
||||
@ -493,7 +419,7 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
elem.addTextAttributes(glyphRun.font());
|
||||
|
||||
SVGTextBuilder builder(glyphRunList.origin(), glyphRun);
|
||||
@@ -1147,3 +1256,106 @@ void SkSVGDevice::drawMesh(const SkMesh&, sk_sp<SkBlender>, const SkPaint&) {
|
||||
@@ -1145,3 +1246,106 @@ void SkSVGDevice::drawMesh(const SkMesh&, sk_sp<SkBlender>, const SkPaint&) {
|
||||
// todo
|
||||
}
|
||||
#endif
|
||||
@ -601,11 +527,11 @@ index 9a7084ff3b..aae3f3a77b 100644
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/svg/SkSVGDevice.h b/src/svg/SkSVGDevice.h
|
||||
index edb8a8c00c..8cbc4d7994 100644
|
||||
index 8705ad5066..470962c068 100644
|
||||
--- a/src/svg/SkSVGDevice.h
|
||||
+++ b/src/svg/SkSVGDevice.h
|
||||
@@ -15,6 +15,9 @@
|
||||
#include "include/private/SkTemplates.h"
|
||||
@@ -14,6 +14,9 @@
|
||||
#include "include/private/SkTArray.h"
|
||||
#include "include/utils/SkParsePath.h"
|
||||
#include "src/core/SkClipStackDevice.h"
|
||||
+#include "src/core/SkDraw.h"
|
||||
@ -614,7 +540,7 @@ index edb8a8c00c..8cbc4d7994 100644
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
@@ -36,6 +39,7 @@ class SkPath;
|
||||
@@ -34,6 +37,7 @@ class SkPath;
|
||||
class SkRRect;
|
||||
class SkVertices;
|
||||
class SkXMLWriter;
|
||||
@ -622,7 +548,7 @@ index edb8a8c00c..8cbc4d7994 100644
|
||||
struct SkISize;
|
||||
struct SkPoint;
|
||||
struct SkRect;
|
||||
@@ -72,15 +76,20 @@ protected:
|
||||
@@ -70,15 +74,20 @@ protected:
|
||||
#ifdef SK_ENABLE_SKSL
|
||||
void drawMesh(const SkMesh&, sk_sp<SkBlender>, const SkPaint&) override;
|
||||
#endif
|
||||
@ -644,20 +570,13 @@ index edb8a8c00c..8cbc4d7994 100644
|
||||
SkParsePath::PathEncoding pathEncoding() const;
|
||||
|
||||
class AutoElement;
|
||||
@@ -90,17 +99,38 @@ private:
|
||||
@@ -88,13 +97,38 @@ private:
|
||||
const std::unique_ptr<ResourceBucket> fResourceBucket;
|
||||
const uint32_t fFlags;
|
||||
|
||||
- struct ClipRec {
|
||||
- std::unique_ptr<AutoElement> fClipPathElem;
|
||||
- uint32_t fGenID;
|
||||
-
|
||||
- static_assert(::sk_is_trivially_relocatable<decltype(fClipPathElem)>::value);
|
||||
+ ResourceBucket* bucket() {
|
||||
+ return fRootDevice->fResourceBucket.get();
|
||||
+ }
|
||||
|
||||
- using sk_is_trivially_relocatable = std::true_type;
|
||||
+ SkSVGDevice* fRootDevice;
|
||||
+ std::unique_ptr<AutoElement> fRootElement;
|
||||
+ std::unique_ptr<AutoElement> fRootDefsElement;
|
||||
@ -667,6 +586,10 @@ index edb8a8c00c..8cbc4d7994 100644
|
||||
+ SkString fClipPathID;
|
||||
+ bool fWriteUseElement = true;
|
||||
+
|
||||
+ ResourceBucket* bucket() {
|
||||
+ return fRootDevice->fResourceBucket.get();
|
||||
+ }
|
||||
+
|
||||
+ class Layer {
|
||||
+ public:
|
||||
+ Layer(const SkISize& size, uint32_t flags, SkSVGDevice* root)
|
||||
@ -685,8 +608,8 @@ index edb8a8c00c..8cbc4d7994 100644
|
||||
+ const SkDOMNode* fNode = nullptr;
|
||||
};
|
||||
|
||||
- std::unique_ptr<AutoElement> fRootElement;
|
||||
- SkTArray<ClipRec> fClipStack;
|
||||
- std::unique_ptr<AutoElement> fRootElement;
|
||||
- SkTArray<ClipRec> fClipStack;
|
||||
+ std::vector<std::unique_ptr<Layer>> fLayers;
|
||||
|
||||
using INHERITED = SkClipStackDevice;
|
||||
|
Loading…
Reference in New Issue
Block a user