update: added support for IMU and Lottie JSON

This commit is contained in:
2026-01-24 13:50:49 +05:30
parent ecf234efa5
commit 2c731c72e3
868 changed files with 318873 additions and 894 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
test_compiler_flags = compiler_flags
if lib_type == 'static'
test_compiler_flags += ['-DTVG_STATIC']
endif
test_dep = []
if host_machine.system() == 'darwin'
test_dep += declare_dependency(link_args: ['-framework', 'Cocoa', '-framework', 'IOKit'])
endif
test_file = [
'testAccessor.cpp',
'testAnimation.cpp',
'testFill.cpp',
'testInitializer.cpp',
'testLottie.cpp',
'testMain.cpp',
'testPaint.cpp',
'testPicture.cpp',
'testSavers.cpp',
'testScene.cpp',
'testShape.cpp',
'testSwCanvas.cpp',
'testSwEngine.cpp',
'testText.cpp'
]
tests = executable('tvgUnitTests',
test_file,
include_directories : headers,
link_with : thorvg_lib,
cpp_args : test_compiler_flags,
dependencies : test_dep)
test('Unit Tests', tests, args : ['--success'])

View File

@@ -0,0 +1,43 @@
import os
import subprocess
import sys
if (
len(sys.argv) != 5
or not sys.argv[1].endswith(".svg")
or not os.path.isfile(sys.argv[1])
or not os.path.isfile(sys.argv[2])
):
print('Proper usage "python app.py AA.svg /path/to/svg2png 400 100"')
print('Proper usage "python app.py SVG_FILE SVG_PNG_PATH SIZE_IMAGE NUMBER_OF_TRIES"')
raise ValueError(
"POSSIBLE_PROBLEM - Missing or invalid input file or missing path to svg2png"
)
try_number = int(sys.argv[4])
image_size = sys.argv[3]
svg2png_path = sys.argv[2]
image_input = sys.argv[1]
image_output = image_input.replace(".svg", ".png")
args = [svg2png_path, image_input, "-r", f"{image_size}x{image_size}"]
sizes: dict = {}
for i in range(try_number + 1):
# if i % 100 == 0:
# print(f"{i + 1}/{try_number + 1}")
subprocess.call(args, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
new_size = os.path.getsize(image_output)
if new_size in sizes:
sizes[new_size] += 1
else:
sizes[new_size] = 1
sizes = dict(sorted(sizes.items(), key=lambda item: item[1], reverse=True))
if len(sizes) == 1:
print(f"Not found problem with generating images, sizes - {str(sizes)}")
else:
print(
f"POSSIBLE_PROBLEM - Converting svg to png is not reproducible - file sizes {str(sizes)}",
file=sys.stderr,
)

View File

@@ -0,0 +1,38 @@
[general]
folder_with_files_to_check = "FilesToTest"
problematic_files_path = "ProblematicSVG" # Where to store problematic files, in which conversion failed(e.g. due program crash)
output_folder = "BrokenSVG" # Place where to save files(Input and output that show differences)
ignored_files_path = "IgnoredSVG" # Place where to save ignored files
timeout = 120
limit_threads = 0 # 0 will use all available threads
px_size_of_generated_file = 400
ignore_conversion_step = false # Ignore step with conversion files from svg to png, just compare files
ignore_similarity_checking_step = false # Useful to finding problems with generating files
ignore_thorvg_not_supported_items = true # Thorvg not supports files with text, filters
max_difference = 5 # Bigger similarity will show only broken files that are completely different, looks that 0-100 is quite reasonable range
limit_files = 0 # Limit checked files, useful if you are just wanting to check how app works, 0 will remove limit of checked files
remove_files_from_output_folder_at_start = true # Useful if you run app with different settings and you don't want to remove files one by one
debug_show_always_output = false # Allows to find broken files
return_error_when_finding_invalid_files = false # When finding invalid files(broken or problematic) app will close with status 1
remove_problematic_files_after_copying = false # Remove from output folder problematic svg files
remove_broken_files_after_copying = false # Remove from output folder broken svg files
remove_ignored_files_after_copying = false # Removes not supported folders after copying
remove_generated_png_files_at_end = false # Remove all png from output folder at end
lottie_path = ""
lottie_broken_files_path = ""
lottie_test = false
thorvg_path = ""
thorvg_broken_files_path = ""
thorvg_test = false
[first_tool]
name = "thorvg_pr"
path = "./build/src/tools/svg2png/svg2png"
png_name_ending = "_thorvg_pr.png"
arguments = "{FILE} -r {SIZE}x{SIZE} -b ffffff"
[other_tool]
name = "thorvg_develop"
path = "./thorvg_develop/build/src/tools/svg2png/svg2png"
png_name_ending = "_thorvg_develop.png"
arguments = "{FILE} -r {SIZE}x{SIZE} -b ffffff"

View File

@@ -0,0 +1,39 @@
[general]
folder_with_files_to_check = "FilesToTest"
problematic_files_path = "ProblematicSVG" # Where to store problematic files, in which conversion failed(e.g. due program crash)
output_folder = "BrokenSVG" # Place where to save files(Input and output that show differences)
ignored_files_path = "IgnoredSVG" # Place where to save ignored files
timeout = 120
limit_threads = 0 # 0 will use all available threads
px_size_of_generated_file = 400
ignore_conversion_step = false # Ignore step with conversion files from svg to png, just compare files
ignore_similarity_checking_step = false # Useful to finding problems with generating files
ignore_thorvg_not_supported_items = true # Thorvg not supports files with text, filters
max_difference = 5 # Bigger similarity will show only broken files that are completely different, looks that 0-100 is quite reasonable range
limit_files = 0 # Limit checked files, useful if you are just wanting to check how app works, 0 will remove limit of checked files
remove_files_from_output_folder_at_start = true # Useful if you run app with different settings and you don't want to remove files one by one
debug_show_always_output = false # Allows to find broken files
return_error_when_finding_invalid_files = false # When finding invalid files(broken or problematic) app will close with status 1
remove_problematic_files_after_copying = false # Remove from output folder problematic svg files
remove_broken_files_after_copying = false # Remove from output folder broken svg files
remove_ignored_files_after_copying = false # Removes not supported folders after copying
remove_generated_png_files_at_end = false # Remove all png from output folder at end
lottie_path = ""
lottie_broken_files_path = ""
lottie_test = false
thorvg_path = "./build/src/tools/svg2png/svg2png"
thorvg_broken_files_path = "BrokenFILES"
thorvg_test = true
[first_tool]
name = "thorvg_pr"
path = "./build/src/tools/svg2png/svg2png"
png_name_ending = "_thorvg_pr.png"
arguments = "{FILE} -r {SIZE}x{SIZE} -b ffffff"
[other_tool]
name = "thorvg_develop"
path = "./thorvg_develop/build/src/tools/svg2png/svg2png"
png_name_ending = "_thorvg_develop.png"
arguments = "{FILE} -r {SIZE}x{SIZE} -b ffffff"

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"v":"5.4.3","fr":60,"ip":0,"op":120,"w":800,"h":800,"nm":"AssetResolver Example","ddd":0,"assets":[{"id":"image_0","w":100,"h":100,"u":"image/","p":"logo.png","e":0}],"fonts":{"list":[{"fPath":"font/SentyCloud.ttf","fFamily":"SentyCloud","fStyle":"","fName":"SentyCloud","origin":3}]},"layers":[{"ddd":0,"ind":1,"ty":2,"nm":"Resolved Asset","refId":"image_0","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":90,"s":[100]},{"t":120,"s":[0]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":120,"s":[360]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[400,400]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":60,"s":[500,300]},{"t":120,"s":[400,400]}],"ix":2},"a":{"a":0,"k":[100,100,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":0,"s":[50,50,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":60,"s":[150,150,100]},{"t":120,"s":[50,50,100]}],"ix":6}},"ao":0,"ip":0,"op":120,"st":0,"bm":0},{"nm":"T","ty":5,"sr":1,"ks":{"p":{"k":[5,80],"a":0}},"ip":0,"op":120,"st":0,"t":{"a":[],"d":{"k":[{"s":{"f":"SentyCloud","fc":[0,0,0],"s":100,"t":"Hello","j":0},"t":0}]},"m":{"a":{"k":[0,0],"a":0}},"p":{}}}],"markers":[]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

View File

@@ -0,0 +1 @@
{"v":"5.2.1","fr":29.9700012207031,"ip":0,"op":120.0000048877,"w":150,"h":120,"nm":"logo 2","ddd":1,"assets":[],"layers":[{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[98,45.5,0],"ix":2},"a":{"a":0,"k":[-23,-14.5,0],"ix":1},"s":{"a":0,"k":[-100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[19.25,-19.25],[0,0],[0,0]],"o":[[0,0],[0,0],[-20.25,20.25],[0,0],[0,0]],"v":[[19.5,-14],[-12.5,-45.25],[-51.25,-42.25],[-55.75,-5.25],[-23,28.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"gs","o":{"a":0,"k":100,"ix":9},"w":{"a":0,"k":8,"ix":10},"g":{"p":3,"k":{"a":0,"k":[0,0.584,0.894,0.929,0.5,0.692,0.733,0.965,1,0.8,0.573,1],"ix":8}},"s":{"a":0,"k":[-64.303,-9.492],"ix":4},"e":{"a":0,"k":[23.721,-13.33],"ix":5},"t":1,"lc":2,"lj":2,"nm":"Gradient Stroke 1","mn":"ADBE Vector Graphic - G-Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":100,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":30,"s":[100],"e":[0]},{"t":60.0000024438501}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":120.0000048877,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[75,60,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[22.75,-19.25],[0,0],[0,0]],"o":[[0,0],[0,0],[-19.75,19.75],[0,0],[0,0]],"v":[[19.5,-14],[-12.5,-45.25],[-51.25,-42.25],[-55.75,-5.25],[-23,28.75]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"gs","o":{"a":0,"k":100,"ix":9},"w":{"a":0,"k":8,"ix":10},"g":{"p":3,"k":{"a":0,"k":[0,1,0.788,0.6,0.5,0.902,0.682,0.798,1,0.804,0.576,0.996],"ix":8}},"s":{"a":0,"k":[-64.303,-9.492],"ix":4},"e":{"a":0,"k":[23.721,-13.33],"ix":5},"t":1,"lc":2,"lj":2,"nm":"Gradient Stroke 1","mn":"ADBE Vector Graphic - G-Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":100,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[100],"e":[0]},{"t":30.0000012219251}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":120.0000048877,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[75.5,103,0],"ix":2},"a":{"a":0,"k":[0,42.5,0],"ix":1},"s":{"a":0,"k":[91.956,91.956,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[18.648,18.648],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.8,0.572549019608,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":8,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,42.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":100,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":60,"s":[100],"e":[0]},{"t":89.0000036250443}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":120.0000048877,"st":0,"bm":0}],"markers":[]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 KiB

View File

@@ -0,0 +1,829 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
<svg version="1.1" baseProfile="basic" id="svg2" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="900px" height="900px"
viewBox="0 0 900 900" xml:space="preserve">
<path id="path482" fill="none" d="M184.013,144.428"/>
<path id="path6" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M108.956,403.826c0,0,0.178,3.344-1.276,3.311
c-1.455-0.033-30.507-84.917-66.752-80.957C40.928,326.18,72.326,313.197,108.956,403.826z"/>
<path id="path10" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M115.189,398.488c0,0-0.97,3.207-2.327,2.679
c-1.356-0.526,0.203-90.231-35.227-98.837C77.635,302.33,111.576,300.804,115.189,398.488z"/>
<path id="path14" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M163.727,473.225c0,0,2.888,1.695,2.059,2.892
c-0.832,1.194-87.655-21.408-104.35,11.003C61.436,487.118,67.931,453.771,163.727,473.225z"/>
<path id="path18" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M158.767,491.254c0,0,3.277,0.699,2.864,2.096
c-0.411,1.396-89.935,7.298-95.567,43.318C66.063,536.668,61.723,502.971,158.767,491.254z"/>
<path id="path22" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M151.332,481.498c0,0,3.139,1.171,2.528,2.492
c-0.611,1.319-90.037-5.899-100.864,28.915C52.996,512.905,53.617,478.938,151.332,481.498z"/>
<path id="path26" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M132.43,449.356c0,0,2.31,2.427,1.181,3.347
c-1.128,0.919-78.363-44.729-103.341-18.171C30.27,434.532,45.704,404.264,132.43,449.356z"/>
<path id="path30" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M119.108,456.757c0,0,2.571,2.148,1.554,3.192
c-1.017,1.041-82.921-35.576-104.734-6.36C15.928,453.589,27.837,421.769,119.108,456.757z"/>
<path id="path34" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M114.518,463.946c0,0,2.839,1.778,1.974,2.95
c-0.865,1.171-86.997-23.942-104.623,7.974C11.869,474.87,19.329,441.724,114.518,463.946z"/>
<path id="path38" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M133.47,465.03c0,0,1.981,2.703,0.743,3.472
c-1.237,0.768-71.985-54.405-100.161-31.267C34.052,437.235,53.236,409.195,133.47,465.03z"/>
<path id="path42" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M98.546,413.917c0,0,1.06,3.178-0.353,3.531
c-1.413,0.353-51.91-73.804-85.812-60.385C12.381,357.063,39.22,336.229,98.546,413.917z"/>
<path id="path46" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M99.773,426.239c0,0,1.722,2.876,0.417,3.523
c-1.303,0.649-66.605-60.873-96.813-40.458C3.376,389.306,25.088,363.174,99.773,426.239z"/>
<path id="path50" fill="#FFFFFF" stroke="#000000" stroke-width="0.172" d="M99.57,433.955c0,0,1.981,2.703,0.744,3.472
c-1.238,0.767-71.985-54.405-100.162-31.267C0.152,406.16,19.335,378.12,99.57,433.955z"/>
<path id="path54" fill="#FFFFFF" stroke="#000000" d="M95.668,436.985c0.888,10.678,2.632,22.275,5.703,27.783
c0,0-6.356,21.895,9.181,45.2c0,0-0.707,12.712,2.119,18.362c0,0,7.063,14.832,15.538,16.244c6.858,1.143,22.26,6.561,39.67,9.04
c0,0,30.249,24.859,24.599,47.461c0,0-0.706,28.956-7.063,31.781c0,0,20.481-19.775,3.531,9.888l-7.769,33.192
c0,0,45.201-38.138,17.657-5.648l-17.657,45.906c0,0,34.607-32.487,21.894-17.656l-5.65,15.538c0,0,76.276-48.025,21.894,4.237
c0,0,14.125-6.356,21.894-1.412c0,0,12.006-2.119,10.594,0.706c0,0-36.726,18.361-43.082,50.851c0,0,14.831-17.657,9.181,1.412
l0.706,20.48c0,0,7.063-38.138,6.356,28.25c0,0,33.9-31.78,13.419,4.944v29.662c0,0,26.838-28.956,15.538-6.354
c0,0,17.656-15.538,10.594,11.3c0,0-1.413,18.361,6.356-1.412c0,0,28.25-54.029,17.656-7.771c0,0-1.412,33.9,7.063,7.771
c0,0,0.706,18.362,16.95,31.075c0,0-2.119-89.695,20.48-26.133l7.063,28.957c0,0,4.943-16.244,4.237-25.426
c0,0,26.132-28.957,14.125,14.125c0,0,26.838-40.257,21.188-16.95c0,0-13.419,28.251-10.594,36.727c0,0,29.663-61.444,31.782-64.271
c0,0-3.531,74.865,15.537,11.3c0,0,9.888,21.188,4.943,28.957c0,0,14.125-14.125,12.712-19.774c0,0,8.122-14.479,13.066,9.534
c0,0,3.178,16.598,6.003,10.946c0,0,7.063,42.377,9.182,2.119c0,0,2.825-24.013-9.888-44.494c0,0,1.412-5.649-3.531-12.713
c0,0,24.014,38.139,11.3-12.713c0,0,19.777,14.125,21.896,14.125c0,0-24.015-40.963-8.477-32.487c0,0-9.183-18.362,22.602,2.825
c0,0-28.252-28.251,2.825-11.301c0,0,14.125,11.301,0.706-6.356c0,0-25.428-28.25,13.419,3.532c0,0,20.48,28.956,21.895,33.9
c0,0-17.655-51.559-25.426-56.501c0,0,14.832-64.271,87.576-36.727c0,0,12.007,30.369,19.774-2.118c0,0,22.602-11.301,42.375,37.432
c0,0,7.063-24.013,5.65-28.956c0,0,12.007,2.119,10.594,0c0,0,23.308,7.769,25.427,6.356c0,0,12.006,12.006,12.712,5.648
c0,0,16.244,4.944,12.713-1.412c0,0,15.538,27.544,16.244,33.9l4.236-24.719l3.531,4.942c0,0,2.825-13.419,1.413-15.537
c-1.413-2.119,35.313,12.006,43.787,48.731l3.531,14.831c0,0,10.594-26.131,7.77-33.193c0,0,9.181,1.412,9.888,9.181
c0,0,7.063-40.963-1.412-51.557c0,0,7.769-1.412,9.888,4.944V714.78c0,0,12.713,1.411,12.713-2.825c0,0,7.769-7.063,11.3,1.412
c0,0-21.894-62.15,10.594-28.25c0,0,12.714,19.068,6.356-14.125c-6.357-33.194-13.419-36.021-4.943-36.727
c0,0,1.412-6.355-2.118-9.181c-3.531-2.825,2.118,0,2.118,0s8.476,7.063-0.707-31.782c0,0,11.302,2.825-9.888-48.73
c0,0,4.944-4.237-2.118-19.069c0,0,14.125,7.77,19.069,4.944c0,0-0.707-2.825-6.356-9.889c0,0-38.139-96.759-2.118-57.913
c0,0,20.923,23.925,9.623-16.332c0,0-16.088-42.394-14.716-49.979L95.668,436.985z"/>
<path id="path58" fill="#CC7226" stroke="#000000" d="M854.095,396.693c1.108,0.32,5.004,2.304,7.211,5.217
c0,0,12.006,19.068,2.825-13.418c0,0-16.244-50.851-0.707-31.076c0,0,10.594,12.713,4.944-11.3
c-6.824-29.004-11.301-40.257-11.301-40.257s20.48,8.475-26.837-61.444l15.536,6.356c0,0-34.605-69.919-72.743-79.101
l-14.125-10.594c0,0,67.8-67.094,45.199-132.07c0,0-12.007-9.182-28.957,7.063c0,0-11.3,8.475-21.894,5.65
c0,0-54.382,2.119-57.913,2.119S630.359-21.844,514.533,9.231c0,0-9.183,3.531-16.95,1.413c0,0-32.489-28.25-118.653,12.006
c0,0-17.655,3.531-20.48,3.531s-7.77,0-21.895,11.3c-14.125,11.3-14.832,12.712-18.362,15.538c0,0-28.957,19.775-37.432,21.188
c0,0-20.481,11.3-28.25,28.957l-6.356,2.119c0,0-2.825,12.713-3.532,14.832c0,0-8.475,6.356-9.887,16.244
c0,0-15.538,10.594-14.832,18.362c0,0-2.825,9.182-4.238,17.657c0,0-12.712,8.475-11.3,13.419c0,0-13.419,24.719-11.3,36.725
c0,0-11.3-0.706-16.244,3.531c0,0-1.413,8.475-4.238,9.182c0,0-4.944,2.119-0.706,9.181c0,0-2.825,4.944-3.531,7.769
c0,0,1.412,4.944-6.356,14.831c0,0-11.3,33.194-7.769,42.375c0,0,0.707,8.475-4.237,11.3c0,0-6.356-0.707,8.475,20.481
c0,0,1.413,2.119-4.238,6.356c0,0-30.369,6.356-34.606,35.313c0,0-24.013,26.131-24.013,35.313c0,4.069,0.479,9.626,1.713,17.771
c0,0-1.007,14.718,47.725,16.131C191.772,453.469,854.095,396.693,854.095,396.693z"/>
<path id="path62" fill="#CC7226" d="M120.793,436.164c-44.141-69.566-18.716,30.018-18.716,30.018
c15.538,60.738,244.365-5.649,244.365-5.649s298.042-53.677,317.816-60.739c19.775-7.063,187.864,4.237,187.864,4.237l-9.888-29.663
c-114.414-81.926-148.314-40.963-172.327-48.025c-24.013-7.062-19.774,9.888-25.425,11.3c-5.651,1.412-74.863-42.375-86.163-40.963
c-11.301,1.413-56.045-40.523-29.663,15.538c28.25,60.032-103.115,69.213-132.778,49.438
c-29.663-19.775,12.713,32.488,12.713,32.488c32.487,35.313-28.25,5.65-28.25,5.65c-60.737-22.601-103.114,22.6-108.764,24.013
c-5.65,1.412-14.125,7.063-15.538-4.237c-1.412-11.301-14.672-40.789-70.625,5.649c-35.313,29.313-59.679-9.534-59.679-9.534
L120.793,436.164z"/>
<path id="path66" fill="#E87F3A" d="M560.632,299.761c-11.3,1.413-56.089-40.502-29.662,15.538
c29.311,62.151-103.113,69.213-132.775,49.438c-29.665-19.775,12.712,32.488,12.712,32.488c32.488,35.313-28.252,5.649-28.252,5.649
c-60.737-22.6-103.113,22.601-108.763,24.013c-5.65,1.413-14.125,7.063-15.538-4.236c-1.413-11.301-14.441-40.494-70.626,5.649
c-37.495,30.627-61.315-7.255-61.315-7.255l-5.65,17.849c-44.141-70.271-17.529,32.682-17.529,32.682
c15.54,60.739,245.521-7.962,245.521-7.962s298.043-53.676,317.817-60.738c19.774-7.062,186.325,4.109,186.325,4.109l-9.762-30.563
c-114.413-81.926-146.9-39.935-170.914-46.998c-24.013-7.063-19.774,9.888-25.425,11.3
C641.146,342.136,571.933,298.349,560.632,299.761z"/>
<path id="path70" fill="#EA8C4D" d="M562.943,302.842c-11.301,1.413-54.973-41.014-29.663,15.538
c28.604,63.918-103.113,69.215-132.776,49.44c-29.662-19.775,12.713,32.488,12.713,32.488c32.488,35.313-28.25,5.649-28.25,5.649
c-60.738-22.6-103.115,22.601-108.766,24.013c-5.65,1.413-14.125,7.063-15.538-4.236c-1.413-11.301-14.21-40.198-70.625,5.649
c-39.68,31.942-62.952-4.976-62.952-4.976l-6.356,15.216c-42.022-68.86-16.341,35.345-16.341,35.345
c15.538,60.738,246.678-10.271,246.678-10.271s298.04-53.677,317.814-60.738c19.775-7.063,184.783,3.979,184.783,3.979l-9.63-31.46
c-114.415-81.926-145.49-38.909-169.503-45.972c-24.014-7.063-19.775,9.888-25.427,11.302
C643.457,345.219,574.243,301.429,562.943,302.842z"/>
<path id="path74" fill="#EC9961" d="M565.255,305.925c-11.301,1.413-54.963-41.02-29.663,15.538
c29.663,66.311-104.057,68.586-132.775,49.438c-29.663-19.775,12.713,32.488,12.713,32.488c32.486,35.313-28.25,5.649-28.25,5.649
c-60.738-22.6-103.114,22.601-108.764,24.013c-5.65,1.413-14.125,7.063-15.538-4.236c-1.413-11.301-13.979-39.9-70.627,5.649
c-41.862,33.259-64.591-2.696-64.591-2.696l-7.063,12.584c-38.491-64.976-15.151,38.012-15.151,38.012
c15.538,60.736,247.833-12.586,247.833-12.586s298.04-53.677,317.817-60.738c19.773-7.063,183.24,3.853,183.24,3.853l-9.502-32.358
c-114.414-81.928-144.076-37.882-168.09-44.945c-24.015-7.063-19.775,9.888-25.427,11.3
C645.766,348.301,576.555,304.512,565.255,305.925z"/>
<path id="path78" fill="#EEA575" d="M567.567,309.008c-11.303,1.412-54.07-41.412-29.664,15.538
c29.664,69.213-103.114,69.213-132.776,49.438c-29.663-19.775,12.713,32.487,12.713,32.487c32.487,35.313-28.251,5.65-28.251,5.65
c-60.738-22.6-103.113,22.601-108.763,24.013c-5.65,1.412-14.125,7.063-15.538-4.237s-13.746-39.604-70.626,5.649
c-44.046,34.575-66.229-0.418-66.229-0.418l-7.769,9.953c-34.96-61.446-13.964,40.673-13.964,40.673
c15.538,60.74,248.989-14.895,248.989-14.895s298.043-53.677,317.816-60.738c19.775-7.063,181.701,3.724,181.701,3.724
l-9.374-33.259c-114.414-81.926-142.664-36.853-166.677-43.915c-24.014-7.062-19.775,9.888-25.426,11.3
C648.081,351.383,578.868,307.595,567.567,309.008z"/>
<path id="path82" fill="#F1B288" d="M569.879,312.089c-11.3,1.412-57.144-39.994-29.663,15.538
c33.9,68.507-103.115,69.213-132.778,49.438c-29.661-19.775,12.714,32.487,12.714,32.487c32.487,35.313-28.25,5.65-28.25,5.65
c-60.738-22.6-103.114,22.601-108.764,24.013c-5.65,1.412-14.125,7.063-15.538-4.237c-1.413-11.3-13.514-39.309-70.626,5.649
c-46.228,35.893-67.866,1.863-67.866,1.863l-8.475,7.317c-31.782-58.619-12.776,43.341-12.776,43.341
C123.394,553.887,358,475.94,358,475.94s298.042-53.677,317.817-60.738c19.774-7.063,180.158,3.595,180.158,3.595l-9.244-34.156
c-114.413-81.926-141.251-35.827-165.265-42.889c-24.013-7.062-19.774,9.888-25.426,11.3
C650.393,354.464,581.179,310.676,569.879,312.089z"/>
<path id="path86" fill="#F3BF9C" d="M572.19,315.169c-11.303,1.413-57.813-39.656-29.665,15.538
c36.021,70.627-103.113,69.214-132.776,49.439s12.713,32.488,12.713,32.488c32.487,35.313-28.25,5.65-28.25,5.65
c-60.738-22.601-103.114,22.6-108.764,24.013c-5.65,1.412-14.125,7.063-15.538-4.237c-1.412-11.301-13.283-39.014-70.625,5.649
c-48.412,37.208-69.503,4.141-69.503,4.141l-9.181,4.688c-28.25-53.322-11.59,46.004-11.59,46.004
c15.538,60.738,251.301-19.519,251.301-19.519s298.041-53.677,317.816-60.738c19.775-7.063,178.619,3.466,178.619,3.466
l-9.117-35.055c-114.414-81.926-139.84-34.799-163.853-41.862c-24.014-7.064-19.774,9.888-25.425,11.3
C652.702,357.546,583.49,313.757,572.19,315.169z"/>
<path id="path90" fill="#F5CCB0" d="M574.501,318.252c-11.3,1.413-59.753-38.624-29.662,15.538
c38.844,69.92-103.115,69.213-132.778,49.438c-29.662-19.775,12.714,32.488,12.714,32.488c32.486,35.313-28.251,5.65-28.251,5.65
c-60.737-22.602-103.113,22.6-108.764,24.013c-5.65,1.412-14.125,7.063-15.538-4.237c-1.413-11.301-13.05-38.716-70.626,5.649
c-50.594,38.524-71.14,6.422-71.14,6.422l-9.887,2.054c-25.427-50.145-10.401,48.668-10.401,48.668
c15.538,60.74,252.455-21.829,252.455-21.829s298.043-53.677,317.816-60.738c19.775-7.063,177.078,3.339,177.078,3.339
l-8.987-35.956c-114.414-81.926-138.428-33.771-162.439-40.834c-24.013-7.063-19.774,9.888-25.425,11.3
C655.015,360.628,585.802,316.84,574.501,318.252z"/>
<path id="path94" fill="#F8D8C4" d="M576.813,321.335c-11.3,1.413-59.753-38.625-29.662,15.538
c38.845,69.919-103.113,69.213-132.776,49.438c-29.662-19.775,12.713,32.488,12.713,32.488c32.488,35.313-28.25,5.65-28.25,5.65
c-60.74-22.602-103.115,22.6-108.766,24.013c-5.65,1.412-14.125,7.063-15.538-4.238c-1.413-11.3-12.817-38.42-70.625,5.65
c-52.777,39.84-72.776,8.701-72.776,8.701l-10.594-0.579c-24.015-46.615-9.213,51.332-9.213,51.332
c15.538,60.738,253.609-24.143,253.609-24.143s298.042-53.675,317.817-60.736c19.775-7.063,175.538,3.21,175.538,3.21l-8.859-36.854
c-114.416-81.926-137.016-32.744-161.027-39.807c-24.013-7.063-19.775,9.888-25.427,11.3
C657.326,363.711,588.112,319.923,576.813,321.335z"/>
<path id="path98" fill="#FAE5D7" d="M579.124,324.417c-11.301,1.413-59.068-38.998-29.663,15.538
c38.844,72.038-103.113,69.213-132.776,49.438c-29.662-19.775,12.714,32.488,12.714,32.488c32.486,35.313-28.251,5.65-28.251,5.65
c-60.737-22.602-103.113,22.6-108.764,24.013c-5.652,1.412-14.127,7.063-15.54-4.238c-1.412-11.3-12.585-38.123-70.625,5.65
c-54.959,41.157-74.413,10.979-74.413,10.979l-11.302-3.212c-22.954-42.375-8.025,53.999-8.025,53.999
c15.538,60.738,254.769-26.455,254.769-26.455s298.04-53.675,317.814-60.736c19.775-7.063,173.997,3.082,173.997,3.082
l-8.732-37.752c-114.413-81.928-135.602-31.718-159.613-38.781c-24.014-7.063-19.774,9.888-25.426,11.3
S590.424,323.004,579.124,324.417z"/>
<path id="path102" fill="#FCF2EB" d="M581.435,327.498c-11.3,1.412-57.161-39.981-29.661,15.538
c37.432,75.571-103.114,69.215-132.776,49.439c-29.663-19.775,12.713,32.488,12.713,32.488c32.487,35.313-28.251,5.649-28.251,5.649
c-60.738-22.601-103.113,22.601-108.763,24.013c-5.65,1.413-14.125,7.063-15.538-4.237c-1.413-11.3-12.354-37.827-70.626,5.65
c-57.145,42.473-76.053,13.258-76.053,13.258l-12.006-5.842c-22.6-40.964-6.836,56.661-6.836,56.661
c15.538,60.736,255.921-28.766,255.921-28.766s298.043-53.676,317.817-60.737c19.775-7.063,172.454,2.951,172.454,2.951
l-8.604-38.65c-114.415-81.926-134.188-30.688-158.2-37.751c-24.014-7.064-19.775,9.887-25.426,11.3
C661.948,369.875,592.735,326.085,581.435,327.498z"/>
<path id="path106" fill="#FFFFFF" d="M120.44,466.182c-22.601-38.846-5.65,59.325-5.65,59.325
c15.538,60.738,257.078-31.075,257.078-31.075s298.042-53.677,317.816-60.738c19.775-7.063,170.914,2.823,170.914,2.823
l-8.475-39.55c-114.414-81.926-132.776-29.663-156.789-36.726c-24.013-7.063-19.775,9.888-25.426,11.3
c-5.649,1.413-74.862-42.375-86.163-40.963c-11.3,1.412-55.829-40.623-29.663,15.538c39.245,84.232-107.28,66.436-132.777,49.438
c-29.663-19.775,12.712,32.488,12.712,32.488c32.488,35.313-28.25,5.65-28.25,5.65c-60.737-22.602-103.113,22.602-108.764,24.014
c-5.65,1.413-14.125,7.063-15.538-4.237c-1.413-11.302-12.121-37.532-70.625,5.65c-59.326,43.788-77.688,15.537-77.688,15.537
L120.44,466.182z"/>
<path id="path110" d="M193.891,519.15c0,0-12.713,20.48,24.013,43.788c0,0,2.472,2.473-29.31-4.943c0,0-10.947-3.531-13.771-21.896
c0,0-8.475-7.769-16.95-17.655C149.397,508.557,193.891,519.15,193.891,519.15z"/>
<path id="path114" fill="#CCCCCC" d="M441.08,435.104c0,0,31.249,47.356,30.193,55.797c-2.297,18.362-2.648,35.313,3.001,42.376
c5.651,7.063,21.188,65.682,21.188,65.682s-0.706,2.119,21.188-64.976c0,0,20.48-28.25-14.831-60.738
C501.82,473.244,439.668,422.392,441.08,435.104z"/>
<path id="path118" d="M229.204,566.47c0,0,19.775,12.713-5.65,67.802l11.3-4.237c0,0-1.413,19.774-7.063,24.013l12.712-5.65
c0,0,8.475,14.127,1.413,22.602c0,0,29.663,14.125,28.25,25.425c0,0,11.3-14.125,4.237-25.425s-19.775-4.237-18.363-36.727
l-15.538,5.65c0,0,9.888-15.538,9.888-26.838l-14.125,4.237c0,0,27.313-46.928,8.475-49.438
C234.147,566.47,229.204,566.47,229.204,566.47z"/>
<path id="path122" fill="#CCCCCC" d="M286.41,596.133c0,0,4.944-7.769,0-6.355c-4.944,1.413-60.032,27.544-70.625,44.494
C215.785,634.271,276.522,591.189,286.41,596.133z"/>
<path id="path126" fill="#CCCCCC" d="M304.773,610.258c0,0,4.944-7.769,0-6.355s-60.032,27.544-70.625,44.494
C234.147,648.396,294.885,605.314,304.773,610.258z"/>
<path id="path130" fill="#CCCCCC" d="M328.079,583.42c0,0,4.944-7.769,0-6.355c-4.943,1.412-60.032,27.545-70.625,44.494
C257.454,621.559,318.191,578.477,328.079,583.42z"/>
<path id="path134" fill="#CCCCCC" d="M287.117,660.402c0,0,0-10.595-4.944-9.183c-4.944,1.413-68.507,32.488-79.101,49.438
C203.072,700.659,277.229,655.458,287.117,660.402z"/>
<path id="path138" fill="#CCCCCC" d="M289.235,641.333c0,0,2.119-8.475-2.825-7.063c-3.531,0-50.144,20.481-60.738,37.433
C225.672,671.702,277.935,633.564,289.235,641.333z"/>
<path id="path142" fill="#CCCCCC" d="M263.81,725.378l-17.656,13.419c0,0,18.362-13.419,24.719-11.3
c0,0-12.006,19.774-13.419,28.956c0,0,18.363-22.602,28.25-21.895c0,0,13.419,0.706,13.419,19.774c0,0,9.888-18.362,15.537-17.656
c0,0,2.119,11.302,0,23.308c0,0,7.063-13.419,14.125-10.595c0,0,11.301-3.53,9.888,16.95c0,0,0,18.362-1.412,23.308
c0,0,9.889-46.613,14.125-47.319c0,0,14.125-2.119,22.602,13.419c0,0-7.063-13.419,1.412-9.888c0,0,19.068,2.824,24.719,14.831
c0,0-12.006-21.188-2.118-15.537c0,0,12.006,0,14.125,11.3c0,0,14.831,37.432,18.362,40.257c0,0-13.419-38.138-10.595-38.138
c0,0-3.53-21.188,5.65,4.942c0,0-5.65-24.719,4.237-23.307c9.888,1.413,17.655,19.069,32.487,14.832
c0,0,16.952,9.888,20.483-112.295L263.81,725.378z"/>
<path id="path146" d="M272.285,561.526c0,0,26.131-10.595,96.757,0c0,0,12.713,0.706,24.72-14.831
c12.006-15.538,59.325-28.251,70.625-24.721l16.952,11.302l1.413,2.118c0,0,21.895,18.362,22.6,31.781
c0.706,13.418-25.425,98.169-42.377,126.42c-16.949,28.25-33.899,50.145-67.801,45.906c0,0-36.726-7.063-81.926,0
c0,0-51.557-2.825-56.5-16.95s19.775-40.963,19.775-40.963s7.769-14.831,5.65-40.257C280.054,615.908,280.76,566.47,272.285,561.526
z"/>
<path id="path150" fill="#E5668C" d="M311.129,565.058c14.832,32.487-37.431,147.607-37.431,147.607
c-3.531,2.825,22.353,13.499,40.256,9.182c19.327-4.657,90.401,2.825,90.401,2.825c41.669-27.544,64.27-105.938,64.27-105.938
s18.364-42.376-12.713-48.025C424.837,565.058,311.129,565.058,311.129,565.058z"/>
<path id="path154" fill="#B23259" d="M307.543,619.608c5.873-22.582,8.67-43.419,3.586-54.552c0,0,110.177,11.301,129.951-25.426
c7.488-13.904,33.55,40.257,32.842,57.207c0,0-111.236,25.426-137.367,5.65L307.543,619.608z"/>
<path id="path158" fill="#A5264C" d="M315.367,648.396c0,0,3.531,12.713-0.707,19.774c0,0-2.824,1.413-4.943,2.119
c0,0,2.119,6.356,12.713,9.182c0,0,3.531,7.77,7.77,8.476s12.713,10.594,19.774,8.475c7.063-2.118,26.839-9.181,26.839-9.181
s9.888-5.65,25.425,0.706c0,0,4.192-1.416,4.942-8.476c0.884-8.299,6.356-14.832,9.889-18.362
c3.531-3.531,20.48-26.133,18.362-26.838C433.313,633.564,315.367,648.396,315.367,648.396z"/>
<path id="path162" fill="#FF727F" stroke="#000000" d="M307.598,562.938c0,0-4.943,39.552,0.707,54.383
c5.649,14.832,4.237,18.362,2.824,25.426c-1.412,7.063,6.356,24.719,16.244,35.313l21.188,2.825c0,0,26.839-6.355,43.082-1.412
c0,0,15.881,2.371,21.895-24.014c0,0,8.476-11.3,21.188-16.243c12.713-4.943,25.426-78.395,18.362-92.52
c-7.063-14.126-32.488-21.896-60.738,5.648S360.567,550.227,307.598,562.938z"/>
<path id="path166" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M310.423,695.009c0,0-1.412-3.531-9.181-4.237
c0,0-39.55-6.355-54.382-28.25c0,0-12.006-9.888-4.238,10.595c0,0,18.363,36.019,30.369,40.963
C272.991,714.078,301.948,721.141,310.423,695.009z"/>
<path id="path170" fill="#CC3F4C" d="M451.572,582.058c1.163-13.96,4.61-29.169,1.515-35.361
c-11.382-22.768-41.35-13.253-60.738,5.648c-28.25,27.544-31.78-2.118-84.751,10.595c0,0-3.081,24.653-1.598,42.332
c0,0,65.867-20.438,67.28-10.551c0,0,2.823-5.649,19.067-5.649S448.747,587.001,451.572,582.058z"/>
<path id="path174" stroke="#A51926" stroke-width="2" d="M375.398,564.352c0,0,8.476,8.476,2.118,25.426
c0,0-25.426,28.25-21.895,52.97"/>
<path id="path178" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M290.648,714.078c0,0-7.769-22.602,7.769-10.594
c0,0,8.475,3.53,6.356,6.354C302.654,712.665,292.767,719.729,290.648,714.078z"/>
<path id="path182" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M299.547,716.196c0,0-6.215-18.08,6.215-8.476
c0,0,7.806,4.322,5.084,5.085C302.795,715.066,310.847,719.587,299.547,716.196z"/>
<path id="path186" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M308.021,716.196c0,0-6.215-18.08,6.215-8.476
c0,0,7.725,4.078,5.086,5.085C313.39,715.066,319.322,719.587,308.021,716.196z"/>
<path id="path190" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M319.675,716.55c0,0-6.215-18.08,6.215-8.476
c0,0,7.739,4.118,5.087,5.085C325.749,715.066,330.977,719.939,319.675,716.55z"/>
<path id="path194" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M331.116,716.408c0,0-6.215-18.08,6.217-8.476
c0,0,6.78,2.825,5.085,5.085C340.723,715.278,342.418,719.799,331.116,716.408z"/>
<path id="path198" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M342.911,717.609c0,0-8.477-21.896,7.769-10.595
c0,0,8.476,3.531,6.356,6.355C354.917,716.196,357.036,721.847,342.911,717.609z"/>
<path id="path202" stroke="#A5264C" stroke-width="2" d="M292.767,687.24c0,0,23.307-4.944,33.9,0.706
c0,0,10.594,2.119,12.713,1.412c2.118-0.706,7.77-1.412,7.77-1.412"/>
<path id="path206" stroke="#A5264C" stroke-width="2" d="M352.799,702.777c0,0,21.188-24.014,42.375-16.243
c12.389,4.543,10.594-1.413,12.006-6.356c1.413-4.943,1.768-12.358,10.596-17.656"/>
<path id="path210" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M383.168,674.527c0,0-7.063-19.069-12.007,3.53
c-4.944,22.602-10.594,28.957-13.419,33.9c0,0,0,9.182,14.831,8.476c0,0,19.068-0.707,19.774-5.649
C393.055,709.84,390.23,689.358,383.168,674.527z"/>
<path id="path214" stroke="#A5264C" stroke-width="2" d="M407.887,687.24c0,0,6.356-4.237,10.594-2.119"/>
<path id="path218" stroke="#A5264C" stroke-width="2" d="M419.363,658.283c0,0,5.12-8.651,13.596-10.063"/>
<path id="path222" fill="#B2B2B2" d="M279.348,723.259c0,0,31.781,5.65,39.551,2.825c0,0,15.536,0,0.706,3.531
c0,0-22.602,0-36.727-2.118C282.879,727.497,262.397,717.609,279.348,723.259z"/>
<path id="path226" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M304.066,558.701c0,0,31.075,0,34.606,1.412
c0,0,12.713,54.382,6.356,67.801c0,0-2.118,4.944-7.063-4.943c0,0-32.488-57.913-38.138-61.443
C294.177,557.996,301.948,558.701,304.066,558.701z"/>
<path id="path230" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M167.936,553.934c0,0,15.714,3.002,37.961,7.594
c0,0,8.475,39.551,14.125,48.024c5.65,8.475-0.706,8.476-7.063,3.531s-32.488-29.663-36.019-37.432
C173.409,567.882,167.936,553.934,167.936,553.934z"/>
<path id="path234" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M206.534,561.909c0,0,10.241,2.732,12.022,6.645
c1.78,3.909-2.123,9.73-2.123,9.73s-1.766,5.835-3.888,2.018C210.424,576.483,205.353,562.958,206.534,561.909z"/>
<path id="path238" d="M206.603,561.526c0,0,6.356,9.182,12.713,9.182c6.356,0,7.031-0.729,12.006,0.353
c8.122,1.767,7.416-1.766,19.069,0.354c4.661,0.848,9.181-0.706,14.125,1.412c4.944,2.119,10.594,0.706,12.713-2.825
s10.594-10.946,10.594-10.946s-22.6,3.179-27.544,4.591C260.279,563.645,220.729,565.764,206.603,561.526z"/>
<path id="path242" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M285.351,561.879c0,0-11.389,6.182-12.095,10.418
c-0.707,4.237,9.27,10.771,9.27,10.771s4.855,8.122,5.915,3.884C289.5,582.714,286.763,562.586,285.351,561.879z"/>
<path id="path246" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M219.166,571.527c0,0,12.372,19.754,12.755-0.041
c0,0,0.983-2.223-2.124-2.261C219.07,569.092,221.756,561.85,219.166,571.527z"/>
<path id="path250" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M231.839,571.967c0,0,13.986,19.752,12.863-0.164
c0,0,0.012-0.587-3.083-0.855C233.238,570.215,233.847,562.238,231.839,571.967z"/>
<path id="path254" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M244.575,571.98c0,0,14.054,18.766,12.873,1.697
c0,0,0.21-2.177-2.71-2.708C247.866,569.725,247.494,563.987,244.575,571.98z"/>
<path id="path258" fill="#FFFFCC" stroke="#000000" stroke-width="0.5" d="M256.716,572.122c0,0,13.948,20.412,14.563,3.143
c0,0,2.903-2.433-0.18-2.824C260.826,571.133,262.235,563.269,256.716,572.122z"/>
<path id="path262" fill="#E5E5B2" d="M192.845,578.354l-13.521-2.702c-4.591-8.828-8.299-19.688-8.299-19.688
s11.212,1.767,33.282,6.709c0,0,1.547,5.858,4.146,16.091L192.845,578.354z"/>
<path id="path266" fill="#E5E5B2" d="M307.732,570.123c-2.942-4.425-5.268-7.528-6.416-8.245c-5.32-3.325,1.995-2.659,3.989-2.659
c0,0,29.258,0,32.583,1.329c0,0,0.926,3.959,2.134,9.946C340.022,570.494,322.21,566.945,307.732,570.123z"/>
<path id="path270" fill="#CC7226" d="M402.378,326.201c48.945,6.992,94.004-55.936,97.112-73.028
c3.106-17.092-14.762-38.067-14.762-38.067c2.33-5.438-6.216-30.298-15.537-46.613c-9.322-16.314-37.398-14.595-68.367-16.314
c-27.968-1.554-60.599,39.621-62.928,42.729c-2.331,3.108,8.546,70.698,10.876,80.798s-2.33,56.712-2.33,56.712
C406.897,316.349,353.434,319.209,402.378,326.201z"/>
<path id="path274" fill="#EA8E51" d="M339.182,196.051c-2.288,3.051,8.392,69.413,10.68,79.328
c2.288,9.916-2.288,55.682-2.288,55.682c57.687-15.679,6.864-12.967,54.918-6.102c48.056,6.865,92.296-54.918,95.347-71.701
c3.051-16.781-14.492-37.375-14.492-37.375c2.288-5.339-6.103-29.748-15.255-45.766c-9.153-16.018-36.717-14.328-67.125-16.018
C373.506,152.573,341.47,193,339.182,196.051z"/>
<path id="path278" fill="#EFAA7C" d="M340.467,197.195c-2.245,2.995,8.235,68.127,10.481,77.859s-2.246,54.65-2.246,54.65
c55.448-16.173,6.737-12.727,53.9-5.989c47.166,6.738,90.587-53.901,93.581-70.373c2.994-16.47-14.224-36.683-14.224-36.683
c2.245-5.24-5.989-29.197-14.973-44.918c-8.984-15.721-36.037-14.063-65.882-15.721C374.155,154.522,342.713,194.2,340.467,197.195z
"/>
<path id="path282" fill="#F4C6A8" d="M341.753,198.339c-2.204,2.938,8.079,66.842,10.282,76.391
c2.204,9.548-2.203,53.619-2.203,53.619c51.974-15.961,6.61-12.487,52.885-5.876c46.275,6.611,88.877-52.884,91.815-69.043
c2.938-16.161-13.956-35.993-13.956-35.993c2.203-5.142-5.876-28.646-14.69-44.07c-8.813-15.425-35.355-13.799-64.638-15.425
C374.806,156.472,343.956,195.401,341.753,198.339z"/>
<path id="path286" fill="#F9E2D3" d="M343.038,199.483c-2.161,2.881,7.924,65.557,10.085,74.921
c2.161,9.365-2.161,52.588-2.161,52.588c49.205-15.75,6.483-12.246,51.868-5.763c45.386,6.483,87.168-51.868,90.049-67.718
c2.882-15.849-13.687-35.299-13.687-35.299c2.161-5.042-5.765-28.095-14.408-43.223c-8.646-15.128-34.677-13.534-63.396-15.128
C375.455,158.421,345.199,196.602,343.038,199.483z"/>
<path id="path290" fill="#FFFFFF" d="M402.942,319.984c44.493,6.356,85.459-50.85,88.283-66.388
c2.825-15.538-13.419-34.606-13.419-34.606c2.119-4.944-5.65-27.544-14.127-42.375c-8.475-14.831-33.995-13.267-62.149-14.831
c-25.427-1.413-55.088,36.019-57.207,38.844c-2.119,2.825,7.769,64.27,9.888,73.451c2.119,9.182-2.119,51.557-2.119,51.557
C397.116,310.45,358.448,313.628,402.942,319.984z"/>
<path id="path294" fill="#CCCCCC" d="M484.87,259.953c0,0-49.087,13.419-69.568,10.594c0,0-27.896-11.653-43.435,26.838
c0,0-6.356,12.713-9.889,16.244C358.447,317.16,484.87,259.953,484.87,259.953z"/>
<path id="path298" d="M491.58,256.068c0,0-51.206,21.541-68.862,20.834c0,0-28.956-8.122-43.788,17.656
c0,0-14.831,16.244-20.48,19.069c0,0-0.706,2.825,10.594-4.238l18.363,9.182c0,0,26.131,16.95,43.081-11.3
c0,0,7.063-19.775,7.063-23.307c0-3.532,37.433-13.419,40.259-14.125C480.633,269.134,492.286,261.718,491.58,256.068z"/>
<path id="path302" fill="#99CC32" d="M407.887,319.479c-12.134,0-26.918-6.824-26.918-17.857c0-11.032,14.784-22.094,26.918-22.094
c12.138,0,21.976,8.943,21.976,19.975C429.861,310.537,420.023,319.479,407.887,319.479z"/>
<path id="path306" fill="#659900" d="M401.489,290.021c-8.557,1.275-17.541,3.929-17.414,3.547
c2.719-8.156,13.95-14.041,23.812-14.041c7.585,0,14.273,3.493,18.222,8.807C426.107,288.335,416.722,287.753,401.489,290.021z"/>
<path id="path310" fill="#FFFFFF" d="M422.718,289.616c0,0-7.769-5.65-7.769-1.766C414.949,287.85,421.306,295.619,422.718,289.616z
"/>
<path id="path314" d="M405.063,303.963c-4.412,0-7.989-3.577-7.989-7.991c0-4.412,3.577-7.989,7.989-7.989
c4.413,0,7.99,3.577,7.99,7.989C413.053,300.386,409.476,303.963,405.063,303.963z"/>
<path id="path318" fill="#CC7226" d="M221.435,280.434c0,0-5.65-37.432-1.413-45.2c0,0,19.069-17.657,18.363-24.013
c0,0-0.706-31.782-2.825-33.194c-2.119-1.413-15.538-12.006-26.131-0.706c0,0-18.363,31.781-16.95,43.082v3.531
c0,0-13.419-0.706-16.244,2.825c0,0-2.119,9.181-4.238,9.888c0,0-4.944,4.237-1.413,9.181c0,0-3.531,4.237-2.825,11.3l13.419,7.063
c0,0,3.531,25.425,22.601,34.606C212.317,302.909,217.903,291.028,221.435,280.434z"/>
<path id="path322" fill="#FFFFFF" d="M219.669,277.186c0,0-5.085-33.688-1.271-40.681c0,0,17.162-15.891,16.527-21.611
c0,0-0.636-28.604-2.543-29.875c-1.907-1.271-13.984-10.806-23.518-0.636c0,0-16.526,28.604-15.255,38.773v3.178
c0,0-12.077-0.636-14.62,2.542c0,0-1.907,8.263-3.813,8.899c0,0-4.45,3.813-1.271,8.263c0,0-3.178,3.813-2.542,10.17l12.077,6.356
c0,0,3.178,22.883,20.34,31.146C211.462,297.411,216.491,286.72,219.669,277.186z"/>
<path id="path326" fill="#EB955C" d="M234.765,179.775c-1.924-1.519-15.149-11.706-25.478-0.688c0,0-17.904,30.987-16.526,42.004
v3.443c0,0-13.083-0.688-15.838,2.754c0,0-2.066,8.952-4.132,9.641c0,0-4.82,4.132-1.377,8.952c0,0-3.443,4.132-2.754,11.018
l13.083,6.886c0,0,3.443,24.79,22.035,33.741c8.323,4.008,13.772-7.574,17.215-17.903c0,0-5.509-36.496-1.377-44.07
c0,0,18.592-17.215,17.903-23.413C237.52,212.139,236.831,181.152,234.765,179.775z"/>
<path id="path330" fill="#F2B892" d="M233.971,181.523c-1.73-1.625-14.761-11.406-24.825-0.671c0,0-17.444,30.192-16.103,40.927
v3.355c0,0-12.748-0.671-15.432,2.684c0,0-2.013,8.722-4.026,9.394c0,0-4.696,4.025-1.342,8.722c0,0-3.354,4.025-2.684,10.735
l12.748,6.709c0,0,3.354,24.154,21.47,32.876c8.111,3.906,13.419-7.38,16.773-17.445c0,0-5.368-35.56-1.342-42.94
c0,0,18.115-16.773,17.444-22.812C236.654,213.057,235.983,182.865,233.971,181.523z"/>
<path id="path334" fill="#F8DCC8" d="M233.176,183.271c-1.536-1.73-14.373-11.106-24.172-0.653c0,0-16.985,29.398-15.679,39.851
v3.266c0,0-12.413-0.653-15.026,2.613c0,0-1.96,8.493-3.919,9.146c0,0-4.573,3.92-1.307,8.493c0,0-3.267,3.92-2.613,10.453
l12.413,6.533c0,0,3.266,23.518,20.905,32.011c7.897,3.803,13.065-7.186,16.332-16.985c0,0-5.227-34.624-1.307-41.811
c0,0,17.639-16.332,16.985-22.211C235.789,213.976,235.136,184.578,233.176,183.271z"/>
<path id="path338" fill="#FFFFFF" d="M219.669,277.009c0,0-5.085-33.512-1.271-40.504c0,0,17.162-15.891,16.527-21.611
c0,0-0.636-28.604-2.543-29.875c-1.342-1.836-13.984-10.806-23.518-0.636c0,0-16.526,28.604-15.255,38.773v3.178
c0,0-12.077-0.636-14.62,2.542c0,0-1.907,8.263-3.813,8.899c0,0-4.45,3.813-1.271,8.263c0,0-3.178,3.813-2.542,10.17l12.077,6.356
c0,0,3.178,22.883,20.34,31.146C211.462,297.411,216.491,286.543,219.669,277.009z"/>
<path id="path342" fill="#CCCCCC" d="M214.195,265.956c0,0-38.138-18.01-39.727-19.422c0,0,16.067,14.479,17.48,14.479
C193.361,261.013,214.195,265.956,214.195,265.956z"/>
<path id="path346" d="M184.003,255.009c0,0,32.488,6.356,32.488,14.125c0,5.141-0.429,28.834-9.888,26.131
C191.772,291.028,198.128,265.603,184.003,255.009z"/>
<path id="path350" fill="#99CC32" d="M198.834,261.718c0,0,15.852,2.603,17.656,7.416c1.06,2.825,2.23,17.494-7.416,19.422
C201.038,290.165,197.101,272.118,198.834,261.718z"/>
<path id="path354" d="M350.671,336.845c-0.878-3.076,1.438-2.845,4.601-3.794c3.53-1.06,25.071-7.769,26.483-12.359
c1.413-4.591,24.719,3.178,24.719,3.178c3.18,1.412,10.947,6.003,10.947,6.003c8.476,2.119,20.128,2.825,20.128,2.825
c4.238,1.766,10.241,6.709,10.241,6.709c25.778,18.009,47.674,5.297,47.674,5.297c35.313-11.653,24.72-42.022,24.72-42.022
c-5.298-15.891,0.354-21.894,0.354-21.894c0.354-6.709,13.064,4.591,13.064,4.591c4.592,7.416,6.005,16.244,6.005,16.244
c14.125,19.775,8.122-11.653,8.122-11.653c0.353-1.766-4.592-8.122-4.592-10.241s-3.179-8.122-3.179-8.122
c-5.297-6.003-1.06-18.363-1.06-18.363c3.179-24.366-0.706-21.188-0.706-21.188c-2.118-3.178-18.362,14.478-18.362,14.478
c-3.885,6.003-14.479,8.828-14.479,8.828c-4.942,3.178-10.946,0.707-10.946,0.707c-4.59-0.707-14.479,11.653-14.479,11.653
c4.943-0.354,9.182,7.416,13.419,7.769c4.237,0.354,7.415-4.237,10.24-5.297c2.825-1.059,7.769,9.182,7.769,9.182
c0.707,4.59-9.181,13.065-9.181,13.065c-0.707,8.122-3.531,5.297-3.531,5.297c-5.297-1.059-7.415,5.65-9.182,13.772
c-1.766,8.122-9.182,8.829-9.182,8.829c-2.825,13.065-4.945,7.769-4.945,7.769c-0.354-9.888-10.947,0.353-10.947,0.353
c-2.118,3.531-10.239-0.353-10.239-0.353c-12.008-3.531-7.77-7.063-7.77-7.063c3.178-3.884,22.953,0,22.953,0
c3.884-2.825-10.241-9.888-10.241-9.888c-1.06-3.178,0.706-10.947,0.706-10.947c2.119-5.65,14.126-15.538,14.126-15.538
c16.599-2.119,11.654-4.944,11.654-4.944c-10.946-9.182-21.189,4.237-21.189,4.237c-3.884,10.947-34.605,37.432-34.605,37.432
c-8.476,6.003-3.884-6.003-10.947,0c-7.063,6.003-43.435-9.888-43.435-9.888c-20.414-2.106-25.238,25.688-31.47,20.18
C343.93,331.689,353.496,346.732,350.671,336.845z"/>
<path id="path358" d="M694.629,43.132c0,0-45.201,14.125-50.145,47.319c0,0-4.237,40.256,31.78,71.332c0,0,0.707,11.3,4.238,16.95
c0,0-2.825,8.475,30.368-4.944l48.025-14.832c0,0,11.301-4.238,20.481-19.775c9.181-15.538,36.019-48.731,29.662-93.226
c0,0,2.119-19.775-8.475-20.481c0,0-14.832-2.825-27.544,10.594c0,0-12.008,5.65-16.244,4.944L694.629,43.132z"/>
<path id="path362" d="M791.069,41.384c0,0,3.708-15.767-4.837-7.222c0,0-12.432,10.1-25.641,10.1c0,0-25.637,3.884-33.404,27.191
c0,0-6.992,47.39,6.99,57.489c0,0,8.546,13.207,20.978,1.554C767.587,118.843,794.954,65.467,791.069,41.384z"/>
<path id="path366" fill="#323232" d="M790.409,42.016c0,0,3.689-15.438-4.7-7.048c0,0-12.204,9.916-25.173,9.916
c0,0-25.171,3.814-32.798,26.697c0,0-6.865,46.528,6.863,56.444c0,0,8.392,12.967,20.596,1.525
C767.403,118.108,794.224,65.661,790.409,42.016z"/>
<path id="path370" fill="#666666" d="M789.749,42.648c0,0,3.673-15.11-4.563-6.875c0,0-11.978,9.732-24.705,9.732
c0,0-24.705,3.743-32.191,26.202c0,0-6.738,45.667,6.737,55.399c0,0,8.234,12.727,20.213,1.497
C767.22,117.374,793.492,65.855,789.749,42.648z"/>
<path id="path374" fill="#999999" d="M789.089,43.28c0,0,3.654-14.782-4.425-6.703c0,0-11.752,9.549-24.24,9.549
c0,0-24.239,3.672-31.584,25.708c0,0-6.609,44.805,6.61,54.354c0,0,8.08,12.487,19.832,1.469
C767.036,116.639,792.762,66.05,789.089,43.28z"/>
<path id="path378" fill="#CCCCCC" d="M788.429,43.912c0,0,3.638-14.454-4.287-6.529c0,0-11.527,9.365-23.773,9.365
c0,0-23.772,3.602-30.978,25.213c0,0-6.482,43.943,6.483,53.309c0,0,7.924,12.247,19.45,1.441
C766.851,115.904,792.03,66.244,788.429,43.912z"/>
<path id="path382" fill="#FFFFFF" d="M787.767,44.544c0,0,3.619-14.125-4.148-6.356c0,0-11.301,9.181-23.308,9.181
c0,0-23.307,3.531-30.368,24.719c0,0-6.356,43.082,6.355,52.263c0,0,7.77,12.006,19.069,1.412
C766.667,115.17,791.298,66.438,787.767,44.544z"/>
<path id="path386" fill="#992600" d="M414.243,403.323c0,0-36.021-33.901-50.146-35.313c0,0-60.738-7.063-86.87,24.719
c0,0,31.076-36.019,79.807-26.131c0,0-38.138-7.769-60.032-2.119c0,0-29.663,0-46.613,24.719l-4.944,8.475
c0,0,7.063-26.131,39.55-36.726c0,0,40.256-8.475,59.326,0c0,0-38.138-12.006-55.794-8.475c0,0-53.675-4.237-76.275,42.375
c0,0,7.063-25.425,33.194-38.138c0,0,24.013-15.538,60.032-10.594c0,0,25.425,5.65,34.607,9.888
c9.182,4.237,7.063-0.707-7.769-9.182c0,0-9.889-17.656-34.607-16.95c0,0-75.57,6.356-93.932,27.544
c0,0,24.013-19.775,42.375-24.719c0,0,39.55-14.125,54.381-12.713c0,0,43.788,1.766,57.207-5.297c0,0-19.775,8.828-14.125,14.479
c5.649,5.65,17.656,19.069,17.656,21.188s42.729,41.14,49.085,48.908L414.243,403.323z"/>
<path id="path390" fill="#CCCCCC" d="M658.607,745.857c0,0-27.367-64.445-49.438-81.221c0,0,45.906,28.251,52.086,60.032
C661.256,724.67,661.256,742.326,658.607,745.857z"/>
<path id="path394" fill="#CCCCCC" d="M741.593,759.1c0,0-46.789-97.109-79.454-139.484c0,0,76.807,66.212,85.635,113.001
l0.883,9.711l-5.297-4.414C743.358,737.912,742.476,753.803,741.593,759.1z"/>
<path id="path398" fill="#CCCCCC" d="M841.352,673.466c0,0-110.353-105.056-113.001-109.47c0,0,106.821,116.533,112.118,129.775
C840.469,693.771,836.938,677.88,841.352,673.466z"/>
<path id="path402" fill="#CCCCCC" d="M508.528,750.271c0,0,34.43-91.813,67.977-52.087c0,0,26.485,17.656,25.604,22.953
c0,0-7.063-11.477-38.846-10.594C563.263,710.545,529.716,705.248,508.528,750.271z"/>
<path id="path406" fill="#CCCCCC" d="M844.883,525.152c0,0-79.454-50.321-92.695-52.971c-20.848-4.168,87.398,51.204,96.228,69.743
C848.414,541.926,851.945,537.512,844.883,525.152z"/>
<path id="path410" d="M578.803,713.371c0,0,36.02-3.531,48.025-15.537l7.769,6.356l31.075-67.802l6.356,9.183
c0,0,25.426-26.132,24.013-40.257c-1.412-14.125,22.601,10.594,22.601,10.594s-1.413-20.481,11.301-8.477
c0,0-4.237-27.544,10.594-13.419c0,0-18.604-53.246,21.188-7.769c9.889,11.3,2.119-0.706,2.119-0.706s-45.905-84.751-7.769-59.325
c0,0,3.531-40.257,1.412-48.026c-2.118-7.769-5.649-47.319-14.125-56.502c-8.477-9.182,0.706-12.006,10.594-2.824
c0,0-19.775-42.375,3.531-21.188c0,0-6.356-26.838-14.125-31.782c0,0-9.889-30.369,16.949-11.3c0,0-7.769-21.894-13.419-27.544
c0,0-20.48-48.732-7.769-40.257l7.769,6.356c0,0-12.007-24.719-0.706-16.95s11.301,7.063,11.301,7.063s-37.433-58.62-1.412-27.544
c0,0-14.406-24.574-20.481-36.726c0,0-33.193-36.019-7.77-24.719l8.476,2.825c0,0-15.538-17.656-29.663-20.481
c-14.125-2.825,4.237-14.125,15.538-10.594c11.3,3.531,38.844,16.95,38.844,16.95s22.602,33.194,29.663,33.9
c0,0-35.313-13.419-24.719,0.706c0,0,25.425,24.719,12.712,24.013c0,0-10.594,12.713-2.118,28.25c0,0-32.592-32.472-6.355,12.712
l12.006,28.957c0,0-43.081-43.788-23.306-4.944c0,0,30.369,41.669,33.899,42.375c3.531,0.707,11.3,16.244,11.3,16.244l-7.769-3.531
l9.181,15.538c0,0-19.774-21.188-9.181,2.119l9.887,25.425c0,0-36.019-38.844-12.006,13.42c0,0-28.957-9.183-13.419,21.188
c0,0-2.825,28.252-2.119,37.434c0.707,9.183,2.825,59.325-4.942,73.451c-7.77,14.125,10.594,48.025,14.125,55.088
c3.53,7.063,9.888,26.131-5.65,9.889c-15.537-16.244-7.769-6.356-4.237,9.181c3.531,15.538,14.125,43.082,12.713,52.97
c0,0-2.118,2.119-7.769-4.236c0,0-26.132-40.258-23.307-14.832c0,0-2.119,14.125-7.77,29.663c0,0-5.649,19.068-5.649,3.53
c0,0-5.65-29.663-10.595-16.244c-4.943,13.42-11.301,24.014-16.244,28.251c-4.942,4.237-14.125-36.02-16.243-17.656
c0,0-21.188-21.895-29.662,7.063l-20.482,28.957c0,0-0.706-21.894-2.824-11.3C650.135,710.547,597.165,721.141,578.803,713.371z"/>
<path id="path414" d="M518.064,83.389c0,0-20.481-14.125-27.545-13.419c-7.063,0.706,48.731-15.538,121.477,33.194
c0,0,8.476,4.944,14.832,4.238c0,0,5.648,4.237,0.706,10.594c0,0-15.538,16.95,4.237,36.725c0,0,32.487,12.006,22.601-3.531
c0,0,19.069,7.063,23.307,14.125c4.238,7.062,2.118,0,2.118,0s-11.3-12.713-21.894-21.894c0,0-9.183-3.531-14.125-18.363
c-4.944-14.832-9.183-32.488-1.413-38.138c0,0-7.063,7.769-5.649,0.706c1.412-7.063,7.77-13.419,10.594-14.125
c2.825-0.707,31.781-28.604,43.788-29.31c0,0-16.244,2.472-21.541,0.706S617.293,23.003,606.7,20.884c0,0-29.662-11.653-8.476-8.122
c0,0,63.211,6.709,95.346,30.016c0,0-12.713-14.832-45.2-27.191c0,0-39.197-22.247-101.349-13.419c0,0-31.429,5.65-45.2,8.828
c0,0-4.591-1.06-5.65-1.766c-1.059-0.706-21.896-16.597-70.627-4.237c0,0-30.016,8.122-45.2,16.597c0,0-26.838,2.119-33.193,7.769
c0,0-32.842,25.778-36.372,27.191c-3.531,1.413-23.66,14.831-25.072,15.538c0,0,43.435-11.653,47.672-15.891
c4.238-4.237,34.96-8.828,39.197-6.356c4.238,2.472,19.069,1.413,2.119,2.472c0,0,133.483,26.132,134.896,29.663
C511.002,85.507,518.064,83.389,518.064,83.389z"/>
<path id="path418" fill="#CC7226" d="M644.131,67.145c0,0-18.009-13.066-21.54-13.066c-3.532,0-25.426-18.009-32.842-17.303
c-7.415,0.707-28.956-16.95-77.335-2.472c0,0-1.061-3.531,5.297-4.944c0,0,11.301-3.884,12.007-4.944c0,0,35.666-7.416,48.378-1.06
c0,0,16.244,4.591,27.191,15.538c0,0,19.775,5.65,25.425,3.885c0,0,15.538,3.884,16.244,7.063c0,0,10.241,5.297,7.063,9.888
C654.019,59.729,654.725,62.554,644.131,67.145z"/>
<path id="path422" fill="#CC7226" d="M622.112,63.421c1.425,1.116,3.224,1.289,4.292,2.717c0.413,0.554-0.099,1.13-0.653,1.301
c-1.842,0.56-3.706-0.447-5.723,0.591c-0.71,0.366-1.844,0.044-2.819-0.219c-2.882-0.779-6.111-0.823-9.097,0.392
c-3.505-1.994-7.672-0.962-11.348-2.73c-0.102-0.047-0.493,0.563-0.625,0.516c-5.378-2.021-11.985-1.522-16.278-5.555
c-4.286-0.728-8.448-1.543-12.735-2.744c-3.21-0.899-5.697-2.645-8.558-4.114c-2.433-1.25-5.004-2.171-7.713-2.828
c-3.289-0.798-6.521-0.601-9.864-1.519c-0.164-0.044-0.503,0.563-0.648,0.516c-0.57-0.191-1.084-1.22-1.386-1.127
c-2.968,0.922-5.595-0.794-8.533-0.19c-2.08-2.161-5.131-1.729-7.859-2.509c-5.233-1.498-10.804,0.745-16.152-1.022
c7.262-3.252,15.538-1.077,22.71-4.73c4.11-2.094,8.811-0.148,13.348-1.49c0.86-0.254,2.08-0.611,2.786,0.57
c0.237-0.239,0.56-0.661,0.661-0.611c4.325,2.042,8.413,4.292,12.795,6.174c0.604,0.258,1.542-0.152,1.986,0.205
c2.684,2.147,6.114,1.965,8.569,4.119c2.998-0.886,6.164-0.215,9.218-1.317c0.137-0.048,0.55,0.554,0.606,0.516
c1.995-1.321,4.035-0.842,5.609-0.306c0.597,0.203,1.768,0.639,2.307,0.77c1.987,0.487,3.499,1.335,5.581,1.658
c0.201,0.032,0.527-0.568,0.655-0.519c1.982,0.773,3.822,0.674,4.979,2.729c0.238-0.238,0.529-0.658,0.676-0.611
c1.813,0.597,2.959,1.93,4.901,2.355c0.856,0.187,1.938,1.292,2.954,1.603c4.224,1.291,7.479,3.991,11.353,5.571
C619.447,62.132,620.994,62.545,622.112,63.421z"/>
<path id="path426" fill="#CC7226" d="M486.804,38.296c-4.445-3.046-8.627-4.999-12.938-8.152c-0.32-0.235-0.955,0.065-1.313-0.15
c-1.776-1.075-3.346-2.101-5.079-3.33c-0.952-0.674-2.4-0.655-3.299-1.11c-4.491-2.281-9.134-3.267-13.56-5.375
c1.204-1.126,3.185-0.695,4.236-2.119c0.346,0.495,0.766,0.996,1.389,0.659c2.963-1.596,6.229-1.866,9.188-1.708
c3.01,0.163,6.046,0.701,9.181,1.181c0.542,0.083,0.894,1.006,1.464,1.178c3.934,1.171,8.15,0.244,11.894,1.723
c2.81,1.111,5.581,2.564,7.77,4.815c0.444,0.459-0.13,0.991-0.623,1.333c0.685-0.193,1.167,0.171,1.361,0.724
c0.148,0.422,0.148,0.955,0,1.377c-0.196,0.551-0.689,0.729-1.351,0.819c-2.484,0.336,0.645-2.101-0.591-1.31
c-2.248,1.438-0.932,3.92-2.246,6.159c-0.494-0.342-0.9-0.728-0.706-1.413c0.413,0.922-0.65,1.434-0.947,1.992
C489.953,36.869,488.366,39.367,486.804,38.296z"/>
<path id="path430" fill="#CC7226" d="M429.424,51.27c-5.568-1.402-10.954-1.199-16.279-3.452c-0.117-0.049-0.512,0.563-0.625,0.516
c-2.411-1.049-4.032-2.754-5.933-4.602c-1.612-1.568-4.539-0.884-6.789-1.744c-0.572-0.219-0.931-1.123-1.462-1.192
c-2.152-0.277-3.789-1.953-5.634-2.961c4.124-1.404,8.381-1.349,12.729-2.027c0.199-0.031,0.455,0.535,0.69,0.535
c0.24,0,0.47-0.39,0.706-0.627c0.345,0.495,0.878,1.07,1.331,0.622c0.968-0.953,1.949-0.618,2.902-0.547
c0.255,0.018,0.476,0.553,0.709,0.553c0.24,0,0.473-0.549,0.707-0.549c0.239,0.001,0.472,0.549,0.706,0.549
c0.24,0,0.471-0.39,0.706-0.627c1.223,1.381,2.784,0.403,4.235,0.719c1.833,0.401,2.305,2.428,4.201,2.954
c8.324,2.302,15.629,6.09,23.333,9.774c0.542,0.26,0.912,0.698,0.719,1.384c0.471,0,1.023-0.155,1.359,0.078
c1.867,1.292,3.706,2.26,4.937,4.199c0.381,0.599-0.199,1.317-0.61,1.226C444.243,54.292,437.17,53.219,429.424,51.27z"/>
<path id="path434" fill="#CC7226" d="M404.952,129.332c-2.813-2.152-3.842-5.738-5.834-8.902c-0.378-0.6,0.105-1.154,0.666-1.312
c0.987-0.281,1.946,0.563,2.669,0.92c3.081,1.522,5.792,3.715,9.316,3.96c3.515,3.945,11.036,4.625,11.049,10.594
c0.002,1.517-2.521-0.104-3.278,1.412c-4.328-1.771-8.546-1.589-12.748-4.179C405.702,131.152,406.285,130.353,404.952,129.332z"/>
<path id="path438" fill="#CC7226" d="M356.33,36.5c0.238,0.002,12.652,0.413,12.622,0.614c-0.079,0.546-13.729,2.398-14.37,2.098
c-0.29-0.134-13.554,4.156-13.79,3.92C341.266,42.894,355.86,36.5,356.33,36.5z"/>
<path id="path442" d="M383.521,53.726c0,0-26.133,3.178-33.9,5.297c-7.77,2.119-40.609,15.538-45.907,19.069
c0,0-23.66,9.535-53.675,44.848c0,0,13.419-6.003,17.303-10.947c0,0,24.013-22.247,23.66-17.656c0,0,21.541-15.185,20.481-11.3
c0,0,43.082-19.775,39.551-14.125c0,0,38.138-8.122,36.372-4.591c0,0,33.192,7.769,28.25,8.122c0,0-10.241,2.119,1.06,8.475
c0,0-6.003,7.769-15.538,0.707c-9.534-7.063-4.236-3.178-13.064-1.413c0,0-4.592,1.413-12.713-5.65c0,0-9.889-8.122-25.426-1.766
c0,0-54.029,22.247-57.56,23.307c0,0-6.356,4.944-10.594,11.3c0,0-10.241,7.769-15.538,10.241c0,0-22.6,20.481-24.719,22.953
c0,0-6.003,9.181-7.416,9.888c0,0,11.3-6.709,14.831-10.241c0,0,24.719-17.656,34.253-19.069c0,0,7.769-5.297,9.182-7.769
c0,0,25.425-16.244,32.84-16.244c0,0,16.244,9.181,20.482-3.178c0,0,10.239-3.178,20.128-1.06c0,0,5.649-4.591,4.236-8.475
c0,0,2.825-3.178,4.592,3.531c0,0,6.003,6.356,14.479,2.825c0,0,7.063-0.353,3.531,3.884c0,0-7.77,6.709-28.604,7.063
c0,0-21.895,1.06-50.851,14.479c0,0-52.616,18.363-68.86,36.725c0,0-11.3,15.538-20.834,17.657c0,0-10.241,1.412-20.834,14.478
c0,0,17.303-10.241,33.194-10.241c0,0,7.063-4.237,0.353,2.119c0,0-6.356,13.418-3.531,22.953c0,0-1.06,9.181-2.472,12.006
c0,0-13.772,22.6-13.772,26.838c0,4.237,2.119,21.541,2.825,22.6c0.706,1.06-1.766-2.825,4.944,1.413
c6.709,4.237,11.653,7.063,13.065,12.006c1.413,4.944-3.531-9.535-3.884-12.713c-0.353-3.178-7.769-15.891-6.356-20.128
c0,0,1.766,1.766,3.178,4.237c0,0-1.059-1.06,0-7.416c0,0,1.413-9.182,3.885-14.832s6.003-12.359,6.709-13.772
c0.707-1.413,0.707-11.653,3.178-7.063l6.003,4.59c0,0-4.944-4.59-1.06-8.475c0,0-1.766-9.888,1.413-14.479
c0,0,12.359-14.832,15.185-16.597c2.826-1.765,0.353-1.059,0.353-1.059s10.594-7.416,0.353-4.591c0,0-7.063,2.825-12.359,2.825
c0,0-13.419,3.531-6.356-3.885s24.719-16.95,31.429-16.597l1.413,2.825l19.775-4.237l-2.119,1.413c0,0-0.353-0.354,7.063-1.06
s17.656,1.766,20.128-1.413c2.473-3.178,8.477-4.944,7.771-2.472c-0.706,2.472-1.061,6.003-1.061,6.003s8.828-10.241,7.77-6.356
c-1.061,3.884-15.537,13.065-18.011,24.013l18.363-14.479l6.356-5.297c0,0,6.355,3.884,6.709,1.06
c0.354-2.825,8.476-13.066,10.594-12.713c2.119,0.353,5.649-4.591,5.297,0c-0.353,4.591,13.066,14.125,13.066,14.125
s5.648-3.178,8.122-0.706c2.472,2.472,9.887-34.96,9.887-34.96l44.142-18.716l76.983-6.003l-30.017-12.006L383.521,53.726z"/>
<path id="path446" stroke="#4C0000" stroke-width="2" d="M415.655,405.089c0,0-26.484-29.663-41.316-34.254
c0,0-23.659-12.006-67.094,1.766"/>
<path id="path450" stroke="#4C0000" stroke-width="2" d="M368.689,368.363c0,0-44.494-14.125-71.687-6.709
c0,0-32.488,3.531-47.319,27.897"/>
<path id="path454" stroke="#4C0000" stroke-width="2" d="M362.333,366.245c0,0-30.016-12.713-56.147-16.597
c0,0-29.31-4.591-58.62,8.122c0,0-21.541,10.594-31.075,28.603"/>
<path id="path458" stroke="#4C0000" stroke-width="2" d="M364.099,366.951c0,0-27.19-19.422-28.957-21.894
c0,0-12.358-19.422-35.313-20.128c0,0-37.785,1.413-68.154,15.538"/>
<path id="path462" d="M361.794,351.072c2.723,2.583,50.33,53.664,50.33,53.664c62.15,64.624,12.713,4.236,12.713,4.236
c-13.419-8.475-29.663-41.669-29.663-41.669c-2.119-4.944,24.719,12.713,24.719,12.713c7.063,1.412,31.075,35.313,31.075,35.313
c-12.006-4.237-3.53,8.476-3.53,8.476c4.943,3.531,40.965,31.077,40.965,31.077c6.355,7.063,13.419,9.888,13.419,9.888
c24.719-9.182,13.419,14.125,13.419,14.125c4.236,12.007,14.125-8.476,14.125-8.476c19.774-29.664-9.182-25.425-9.182-25.425
c-52.972,4.942-64.978-23.31-64.978-23.31c-4.238-4.236,11.3,0,11.3,0c14.833,3.531-12.713-21.894-12.713-21.894
c4.237,0,20.481,12.006,20.481,12.006c18.363,16.244,21.896,12.713,21.896,12.713c31.782-15.538,50.146-2.119,50.146-2.119
c3.53,2.825-6.356,14.832-3.531,24.016c2.825,9.182,11.3,31.075,11.3,31.075c-4.237,2.824-3.531,21.895-3.531,21.895
c29.663,40.963,12.713,37.432,12.713,37.432c-27.544-0.707-1.411,12.712-1.411,12.712c5.648,3.531,21.188,16.244,21.188,16.244
c-4.944-2.119-7.769,7.063-7.769,7.063c8.475,7.063,3.53,15.538,3.53,15.538c-10.594,2.118-12.713,9.181-12.713,9.181
c12.006,14.126-5.649,14.832-5.649,14.832c6.355,7.769-2.118,28.956-2.118,28.956c-8.477,0-19.775,9.888-19.775,9.888
c4.237,8.477-14.125,18.363-14.125,18.363c-14.832,2.824-9.888,14.831-9.888,14.831c-14.125,10.594-18.363,38.844-18.363,38.844
c-1.412,18.363-5.648,24.014,3.531,20.481c9.182-3.531,7.77-25.425,7.77-25.425c-8.476-27.545,67.095-55.795,67.095-55.795
c7.063-2.824,8.476-12.007,8.476-12.007c3.531,0.706,19.069,14.125,19.069,14.125c13.418,19.775,14.125,3.531,14.125,3.531
c2.118-6.356-0.707-16.95-0.707-16.95c10.595-38.138-14.125-49.438-14.125-49.438c-17.656-59.326,7.063-44.494,7.063-44.494
c4.944,9.888,24.014,19.068,24.014,19.068l6.355-4.237c-2.824-8.477,12.007-19.069,12.007-19.069
c4.943,11.301,15.537-2.824,15.537-2.824c6.356-43.082,28.251-17.656,28.251-17.656c7.063,2.119,9.182-9.889,9.182-9.889
c6.355-18.361,0-42.375,0-42.375c6.355-0.706,23.307,9.889,23.307,9.889c4.944-6.356-11.3-36.021-4.237-31.781
c7.063,4.237,14.831,7.063,14.831,7.063c1.413-3.53-16.243-25.426-16.243-25.426c-7.77-4.945-16.949-40.965-16.949-40.965
c12.712,6.356-4.944-20.481-4.944-20.481c0-5.65,10.594-25.425,10.594-25.425c-1.412-12.006,0-11.3,0-11.3
c4.944,2.119,19.069,4.944,7.063-6.356c-12.006-11.3,1.413-19.775,1.413-19.775c7.769-4.944-16.244-4.238-16.244-4.238
c-9.183-7.769-8.477-14.831-8.477-14.831c14.126,3.531-11.3-21.894-15.536-28.25c-4.237-6.356,12.713-15.538,12.713-15.538
c23.307-6.356,2.823-12.006,2.823-12.006c-34.605,0.706-15.536-18.363-15.536-18.363c10.594,0.707,7.769-3.531,7.769-3.531
c-9.181-2.119-26.132-13.419-26.132-13.419c-7.063-6.356-0.706-4.944-0.706-4.944c29.663,2.119-21.188-17.656-21.188-17.656
c14.125,0-17.655-18.363-17.655-18.363c-3.531-2.825-9.183-16.244-9.183-16.244c-10.594-9.182-19.067-21.188-19.067-21.188
c-0.707-7.769-9.183-16.244-9.183-16.244c-20.48-24.013-30.369-23.307-30.369-23.307c-26.132-6.356-35.313-4.944-35.313-4.944
l-93.229,7.769c-46.612,22.6-32.842,59.679-32.842,59.679c11.301,14.831,27.544,8.122,27.544,8.122
c8.122-10.947,28.604-7.063,28.604-7.063c36.021,5.65,31.431-0.706,31.431-0.706c-4.237-8.122-32.843-19.069-33.196-20.128
c-0.353-1.06-15.891-7.063-15.891-7.063c-5.297-2.119-13.065-18.363-13.065-18.363c-5.649-6.003,22.247,4.238,22.247,4.238
c-2.119,1.766,10.947,8.828,10.947,8.828c30.724-1.766,49.439,17.303,49.439,17.303c19.068,29.31,19.422,14.832,19.422,14.832
c4.943-16.597-15.892-54.029-15.892-54.029c0.706-3.531,15.186,8.122,15.186,8.122c2.472-3.531,3.885,6.709,3.885,6.709
c0.353,4.237,7.063,18.362,7.063,18.362c4.942,22.954,11.3,9.888,11.3,9.888l8.122,16.597c2.472,4.591-8.122,18.01-8.122,18.01
c-0.354,4.944,1.06,4.59-8.828,18.009s-3.885,21.188-3.885,21.188c-2.473,11.653,13.064,10.947,13.064,10.947
c4.591,3.884,10.595,3.884,10.595,3.884c3.179,3.531,7.415,2.472,7.415,2.472c2.825-6.709,13.772-3.178,13.772-3.178
c2.472-4.238,16.95-4.944,16.95-4.944c1.766-4.591,2.472-7.416,8.475-8.475c6.004-1.06-37.432-76.982-37.432-76.982
c11.301-1.413-3.179-23.307-3.179-23.307c-3.885-11.653,16.244,14.125,20.128,16.597c3.886,2.472,5.65,6.356,2.825,6.003
s-6.003,3.532-3.531,3.885c2.473,0.354,25.427,26.837,31.43,44.847c6.003,18.01,16.597,25.072,27.544,35.666
c10.947,10.594,9.534,53.322,9.534,53.322c-0.706,15.538,9.888,34.253,9.888,34.253c3.531,6.709-3.885,38.844-3.885,38.844
c-3.531,3.884-1.06,5.297-1.06,5.297c1.767,2.119,13.771,25.425,13.771,25.425c-3.178-0.353,3.179,6.003,3.179,6.003
c9.181,10.594-2.119,5.297-2.119,5.297c-10.594-2.825,1.767,14.479,1.767,14.479c2.119,3.178-13.772-4.944-13.772-4.944
c-16.243-1.06,4.238,11.653,4.238,11.653c15.185,12.713-4.944,4.943-4.944,4.943c-8.122-3.179-2.472,8.828-2.472,8.828
c5.649,2.824,36.02,15.186,36.02,15.186c0.706,6.711-4.591,15.539-4.591,15.539c0.706,7.063-3.179,13.064-3.179,13.064
c-2.118,14.479-3.178,15.891-3.178,15.891c-7.416,0.354-20.481,24.721-20.481,24.721c-3.179,4.591-21.188,25.777-21.188,25.777
c-3.531,12.359-35.313-0.354-35.313-0.354c-11.653,6.003-8.122,0-8.122,0c-0.706-3.884,7.771-14.479,7.771-14.479
c12.358-4.59,7.769-23.658,7.769-23.658c7.063-2.473-12.713-7.416-12.359-9.534c0.354-2.119,10.595-4.591,10.595-4.591
c14.125-3.531,6.355-7.77,6.355-7.77c-1.06-7.063,4.237-16.95,4.237-16.95c20.48-1.413,0-30.019,0-30.019
c-19.068-13.418-20.835-23.659-20.835-23.659c22.247-14.478,7.77-36.372,8.122-42.729c0.354-6.356,2.473-44.494,2.473-44.494
c-3.531-10.947-8.828-34.96-8.828-34.96c3.885-9.181,16.949-31.428,16.949-31.428c4.944-7.416,20.481-15.891,16.598-21.188
c-3.885-5.297-17.655-2.119-17.655-2.119c-13.772-2.472-12.713,6.709-12.713,6.709c-2.825,1.766-4.237,10.594-4.237,10.594
c-1.273,14.007-16.95,25.072-16.95,25.072c-19.775,10.947-3.531,18.01-3.531,18.01c10.595,11.653-6.71,12.006-6.71,12.006
c-19.422-3.178-4.942,14.831-4.942,14.831c19.067,22.601,13.771,27.544,13.771,27.544c-18.009,1.766,4.237,18.009,4.237,18.009
s-1.412-3.531-1.06-0.353c0.354,3.178,5.649,10.594,7.063,14.125c1.412,3.531-5.65,3.885-5.65,3.885
c1.061,16.95-26.132,9.534-26.132,9.534s0,0-2.824,0.353c-2.824,0.354-22.601-1.059-32.841-4.944
c-10.241-3.884-22.248-3.884-22.248-3.884s-7.063,3.178-20.481,2.825s-27.544,4.59-27.544,4.59
c-7.771-0.706,7.415-8.475,7.769-8.122s10.24-9.535-3.885-8.475c-38.485,2.887-57.561-15.185-57.561-15.185
c-3.53-2.472-8.122-7.416-8.122-7.416c-17.655-3.531,2.473,21.894,2.473,21.894c2.119,2.472-0.354,4.238-0.354,4.238
c-1.413-2.825-15.185-12.359-15.185-12.359C368.316,357.817,365.91,355.461,361.794,351.072z"/>
<path id="path466" fill="#4C0000" d="M319.604,330.579c0,0,20.481,9.887,25.072,14.831c4.591,4.944,29.311,25.072,29.311,25.072
s-9.535-3.531-14.125-6.709c-4.592-3.178-23.66-17.656-23.66-17.656S329.492,335.522,319.604,330.579z"/>
<path id="path470" fill="#99CC32" d="M217.181,275.496c0.595-0.261-0.33-5.05-0.69-6.008c-1.804-4.813-17.656-7.416-17.656-7.416
c-0.401,2.41-0.498,5.229-0.311,8.121C198.523,270.192,207.119,279.936,217.181,275.496z"/>
<path id="path474" fill="#659900" d="M217.181,275.143c-0.793,0.279-0.026-4.827-0.337-5.655
c-1.804-4.813-18.009-7.592-18.009-7.592c-0.401,2.41-0.498,5.228-0.311,8.12C198.523,270.015,206.06,279.053,217.181,275.143z"/>
<path id="path478" d="M209.428,275.395c-1.104,0-1.997-2.013-1.997-4.495c0-2.481,0.894-4.494,1.997-4.494
c1.104,0,1.999,2.013,1.999,4.494C211.427,273.382,210.532,275.395,209.428,275.395z"/>
<path id="path486" d="M128.915,448.525c0,0-9.888,17.655,33.9,7.063c0,0,24.719-2.119,28.957-6.355
c2.119,1.411,16.89,6.591,21.894,7.769c12.006,2.825,26.838-14.833,26.838-14.833s8.122-18.539,13.066-18.539
c4.944,0-0.707,2.825-0.707,2.825s-11.653,17.834-10.947,20.659c0,0-9.181,35.313-37.432,36.726c0,0-28.515,1.678-26.131,12.007
c0,0,15.538-4.237,19.775,0c0,0,19.069-0.707,4.944,10.595l-12.006,20.48c0,0,0.247,6.918-17.656,0.706
c-17.303-6.003-35.489-28.78-35.489-28.78S109.758,473.156,128.915,448.525z"/>
<path id="path490" fill="#E59999" d="M126.796,455.588c0,0-3.531,16.95,61.444-1.413c0,0,7.769,0,12.007,1.413
c4.237,1.412,25.425,6.356,28.957,4.237c0,0-12.713,24.013-33.194,21.188c0,0-23.307,2.825-22.6,11.302
c0,0,7.063,12.712,15.538,16.949c0,0,4.944,4.237,4.237,9.888c-0.706,5.649-5.65,8.476-9.181,9.888
c-3.531,1.413-9.181-4.237-12.006-4.237s-17.656-11.3-25.425-19.774c-7.769-8.476-22.6-29.662-21.894-34.606
C125.384,465.476,126.796,455.588,126.796,455.588z"/>
<path id="path494" fill="#B26565" d="M132.446,486.398c4.591,6.974,10.241,14.39,14.125,18.627
c7.769,8.476,22.6,19.774,25.425,19.774c2.825,0,8.475,5.65,12.006,4.237c3.531-1.412,8.475-4.237,9.181-9.888
c0.707-5.649-4.237-9.888-4.237-9.888c-5.414-2.707-10.251-8.873-13.04-12.975c0,0,0.327,4.499-8.854,3.087
c-9.181-1.413-18.363-6.356-21.188-12.007c-2.825-5.65-7.063-9.888-4.238-3.531s7.063,12.713,9.888,13.419
c2.825,0.706,2.119,2.825-2.119,2.119c-4.238-0.707-9.182-1.413-16.95-10.594L132.446,486.398L132.446,486.398z"/>
<path id="path498" fill="#992600" d="M127.855,449.231c0,0,3.178-24.016,5.297-31.077c0,0-1.413-12.007,2.825-19.422
c4.237-7.417,7.769-18.363,13.066-27.897s5.65-16.597,12.712-19.422c7.062-2.825,17.656-18.01,22.6-19.775
c4.944-1.765,4.591-0.353,4.591-0.353s12.006-26.131,36.019-19.069c0,0-28.604-4.944-0.706-21.541c0,0-8.475,1.942-2.648-10.417
c3.886-8.242,3.001,3.708-16.421,24.542c0,0-8.828,15.185-18.009,20.481c-9.181,5.297-30.369,17.657-32.488,24.366
c-2.119,6.709-7.769,16.95-11.3,19.775c-3.531,2.825-8.475,10.241-9.181,16.244c0,0-2.119,7.063-4.591,9.181
c-2.472,2.119-2.825,7.769-2.825,11.299c0,3.532-3.531,8.477-3.178,12.714c0,0,1.412,33.549,0.706,37.079L127.855,449.231z"/>
<path id="path502" fill="#FFFFFF" d="M112.671,457.354c0,0-3.531-2.472-11.3,8.122c0,0,12.889,58.267,12.889,60.738
c0,0,1.942-3.708-0.354-16.421c-2.295-12.713-3.884-35.137-3.884-35.137L112.671,457.354z"/>
<path id="path506" fill="#992600" d="M150.809,350.354c0,0-31.076,5.65-30.369,57.207l-1.413,43.79c0,0-2.119-45.202-4.238-48.026
c-2.119-2.825,4.944-22.601-0.706-12.007c0,0-24.719,24.719-10.594,62.152c0,0,2.648,5.827-2.648-2.295
c0,0-8.122-22.249-6.18-33.549c0,0,0.353-3.885,3.708-8.828c0,0,15.185-20.659,19.952-24.72c0,0,3.178-25.425,30.369-34.606
C148.69,349.471,158.754,345.41,150.809,350.354z"/>
<path id="path510" d="M396.939,233.468c1.164-0.625,1.148-2.338,2.174-2.644c2.027-0.607,2.317-2.491,3.231-3.875
c1.542-2.329,1.883-5.036,2.91-7.668c0.48-1.236,0.527-2.922-0.024-4.087c-2.072-4.381-3.313-8.705-5.858-12.988
c-0.473-0.794-0.937-2.196-1.29-3.252c-0.817-2.443-3.037-4.193-4.556-6.524c-0.51-0.779,0.419-2.412-0.847-2.56
c-1.584-0.186-4.143-1.209-4.554,0.602c-1.038,4.568,0.747,9.022,2.456,13.334c-1.381,1.222-0.791,2.848-0.522,4.202
c1.255,6.367-0.86,12.286-2.204,18.419c-0.041,0.184,0.563,0.533,0.514,0.643c-2.158,4.743-4.722,9.06-7.935,13.264
c-1.338,1.751-2.878,3.369-3.755,5.246c-0.649,1.39-1.37,3.095-0.929,4.84c-6.065,4.908-10.038,11.697-14.647,18.488
c-0.815,1.201-0.303,3.335,0.672,3.811c1.435,0.703,3.123-1.105,3.953-2.599c0.687-1.232,1.31-2.38,2.177-3.516
c0.233-0.309-0.081-1.049,0.157-1.262c4.647-4.144,7.596-9.328,11.927-13.509c3.442-0.581,6.157-2.343,9.243-4.131
c0.544-0.316,1.469,0.124,1.98-0.221c3.095-2.078,3.091-5.673,3.278-9.045C394.58,236.872,394.927,234.547,396.939,233.468z"/>
<path id="path514" d="M381.329,225.583c0.22-0.136-0.055-0.883,0.138-1.264c0.286-0.572,0.998-0.904,1.284-1.476
c0.192-0.381-0.096-1.052,0.146-1.303c4.118-4.321,4.572-9.66,2.743-14.909c1.809-1.095,1.915-3.323,1.165-4.818
c-1.506-3.002-1.847-6.402-3.567-9.127c-1.416-2.24-4.202-4.437-6.623-2.136c-0.743,0.706-1.311,2.096-0.819,3.353
c0.113,0.288,0.616,0.545,0.568,0.69c-0.188,0.572-1.152,0.967-1.163,1.448c-0.053,2.641-1.737,5.309-0.625,7.656
c1.363,2.876,2.809,6.155,4.003,9.291c-2.179,3.736-0.355,8.06-3.45,11.374c-0.24,0.258-0.225,0.939-0.009,1.296
c0.516,0.858,1.231,1.575,2.09,2.091c0.357,0.213,0.972,0.217,1.324-0.002C379.553,227.106,380.256,226.247,381.329,225.583z"/>
<path id="path518" d="M492.233,207.377c2.451,3.164,2.964,8.099-0.653,10.554c0.971,5.842,6.888,2.348,10.594,1.412
c-0.191-0.685,0.208-1.292,0.708-1.301c1.866-0.026,3.066-1.849,4.941-1.523c0.767-2.75,3.659-3.989,4.796-6.425
c3.048-6.524,2.004-14.069-2.559-19.8c-0.356-0.449,0.025-1.361-0.192-2c-1.335-3.904-4.986-4.46-8.401-5.675
c-2.078-6.842-3.245-13.959-6.354-20.481c-2.851-0.441-4.082-3.512-6.443-4.783c-2.354-1.27-3.355,1.519-3.284,3.365
c0.014,0.362,0.812,0.757,0.512,1.402c-0.136,0.29-0.595,0.486-0.595,0.722c0.002,0.238,0.394,0.47,0.629,0.707
c-1.62,1.448-4.134,2.29-4.653,4.312c-1.686,6.55,2.857,12.068,5.804,17.72c1.044,2.004-0.256,4.249-1.598,6.381
c-0.773,1.227-0.583,3.217-0.097,4.729C486.714,200.806,489.521,203.876,492.233,207.377z"/>
<path id="path522" d="M426.622,239.84c-2.626,3.268-8.65,7.804-3.5,11.208c0.343,0.228,0.996,0.234,1.302-0.002
c3.568-2.763,7.104-4.357,11.405-5.385c0.22-0.051,0.703,0.773,1.354,0.489c2.849-1.242,6.397-1.139,8.487-3.501
c6.651,0.396,12.946-1.575,18.934-3.884c2.051-0.791,4.293-1.778,6.412-2.665c2.431-1.017,4.557-2.655,6.521-4.67
c0.233-0.24,0.858-0.082,1.331-0.082c-0.07-1.523,1.628-1.748,2.063-2.846c0.163-0.41-0.102-1.109,0.133-1.289
c3.775-2.878,5.399-6.441,3.336-10.638c-0.504-1.021-0.942-2.112-1.941-2.952c-1.916-1.608-3.862-0.101-5.711-0.637
c-0.28,1.108-1.567,0.805-2.249,1.155c-1.517,0.775-3.87-0.258-5.387,0.515c-2.405,1.227-4.598,1.526-7.106,2.191
c-0.552,0.145-1.925-0.025-2.208,1.083c-0.236-0.237-0.497-0.65-0.685-0.611c-3.369,0.699-5.595,1.077-7.892,4.064
c-0.182,0.235-0.962-0.081-1.243,0.157c-1.688,1.427-2.403,3.605-4.349,4.792c-0.354,0.217-0.977-0.079-1.319,0.148
c-1.141,0.761-1.787,1.893-2.922,2.682c-0.581,0.404-1.287-0.169-1.229-0.622c0.433-3.438,1.585-6.593,0.569-9.905
c3.667-4.449,8.111-7.891,11.301-12.713c0.025-3.824,1.248-7.613,1.049-11.28c-0.019-0.341-0.526-1.635-0.748-2.248
c-0.552-1.508,1.049-3.39-0.441-4.668c-2.479-2.124-4.761-0.578-6.216,1.953c-3.245,0.688-6.893,1.912-9.679-0.267
c-1.778-1.39-2.799-2.989-4.21-4.854c-1.738-2.299-1.147-4.834-1.023-7.596c0.011-0.226-0.546-0.466-0.546-0.703
c0.002-0.238,0.391-0.47,0.627-0.706c-1.246-1.105-1.731-2.974-3.531-3.532c0.538-1.928-0.654-3.489-2.192-4.022
c-3.522-1.22-6.483,2.156-9.823,2.285c-0.908,0.034-1.732-1.799-2.878-2.373c-0.764-0.381-2.006-0.439-2.646,0.03
c-1.215,0.89-2.255,1.091-3.593,1.453c-2.854,0.77-5.11,2.701-7.725,4.211c-2.622,1.513-4.31,4.05-6.216,6.381
c-1.661,2.034-1.901,6.296,0.605,7.179c3.254,1.148,5.557-3.625,9.027-3.049c0.551,0.09,0.915,0.639,0.721,1.324
c0.688,0.193,1.071-0.212,1.412-0.706c1.515,1.799,3.57,2.394,5.227,3.936c1.714,1.596,4.796,0.858,6.589,2.619
c2.698,2.652,1.712,7.386,5.136,9.69c-1.034,2.318-2.106,4.573-2.698,7.092c-0.497,2.129,1.258,4.243,3.396,4.082
c2.222-0.166,2.684-1.506,3.54-3.406c0.472,0.472,1.3,0.996,1.228,1.377c-0.807,4.214-2.62,7.733-3.429,12.025
c-0.104,0.56-0.644,0.917-1.33,0.722c-0.826,7.326-7.98,11.553-12.475,17.141c-0.712,0.886-0.719,3.092,0.004,3.803
c2.478,2.449,5.938-0.281,8.938-1.169c0.376-2.129,1.893-3.792,4.245-3.694c0.452,0.018,0.866-0.939,1.438-1.169
c0.614-0.244,1.501,0.152,2.007-0.198c3.053-2.11,5.539-4.063,8.606-6.162c0.339-0.231,0.946,0.05,1.328-0.141
c0.574-0.286,0.904-0.969,1.475-1.296c0.614-0.353,1.041,0.159,1.383,0.653c-1.142,0.616-1.147,2.306-2.176,2.663
c-1.367,0.473-2.358,1.379-3.549,2.168c-0.516,0.341-1.68-0.097-1.862,0.219C429.966,237.508,427.875,238.281,426.622,239.84z"/>
<path id="path526" d="M328.785,152.602c0,0-16.312-5.071-36.019,40.257c0,0-4.238,9.181-8.475,12.712
c-4.238,3.531-24.013,9.888-27.544,16.95l-18.363,28.25c0,0,26.131-28.25,31.782-32.488c0,0,14.125-14.832,8.475-2.825
c0,0-24.719,19.069-22.601,35.313c0,0-9.887,25.425-11.3,28.957c0,0,28.25-56.5,32.488-58.62c4.237-2.119,6.356-2.119,4.237,4.238
c-2.119,6.357-2.825,35.313-7.769,38.844c0,0,14.125-36.02,12.712-41.669c0,0,5.65-6.356,9.888,2.825l-2.119,28.25l7.769,21.188
c0,0-4.237-19.775-1.413-47.319c0,0-3.531-18.363,3.531-8.475c7.062,9.888,24.013,20.481,24.013,28.957
c0,0-9.181-31.075-25.425-39.55l-7.063,10.594l-2.119-3.531c0,0-6.356-1.413,1.413-13.419c7.769-12.006,7.063-13.419,7.063-13.419
s11.3,12.713,14.125,12.713c0,0,23.307-13.419,25.425,29.663c0,0,12.007-25.425-4.237-37.432c0,0-26.132-3.531-24.013-12.712
l12.713-21.894c6.356-9.182,3.531-4.238,3.531-4.238L328.785,152.602z"/>
<path id="path530" d="M293.473,181.558c0,0-22.6,0-28.25,9.181l-12.713,16.95c0,0,30.369-17.656,37.432-19.775
S293.473,181.558,293.473,181.558z"/>
<path id="path534" d="M222.847,192.858c0,0-3.531,2.119-4.238,7.063c-0.706,4.944-4.944,5.65-3.531,10.594
c1.413,4.944,4.944,9.182,4.944,2.119c0-7.063,2.825-10.594,4.238-12.712C225.672,197.802,228.497,190.033,222.847,192.858z"/>
<path id="path538" d="M207.31,300.916c0,0-14.832-7.063-20.481-13.419c-5.65-6.356-4.852,2.765-13.419,2.119
c-10.324-0.779-8.475-28.957-8.475-28.957l-7.063,13.418c0,0-2.119,25.425,12.006,21.188c6.898-2.069,9.181,0.706,6.356,2.119
c-2.825,1.413,9.887,2.119,4.943,4.944c-4.943,2.825,20.481-6.356,16.244,12.006L207.31,300.916z"/>
<path id="path542" d="M185.063,326.341c0,0-27.191,7.769-33.547-9.181c0,0-8.475,4.237-4.591,9.534
c3.885,5.297,6.003,6.003,6.003,6.003s9.534,2.119,8.475,3.531c-1.06,1.413-5.297,7.416-5.297,7.416S174.115,333.05,185.063,326.341
z"/>
<path id="path546" fill="#FFFFFF" d="M588.337,464.416c-0.754,3.768-3.704,5.182-7.063,6.355c-3.386-1.69-7.973-7.176-11.301-3.53
c-0.837-0.849-2.213-0.954-2.819-2.123c-0.82-1.585-0.342-3.433-0.944-4.841c-0.962-2.246-2.214-4.658-1.886-7.161
c3.188-1.258,4.239-4.623,3.401-7.735c-0.122-0.454-0.879-0.802-0.525-1.418c0.329-0.57,0.89-0.972,1.36-1.441
c-0.237,0.237-0.493,0.648-0.689,0.613c-1.077-0.188-0.857-1.313-0.628-1.995c1.032-3.083,4.589-3.549,6.969-1.443
c0.452-0.998,1.352-0.655,2.118-0.706c-0.088-1.022,0.633-1.953,0.982-2.694c0.913-1.938,3.791,0.014,5.197-1.065
c1.899-1.457,3.776-2.691,5.681-1.628c3.193,1.789,6.212,3.93,8.327,7.004c1.017,1.473,1.439,3.733,1.338,5.426
c-0.067,1.143-2.507,0.521-3.111,2.161c-1.139,3.086,2.095,4.003,3.43,6.364c0.35,0.616-0.117,1.153-0.673,1.326
c-0.726,0.227-2.11-0.107-1.866,0.691C597.351,462.212,592.484,463.409,588.337,464.416z"/>
<path id="path550" fill="#FFFFFF" d="M571.385,499.022c-0.012-3.068-2.839-6.17-0.704-9.183c0.238,0.237,0.471,0.627,0.706,0.627
c0.238,0,0.471-0.39,0.706-0.627c2.641,3.913,9.088,5.552,8.837,10.576c-0.038,0.79-1.958,2.41-0.36,3.55
c-3.201,2.38-3.3,6.564-4.944,9.887c-2.186-0.505-4.325-1.146-6.356-2.117c0.622-2.624,0.415-5.599,1.863-7.929
C571.896,502.575,571.391,500.67,571.385,499.022z"/>
<path id="path554" fill="#CCCCCC" d="M277.935,483.132c0,0-29.765,17.896-4.944-9.182c15.538-16.95,33.194-26.838,33.194-26.838
s18.362-7.771,24.719-9.89c6.355-2.119,33.193-11.301,38.845-12.007c5.649-0.706,22.6-7.769,34.606-0.706
c12.006,7.063,26.131,14.831,26.131,14.831s-28.956-14.831-35.313-10.594c-6.356,4.237-19.069,3.531-29.663,9.182
c0,0-26.131,7.771-31.781,11.303c-5.649,3.53-24.013,24.013-26.837,22.601c-2.825-1.413,0.706-2.119,2.825-7.063
c2.119-4.943-1.412-7.77-15.538,3.531C280.054,479.601,277.935,483.132,277.935,483.132z"/>
<path id="path558" d="M291.01,472.596c0,0,2.49-23.022,17.459-20.084c0,0,14.523-7.361,19.33-10.837c0,0,14.37-3.006,16.685-4.095
c32.627-15.361,58.614-7.383,59.581-9.359c0.965-1.977,35.614,10.59,41.986,17.806c0.69,0.781-18.063-9.884-35.188-13.223
c-14.607-2.85-52.748,0.438-72.005,10.211c-5.249,2.664-21.043,12.877-25.513,12.682C308.878,455.498,291.01,472.596,291.01,472.596
z"/>
<path id="path562" fill="#CCCCCC" d="M284.292,517.738c0,0-26.838-4.237,2.825-7.063c0,0,31.782-3.531,38.844-12.713
c0,0,24.013-16.244,28.956-16.95c4.944-0.706,57.913-13.419,58.619-17.656c0.707-4.236,10.595-4.236,13.419-2.824
c2.825,1.413,1.413,3.53-3.531,4.943c-4.943,1.412-60.031,30.369-71.332,32.487c-11.3,2.119-31.781,15.538-40.256,17.656
C303.36,517.738,284.292,517.738,284.292,517.738z"/>
<path id="path566" d="M318.757,504.676c0,0-15.153-1.464,0.033-2.909c0,0,15.566-6.046,19.183-10.748c0,0,12.296-8.316,14.826-8.678
c2.531-0.362,27.18-6.872,27.542-9.04c0.362-2.17,60.51-24.384,68.314-18.751c5.14,3.709-12.343,0.748-29.354,8.535
c-2.393,1.095-62.164,26.85-67.95,27.934c-5.785,1.087-16.271,7.956-20.611,9.04C326.402,501.145,318.757,504.676,318.757,504.676z"
/>
<path id="path570" d="M304.773,508.557c0,0,9.181-0.706,7.063,2.119c-2.119,2.825-6.357,1.412-6.357,1.412L304.773,508.557z"/>
<path id="path574" d="M292.061,511.382c0,0,9.181-0.706,7.063,2.119c-2.119,2.825-6.356,1.412-6.356,1.412L292.061,511.382z"/>
<path id="path578" d="M273.698,514.207c0,0,9.181-0.706,7.063,2.119c-2.119,2.824-6.356,1.412-6.356,1.412L273.698,514.207z"/>
<path id="path582" d="M260.279,515.619c0,0,9.181-0.706,7.063,2.119c-2.118,2.825-6.356,1.412-6.356,1.412L260.279,515.619z"/>
<path id="path586" d="M328.079,445.7c0,0,7.77,0,5.649,2.825c-2.119,2.824-7.769,2.117-7.769,2.117L328.079,445.7z"/>
<path id="path590" d="M310.423,455.588c0,0,11.487-3.78,7.063,2.118c-2.118,2.825-6.356,1.413-6.356,1.413L310.423,455.588z"/>
<path id="path594" d="M290.648,464.063c0,0,9.181-0.705,7.063,2.119c-2.118,2.825-6.356,1.412-6.356,1.412L290.648,464.063z"/>
<path id="path598" d="M277.229,474.656c0,0,9.181-0.706,7.063,2.119c-2.118,2.824-6.356,1.411-6.356,1.411L277.229,474.656z"/>
<path id="path602" d="M265.223,483.132c0,0,9.181-0.706,7.063,2.118c-2.119,2.825-6.356,1.413-6.356,1.413L265.223,483.132z"/>
<path id="path606" d="M334.228,494.427c0,0,12.221-0.938,9.4,2.819c-2.82,3.761-8.461,1.881-8.461,1.881L334.228,494.427z"/>
<path id="path610" d="M352.59,485.951c0,0,12.221-0.939,9.4,2.82c-2.819,3.761-8.461,1.88-8.461,1.88L352.59,485.951z"/>
<path id="path614" d="M371.659,478.183c0,0,12.22-0.938,9.399,2.819c-2.819,3.761-8.461,1.881-8.461,1.881L371.659,478.183z"/>
<path id="path618" d="M390.021,469.708c0,0,12.221-0.939,9.399,2.819c-2.819,3.761-8.461,1.88-8.461,1.88L390.021,469.708z"/>
<path id="path622" d="M341.29,437.926c0,0,12.22-0.938,9.4,2.82c-2.82,3.761-9.874,3.293-9.874,3.293L341.29,437.926z"/>
<path id="path626" d="M358.946,432.276c0,0,12.22-0.939,9.399,2.818c-2.818,3.762-10.58,3.293-10.58,3.293L358.946,432.276z"/>
<path id="path630" d="M318.898,502.907c0,0,9.181-0.706,7.063,2.118c-2.119,2.824-6.355,1.413-6.355,1.413L318.898,502.907z"/>
<path id="path634" fill="#992600" d="M189.653,327.753c0,0-7.769,15.538-8.475,21.188c0,0,1.413-15.538,3.531-19.069
C186.828,326.341,189.653,327.753,189.653,327.753z"/>
<path id="path638" fill="#992600" d="M157.165,352.472c0,0-5.65,25.425-4.944,30.369c0,0-2.119-20.481-1.412-22.6
C151.515,358.123,157.165,352.472,157.165,352.472z"/>
<path id="path642" fill="#CCCCCC" d="M193.891,220.755l-0.353,5.65l-3.885,0.354c0,0,25.072,22.247,26.132,35.666
C215.785,262.425,217.197,247.946,193.891,220.755z"/>
<path id="path646" d="M200.925,222.989c-0.761-0.734-0.374-2.05-1.095-2.509c-1.428-0.911,2.292-1.012,1.889-2.276
c-0.676-2.129-0.346-2.167-0.562-4.419c-0.101-1.056,0.938-3.775,1.618-4.552c2.553-2.917,0.215-8.094,3.111-10.833
c0.537-0.51,1.201-1.485,1.704-2.223c1.164-1.7,3.254-2.562,4.931-4.024c0.562-0.487,0.207-1.948,1.211-1.785
c1.261,0.203,3.452-0.026,3.373,1.458c-0.2,3.743-2.546,6.78-4.806,9.725c0.796,1.243-0.013,2.364-0.514,3.348
c-2.357,4.626-2.023,9.642-2.331,14.657c-0.009,0.15-0.551,0.288-0.537,0.381c0.623,4.123,1.654,8.005,3.207,11.941
c0.646,1.642,1.478,3.222,1.743,4.859c0.196,1.211,0.378,2.682-0.343,3.927c3.593,5.103,1.282,9.783,3.346,16.018
c0.365,1.104,3.353,4.483,2.535,4.199c-4.437-1.538-4.635-2.241-4.947-3.57c-0.258-1.1-0.84-3.531-1.259-4.594
c-0.113-0.29-0.415-3.616-0.553-3.832c-2.671-4.206-0.274-3.895-2.692-8.059c-2.521-1.201-4.227-3.15-6.21-5.202
c-0.35-0.36,1.668-1.638,1.349-2.014c-1.928-2.276-3.964-3.63-3.371-6.267C201.997,226.126,202.238,224.26,200.925,222.989z"/>
<path id="path650" d="M194.597,226.052c0,0,0.707,12.006,4.944,14.832c4.238,2.825,2.119,1.413-3.531-0.706
c-5.65-2.119-3.531-3.531-3.531-3.531s-4.944,0.706-0.706,4.237c4.237,3.531,10.594,7.769,7.769,7.769s-16.244-7.063-16.244-12.006
c0-4.944-1.766-12.183-1.766-12.183s1.942-1.413,10.417-1.236C191.948,223.228,194.42,224.463,194.597,226.052z"/>
<path id="path654" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M193.184,258.894c0,0-15.043-4.928-47.672,1.059
c0,0,15.946-3.669,49.085,0.353C212.783,262.513,193.184,258.894,193.184,258.894z"/>
<path id="path658" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M196.889,258.768c0,0-14.56-6.211-47.586-3.067
c0,0,16.205-2.276,48.871,4.596C216.103,264.068,196.889,258.768,196.889,258.768z"/>
<path id="path662" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M200.045,258.932c0,0-14.058-7.276-47.226-6.596
c0,0,16.329-1.066,48.395,8.217C218.811,265.647,200.045,258.932,200.045,258.932z"/>
<path id="path666" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M202.288,259.326c0,0-12.049-7.604-41.842-9.543
c0,0,14.724,0.3,42.764,11.086C218.599,266.789,202.288,259.326,202.288,259.326z"/>
<path id="path670" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M405.838,277.894c0,0-1.642,1.137-1.264-0.948
c0.38-2.085,50.185-25.339,56.564-24.897C461.14,252.048,407.732,275.365,405.838,277.894z"/>
<path id="path674" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M399.846,279.021c0,0-1.547,1.263-1.333-0.846
c0.214-2.108,48.04-29.202,54.436-29.262C452.947,248.914,401.537,276.354,399.846,279.021z"/>
<path id="path678" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M394.044,281.449c0,0-1.462,1.363-1.388-0.755
c0.074-2.117,35.063-29.479,52.389-32.788C445.045,247.906,413.21,262.255,394.044,281.449z"/>
<path id="path682" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M388.966,284.739c0,0-1.314,1.226-1.248-0.68
c0.066-1.907,31.557-26.532,47.147-29.509C434.865,254.55,406.216,267.464,388.966,284.739z"/>
<path id="path686" fill="#CCCCCC" d="M333.023,545.988c0,0-26.838-4.237,2.824-7.063c0,0,31.781-3.531,38.845-12.712
c0,0,24.013-16.244,28.956-16.95c4.943-0.707,33.899-7.063,34.606-11.301c0.706-4.237,11.3-8.475,14.125-7.063
c2.825,1.413,2.825,17.655-2.119,19.068c-4.942,1.412-38.138,14.125-49.438,16.244c-11.301,2.118-31.782,15.537-40.257,17.656
C352.092,545.988,333.023,545.988,333.023,545.988z"/>
<path id="path690" d="M461.915,479.953c0,0-5.297,2.825-7.416,7.416c0,0-11.3,18.716-36.372,24.366c0,0-40.609,15.891-54.382,19.422
c0,0-23.659,8.828-36.727,7.416c0,0-12.358,0.353-1.411,3.178c0,0,35.666-3.531,41.669-6.709c0,0,27.544-9.182,32.841-13.772
c5.297-4.59,37.432-13.419,41.315-16.949C445.317,500.789,462.621,485.957,461.915,479.953z"/>
<path id="path694" d="M358.24,535.589c0,0,9.231-0.398,7.195,2.336c-2.034,2.737-6.356,1.193-6.356,1.193L358.24,535.589z"/>
<path id="path698" d="M345.523,537.977c0,0,9.23-0.398,7.196,2.336c-2.036,2.736-6.357,1.195-6.357,1.195L345.523,537.977z"/>
<path id="path702" d="M327.11,540.18c0,0,9.231-0.399,7.195,2.336c-2.034,2.735-6.356,1.193-6.356,1.193L327.11,540.18z"/>
<path id="path706" d="M313.631,541.141c0,0,9.232-0.398,7.197,2.336c-2.036,2.736-6.358,1.193-6.358,1.193L313.631,541.141z"/>
<path id="path710" d="M387.432,522.526c0,0,12.289-0.531,9.578,3.108c-2.708,3.642-8.463,1.59-8.463,1.59L387.432,522.526z"/>
<path id="path714" d="M405.645,514.714c0,0,10.521-5.828,9.578,3.109c-0.477,4.513-8.463,1.589-8.463,1.589L405.645,514.714z"/>
<path id="path718" d="M421.768,509.745c0,0,12.642-6.534,9.579,3.108c-1.374,4.326-8.465,1.59-8.465,1.59L421.768,509.745z"/>
<path id="path722" d="M438.566,501.226c0,0,7.695-8.652,9.578,3.109c0.717,4.481-8.464,1.59-8.464,1.59L438.566,501.226z"/>
<path id="path726" d="M372.28,530.444c0,0,9.23-0.401,7.196,2.336c-2.035,2.733-6.359,1.192-6.359,1.192L372.28,530.444z"/>
<path id="path730" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M435.138,316.105c0,0-1.282,1.174-1.284-0.717
c0-1.889,30.871-25.309,46.484-27.752C480.338,287.636,451.913,299.517,435.138,316.105z"/>
<path id="path734" d="M440.374,428.748c0,0,38.847,39.553,55.09,45.908c0,0,16.244,19.774,9.183,65.683
c0,0-5.65,13.419-11.301-23.307c0,0,5.649-44.494-14.125-16.244c0,0-14.834-17.479-3.533-16.95c0,0,5.651,3.531,6.357,0.706
c0.707-2.825-13.42-26.838-43.789-52.265C407.887,406.854,440.374,428.748,440.374,428.748z"/>
<path id="path738" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M337.261,497.257c0,0-0.354-3.178,2.825-1.766
c3.178,1.412,169.503,12.358,225.298,54.734C565.384,550.227,485.576,509.264,337.261,497.257z"/>
<path id="path742" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M355.623,489.488c0,0-0.354-3.18,2.825-1.767
c3.179,1.412,244.367-0.354,286.036,56.854C644.484,544.576,605.641,500.082,355.623,489.488z"/>
<path id="path746" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M376.104,482.426c0,0-0.353-3.179,2.825-1.766
c3.18,1.412,309.343-21.541,351.013,35.666C729.941,516.326,712.991,471.125,376.104,482.426z"/>
<path id="path750" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M393.762,473.95c0,0-0.354-3.178,2.824-1.767
c3.179,1.413,218.941-66.742,260.611-9.533C657.197,462.65,633.537,419.214,393.762,473.95z"/>
<path id="path754" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M291.354,514.207c0,0-0.353-3.178,2.825-1.766
c3.178,1.412,34.606,5.297,38.138,73.804C332.317,586.245,319.604,512.088,291.354,514.207z"/>
<path id="path758" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M275.816,517.032c0,0-0.353-3.18,2.825-1.767
c3.178,1.412,28.25-6.71,23.306,61.797C301.948,577.063,304.066,514.913,275.816,517.032z"/>
<path id="path762" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M261.691,517.738c0,0-0.354-3.179,2.825-1.767
c3.179,1.412,30.369,2.473,8.475,42.022C272.991,557.995,289.941,515.619,261.691,517.738z"/>
<path id="path766" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M345.252,439.457c0,0-0.784,3.529,1.951,1.381
c28.37-22.292,85.65-126.292,183.971-136.239C531.174,304.599,463.536,283.217,345.252,439.457z"/>
<path id="path770" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M365.027,436.278c0,0-2.406-2.106,0.892-3.21
c3.298-1.104,201.831-129.115,271.194-115.05C637.113,318.018,589.252,304.758,365.027,436.278z"/>
<path id="path774" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M328.229,447.053c0,0-0.897,2.823,2.122,1.101
c15.848-9.04,22.229-110.054,99.171-112.271C429.521,335.882,372.297,309.903,328.229,447.053z"/>
<path id="path778" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M293.053,466.521c0,0-1.902,2.271,1.546,1.821
c18.091-2.352,55.884-75.222,134.348-66.254C428.947,402.089,372.507,376.759,293.053,466.521z"/>
<path id="path782" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M312.895,455.704c0,0-1.432,2.594,1.868,1.49
c17.303-5.78,40.403-84.549,119.13-90.813C433.893,366.382,373.639,352.357,312.895,455.704z"/>
<path id="path786" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M280.623,475.559c0,0-1.542,1.841,1.252,1.478
c14.653-1.905,45.265-60.929,108.822-53.665C390.696,423.37,344.979,402.854,280.623,475.559z"/>
<path id="path790" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M267.206,485.992c0,0-1.775,1.845,1.035,1.637
c7.359-0.546,61.455-58.951,94.063-31.58C362.303,456.049,341.089,422.99,267.206,485.992z"/>
<path id="path794" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M389.974,429.627c0,0-2.12-2.392,1.291-3.071
c3.411-0.679,216.529-102.579,283.56-79.862C674.823,346.693,629.021,327.494,389.974,429.627z"/>
<path id="path798" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M330.904,543.164c0,0-0.354-3.179,2.824-1.768
c3.179,1.413,30.369,2.474,8.476,42.022C342.204,583.42,359.154,541.045,330.904,543.164z"/>
<path id="path802" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M349.268,540.339c0,0-0.354-3.179,2.824-1.766
c3.18,1.412,34.607,5.297,38.14,73.804C390.23,612.377,377.518,538.22,349.268,540.339z"/>
<path id="path806" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M361.273,537.514c0,0-0.354-3.179,2.824-1.766
c3.179,1.412,46.613,7.416,88.282,64.622C452.381,600.37,389.523,535.395,361.273,537.514z"/>
<path id="path810" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M374.736,533.931c0,0-0.771-3.104,2.564-2.125
c3.337,0.979,39.416-2.375,106.684,57.969C483.984,589.773,402.455,528.076,374.736,533.931z"/>
<path id="path814" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M393.1,526.162c0,0-0.771-3.104,2.565-2.126
c3.337,0.979,64.841,8.926,156.119,70.681C551.784,594.717,420.818,520.308,393.1,526.162z"/>
<path id="path818" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M321.723,505.732c0,0-0.353-3.18,2.825-1.767
c3.179,1.412,97.464,6.003,151.14,53.322C475.688,557.289,414.064,513.545,321.723,505.732z"/>
<path id="path822" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M304.066,512.795c0,0-0.353-3.179,2.825-1.766
c3.179,1.412,46.613,7.415,88.282,64.622C395.174,575.651,332.317,510.676,304.066,512.795z"/>
<path id="path826" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M412.306,518.021c0,0-0.997-3.037,2.403-2.308
s65.321,4.147,160.88,59.049C575.589,574.764,438.462,514.036,412.306,518.021z"/>
<path id="path830" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M427.138,513.785c0,0-0.998-3.039,2.402-2.309
c3.401,0.729,65.322,4.147,160.88,59.049C590.42,570.525,454.354,509.092,427.138,513.785z"/>
<path id="path834" fill="#FFFFFF" stroke="#000000" stroke-width="0.1" d="M444.088,504.957c0,0-0.998-3.039,2.402-2.308
c3.399,0.729,79.447,8.385,237.863,68.936C684.354,571.585,471.303,500.264,444.088,504.957z"/>
<path id="path838" d="M247.566,517.032c0,0,9.182-0.706,7.063,2.118s-6.356,1.412-6.356,1.412L247.566,517.032z"/>
<path id="path842" d="M301.948,541.751c0,0,9.181-0.706,7.063,2.119c-2.119,2.825-6.356,1.412-6.356,1.412L301.948,541.751z"/>
<path id="path846" d="M286.41,541.045c0,0,9.182-0.706,7.063,2.119c-2.119,2.824-6.356,1.412-6.356,1.412L286.41,541.045z"/>
<path id="path850" d="M118.022,520.177c0,0,8.908,2.336,5.98,4.313c-2.926,1.978-6.469-0.745-6.469-0.745L118.022,520.177z"/>
<path id="path854" d="M121.554,503.227c0,0,8.908,2.336,5.98,4.313c-2.926,1.978-6.469-0.745-6.469-0.745L121.554,503.227z"/>
<path id="path858" d="M108.841,495.458c0,0,8.908,2.336,5.98,4.312c-2.925,1.979-6.469-0.744-6.469-0.744L108.841,495.458z"/>
<path id="path862" fill="#CCCCCC" d="M249.685,627.914c0,0-2.825,0-9.888,3.531c-3.531,0-23.307,6.355-33.194,24.013
C206.603,655.458,228.497,638.508,249.685,627.914z"/>
<path id="path866" fill="#CCCCCC" d="M404.56,791.494c0.249,0.456,0.348,1.197,0.862,1.228c1.161,0.07,3.339,0.603,3.118-0.521
c-1.497-7.604-3.041-16.319-10.338-19.51c-1.129-0.493-3.675,0.235-3.806,1.797c-0.225,2.69-0.432,5.072,0.114,7.661
c0.529,2.509,4.34,2.525,5.959,0.083C402.123,785.184,402.886,788.438,404.56,791.494z"/>
<path id="path870" fill="#CCCCCC" d="M385,799.854c1.321,2.494,1.097,5.776,3.595,6.771c1.308,0.519,4.573-1.202,3.835-3.099
c-1.416-3.64-2.101-7.594-4.554-10.79c-0.353-0.463,0.071-1.403-0.212-1.982c-1.048-2.154-3.07-3.452-5.556-2.871
c-1.97,3.891,0.058,7.648,2.744,10.666C385.094,798.816,384.801,799.48,385,799.854z"/>
<path id="path874" fill="#CCCCCC" d="M315.077,790.689c-0.19-0.666-0.258-1.483,0.033-2.052c0.938-1.822,2.338-3.805,1.742-5.608
c-0.613-1.864-2.585-1.543-3.731-0.538c-2.004,1.755-2.091,4.979-3.312,7.379c-0.347,0.682-0.256,1.692-1.034,2.383
c-0.838,0.744-1.613,3.435-1.444,4.442c0.094,0.553-0.229,18.047,0.163,17.583c1.093-1.295,6.478-18.481,6.6-20.058
C314.194,792.932,315.487,792.11,315.077,790.689z"/>
<path id="path878" fill="#CCCCCC" d="M269.81,778.697c4.651-4.413,9.577-9.642,8.796-16.195c-0.205-1.723-3.339-0.792-3.669,0.701
c-1.416,6.4-5.016,11.099-9.55,15.322c-3.877,3.613-7.165,14.814-7.58,15.713C264.334,784.958,268.319,780.109,269.81,778.697z"/>
<path id="path882" fill="#CCCCCC" d="M245.843,768.167c0.923-0.653,0.39-1.521,0.773-2.106c1.683-2.574,3.979-4.773,4.012-7.844
c0.005-0.489-0.662-1.034-1.254-0.639c-0.489,0.324-1.093,0.555-1.284,0.784c-3.584,4.322-6.056,9.04-8.604,14.005
c-0.323,0.63-2.343,8.56-1.79,8.756c0.422,0.148,3.459-7.232,3.83-7.434C243.756,772.479,243.777,769.627,245.843,768.167z"/>
<path id="path886" fill="#CCCCCC" d="M275.387,802.674c0.784-1.534,3.567-3.656,3.367-5.226c-0.208-1.64,0.618-4.188-0.992-2.973
c-2.22,1.675-8.309,4.057-8.786,14.312C268.93,809.795,274.182,805.04,275.387,802.674z"/>
<path id="path890" fill="#CCCCCC" d="M300.889,772.344c0.706-1.179,1.956-0.344,2.767-0.809c1.144-0.656,2.223-1.643,2.738-2.788
c1.713-3.794,4.836-7.008,5.089-11.234c-2.634-2.479-3.831,1.121-4.944,2.825c-2.336-2.908-4.1,0.4-6.395,1.316
c-0.124,0.05-0.5-0.563-0.632-0.516c-2.078,0.776-3.279,2.687-5.041,4.064c-0.302,0.236-1.017-0.082-1.276,0.158
c-1.151,1.064-2.869,1.639-3.364,2.843c-1.959,4.78-7.504,8.479-10.835,21.795c0.672,1.604,7.966-11.728,8.826-12.959
c1.476-2.112,1.685,2.933,3.938,1.757c0.09-0.048,0.418,0.372,0.655,0.608c0.342-0.494,0.727-0.898,1.413-0.706
c0-0.706-0.237-1.688,0.118-1.969c2.184-1.726,2.036-3.61,3.413-5.801C298.166,772.324,300.039,771.055,300.889,772.344z"/>
<path id="path894" fill="#CCCCCC" d="M406.474,868.395c0,0,13.066-36.019,5.298-55.794c0,0,20.129,38.139,12.007,57.913
c0,0-0.706-18.361-7.77-27.189C416.009,843.323,408.946,865.923,406.474,868.395z"/>
<path id="path898" fill="#CCCCCC" d="M380.343,863.805c0,0,9.534-15.538-4.591-48.024c0,0-1.413,36.019-13.419,55.439
C362.333,871.22,387.405,835.554,380.343,863.805z"/>
<path id="path902" fill="#CCCCCC" d="M362.686,860.273c0,0-0.353-35.313,0.354-40.61c0,0-6.709,29.31-24.719,46.26
C338.32,865.923,363.745,844.735,362.686,860.273z"/>
<path id="path906" fill="#CCCCCC" d="M345.736,803.771c0,0,10.594,24.014-7.063,56.502c0,0,11.301-21.541,2.825-33.9
C341.498,826.373,346.089,820.369,345.736,803.771z"/>
<path id="path910" fill="#CCCCCC" d="M311.836,859.566c0,0-1.766-27.545,1.412-31.429c0,0,0.354-11.301-0.354-13.065
c0,0,7.063-10.946,7.416,2.119c0,0,2.473,13.771,7.416,21.894c0,0,6.356,9.535,6.003,20.835
C333.729,859.92,316.073,806.598,311.836,859.566z"/>
<path id="path914" fill="#CCCCCC" d="M305.479,810.835c0,0-11.653,19.069-14.831,52.616c0,0-2.472-10.947,4.237-36.372
C294.885,827.079,302.301,799.888,305.479,810.835z"/>
<path id="path918" fill="#CCCCCC" d="M266.988,845.795c0,0,8.828-9.535,11.3-18.363c0,0,6.356-27.896-4.943-12.712
c0,0,0.353,14.125-14.125,27.19C259.219,841.91,267.694,837.673,266.988,845.795z"/>
<path id="path922" fill="#CCCCCC" d="M256.748,836.967c0,0,6.003-30.723,7.416-32.135c0,0,3.178-6.003-1.766-0.354
c0,0-15.538,33.9-22.6,45.555C239.797,850.032,253.922,833.788,256.748,836.967z"/>
<path id="path926" fill="#CCCCCC" d="M246.507,807.657c0,0,20.481-39.552-18.01,6.003
C228.497,813.66,247.919,796.356,246.507,807.657z"/>
<path id="path930" fill="#CCCCCC" d="M219.316,781.879c0,0,8.475-33.193,13.065-32.842c0,0,14.479-15.891,2.825,2.825
c0,0-10.594,16.95-9.535,34.254C225.672,786.116,224.613,769.166,219.316,781.879z"/>
<path id="path934" fill="#CCCCCC" d="M802.508,761.748c0,0-21.188-17.656-25.602-23.836c0,0,23.836,32.664,23.836,45.023
C800.742,782.938,805.156,769.693,802.508,761.748z"/>
<path id="path938" fill="#CCCCCC" d="M812.219,722.904c0,0-37.078-26.484-43.259-39.728c0,0,46.79,52.086,46.79,60.031
C815.75,743.209,816.633,727.318,812.219,722.904z"/>
<path id="path942" fill="#CCCCCC" d="M842.234,450.995c0,0-21.188-14.125-23.836-10.594c0,0,18.539,11.477,22.952,26.483
C841.352,466.886,838.703,450.995,842.234,450.995z"/>
<path id="path946" fill="#CCCCCC" d="M857.242,593.13l-30.898-21.188c0,0,33.547,30.017,34.431,37.079L857.242,593.13z"/>
<path id="path950" stroke="#000000" d="M167.317,553.402l38.844,8.387"/>
<path id="path954" stroke="#000000" d="M256.041,839.438c0,0-0.883-6.181-16.773,12.358"/>
<path id="path958" stroke="#000000" d="M265.752,848.265c0,0,3.531-11.477-7.946-3.53"/>
<path id="path962" stroke="#000000" d="M361.097,863.271c0,0,2.648-19.422-17.655,3.531"/>
</svg>

After

Width:  |  Height:  |  Size: 84 KiB

View File

@@ -0,0 +1,20 @@
<svg x="0px" y="0px" width="500px" height="500px" viewbox="0 0 500 500">
<defs>
<filter id="blurry" x="0%" y="0%" height="100%" width="100%" primitiveUnits="userSpaceOnUse">
<feGaussianBlur x="50" y="50" width="400" height="400" stdDeviation="40" in="SourceGraphic" result="blurSquares"/>
<feComponentTransfer in="blurSquares" result="opaqueBlur">
<feFuncA type="linear" intercept="1"/>
</feComponentTransfer>
<feBlend mode="normal" in="opaqueBlur" in2="SourceGraphic"/>
</filter>
</defs>
<g id="squares" filter="url(#blurry)">
<rect x="10" y="10" height="235" width="235" fill="red" />
<rect x="255" y="10" height="235" width="235" fill="green" />
<rect x="10" y="255" height="235" width="235" fill="blue" />
<rect x="255" y="255" height="235" width="235" fill="yellow" />
</g>
<rect x="50" y="50" height="400" width="400" fill="rgb(255,255,255)" fill-opacity="0.8" />
</svg>

After

Width:  |  Height:  |  Size: 946 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"v":"5.7.4","fr":30,"ip":0,"op":60,"w":400,"h":400,"layers":[{"ty":4,"ef":[{"ty":21,"nm":"Fill","v":[{"ty":2,"nm":"Fill Mask","v":{"a":0,"k":[0]}},{"ty":0,"nm":"All Masks","v":{"a":0,"k":0}},{"ty":2,"nm":"Color","v":{"a":0,"k":[1,0,0,1]}},{"ty":0,"nm":"Opacity","v":{"a":0,"k":100}}]},{"ty":20,"nm":"Stroke","v":[{"ty":2,"nm":"Color","v":{"a":0,"k":[0,1,0,1]}},{"ty":0,"nm":"Stroke Width","v":{"a":0,"k":10}}]},{"ty":20,"nm":"Tint","v":[{"ty":2,"nm":"Map Black To","v":{"a":0,"k":[1,0,0,1]}},{"ty":2,"nm":"Map White To","v":{"a":0,"k":[0,0,1,1]}},{"ty":0,"nm":"Amount to Tint","v":{"a":0,"k":50}}]},{"ty":23,"nm":"Tritone","v":[{"ty":2,"nm":"Highlights","v":{"a":0,"k":[1,1,1,1]}},{"ty":2,"nm":"Midtones","v":{"a":0,"k":[0.5,0.5,0.5,1]}},{"ty":2,"nm":"Shadows","v":{"a":0,"k":[0,0,0,1]}}]}],"shapes":[{"ty":"rc","s":{"a":0,"k":[200,200]}},{"ty":"st","c":{"a":0,"k":[0,0,0,1]},"w":{"a":0,"k":5}}],"ip":0,"op":60,"ind":1,"nm":"Multiple Effects Layer"},{"ty":4,"nm":"Drop Shadow Effect","ip":0,"op":60,"ef":[{"ty":25,"nm":"Drop Shadow","np":8,"mn":"ADBE Drop Shadow","ix":1,"en":1,"ef":[{"ty":2,"nm":"Shadow Color","mn":"ADBE Drop Shadow-0001","ix":1,"v":{"a":0,"k":[0,0,0,1]}},{"ty":0,"nm":"Opacity","mn":"ADBE Drop Shadow-0002","ix":2,"v":{"a":0,"k":191.25}},{"ty":0,"nm":"Direction","mn":"ADBE Drop Shadow-0003","ix":3,"v":{"a":0,"k":135}},{"ty":0,"nm":"Distance","mn":"ADBE Drop Shadow-0004","ix":4,"v":{"a":0,"k":10}},{"ty":0,"nm":"Softness","mn":"ADBE Drop Shadow-0005","ix":5,"v":{"a":0,"k":20}}]}],"shapes":[{"ty":"rc","nm":"Rectangle","p":{"a":0,"k":[200,200]},"s":{"a":0,"k":[150,150]},"r":{"a":0,"k":10}},{"ty":"fl","nm":"Fill","c":{"a":0,"k":[1,0.5,0,1]},"o":{"a":0,"k":100}}],"ind":2},{"ty":4,"nm":"Gaussian Blur Effect","ip":0,"op":60,"ef":[{"ty":29,"nm":"Gaussian Blur","np":6,"mn":"ADBE Gaussian Blur 2","ix":1,"en":1,"ef":[{"ty":0,"nm":"Blurriness","mn":"ADBE Gaussian Blur 2-0001","ix":1,"v":{"a":1,"k":[{"t":0,"s":[0],"e":[20]},{"t":30,"s":[20],"e":[0]},{"t":60,"s":[0]}]}},{"ty":7,"nm":"Blur Dimensions","mn":"ADBE Gaussian Blur 2-0002","ix":2,"v":{"a":0,"k":1}},{"ty":7,"nm":"Repeat Edge Pixels","mn":"ADBE Gaussian Blur 2-0003","ix":3,"v":{"a":0,"k":0}}]}],"shapes":[{"ty":"el","nm":"Ellipse","p":{"a":0,"k":[200,200]},"s":{"a":0,"k":[120,120]}},{"ty":"fl","nm":"Fill","c":{"a":0,"k":[0,0.8,1,1]},"o":{"a":0,"k":100}}],"ind":3},{"ty":4,"nm":"Custom Effect with Various Properties","ip":0,"op":60,"ef":[{"ty":5,"nm":"Custom Effect","np":10,"mn":"Custom","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider Control","mn":"Slider","ix":1,"v":{"a":0,"k":50}},{"ty":1,"nm":"Angle Control","mn":"Angle","ix":2,"v":{"a":0,"k":45}},{"ty":2,"nm":"Color Control","mn":"Color","ix":3,"v":{"a":0,"k":[1,0,0,1]}},{"ty":3,"nm":"Point Control","mn":"Point","ix":4,"v":{"a":0,"k":[100,100]}},{"ty":4,"nm":"Checkbox Control","mn":"Checkbox","ix":5,"v":{"a":0,"k":1}},{"ty":7,"nm":"Dropdown Control","mn":"Dropdown","ix":6,"v":{"a":0,"k":2}},{"ty":10,"nm":"Effect Layer","mn":"EffectLayer","ix":7,"v":{"a":0,"k":0}}]}],"shapes":[{"ty":"sr","nm":"Star","p":{"a":0,"k":[200,200]},"or":{"a":0,"k":80},"ir":{"a":0,"k":40},"pt":{"a":0,"k":5},"sy":1},{"ty":"fl","nm":"Fill","c":{"a":0,"k":[1,1,0,1]},"o":{"a":0,"k":100}}],"ind":4}],"nm":"Layer Effects Tests","assets":[]}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- = Copyright 2000 World Wide Web Consortium, (Massachusetts -->
<!-- = Institute of Technology, Institut National de Recherche en -->
<!-- = Informatique et en Automatique, Keio University). All Rights -->
<!-- = Reserved. See http://www.w3.org/Consortium/Legal/. -->
<!-- ===================================================================== -->
<!-- ===================================================================== -->
<!-- -->
<!-- paths-data-08-t.svg -->
<!-- -->
<!-- Test that viewer has the basic capability to handle the <path> -->
<!-- element and data (d) attribute in combination with the moveto, -->
<!-- and closepath commands - M, Z, m, and z. -->
<!-- --><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
<SVGTestCase xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" reviewed="YES" reviewer="CN" owner="SH" desc="tests support for moveto and closepath path commands" status="accepted" version="$Revision: 1.2 $" testname="$RCSfile: paths-data-08-t.svg,v $">
<!--nav data here-->
<OperatorScript>
<Paragraph>
Verify the basic capability to handle the 'path' element, and its data attribute (d)
in combination with the straight-line path commands.
Two pairs of concentric equilateral triangles are drawn using
M and Z. No L commands are used in this test as they are implied after
an M or Z command. The shapes are identical, with one stroked and
one filled. The fill-mode default of "even-odd" means that
the inner triangle is hollow.
</Paragraph>
<Paragraph>
The rendered picture should match the reference image exactly, except for possible
variations in the labelling text (per CSS2 rules).
</Paragraph>
<Paragraph>
The test uses the 'path' element, as well as basic fill (solid primary colors),
stroke (black 1-pixel lines), font-family (Arial) and font-size properties.
</Paragraph>
</OperatorScript>
</SVGTestCase>
<title id="test-title">paths-data-08-t</title>
<desc id="test-desc">Test that viewer has the basic capability to handle the &lt;path&gt; element and data (d) attribute in combination with the moveto and closepath commands - M and Z.</desc>
<!--======================================================================-->
<!--Content of Test Case follows... =====================-->
<!--======================================================================-->
<g id="test-body-content">
<!-- ====================================================================== -->
<!-- First Group of Triangles using M & Z commands ======================== -->
<!-- ====================================================================== -->
<text font-family="Arial" font-size="24" x="75" y="34">Lines drawn with commands:</text>
<text font-family="Arial" font-size="24" x="180" y="64">M and Z</text>
<g transform="scale(1.8)">
<path id="Triangle_stroke_MZ" fill="none" stroke="#000000" d=" M 62.00000 56.00000 113.96152 146.00000 10.03848 146.00000 62.00000 56.00000 Z M 62.00000 71.00000 100.97114 138.50000 23.02886 138.50000 62.00000 71.00000 Z "/>
<rect x="60.00000" y="54.00000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="111.96152" y="144.00000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="8.03848" y="144.00000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="60.00000" y="69.00000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="98.97114" y="136.50000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="21.02886" y="136.50000" width="4" height="4" fill="#00C000" stroke="none"/>
<text font-family="Arial" font-size="12" x="42" y="162">stroked</text>
<path id="Triangle_fill_MZ" fill="#FF0000" stroke="none" fill-rule="evenodd" d=" M 177.00000 56.00000 228.96152 146.00000 125.03848 146.00000 177.00000 56.00000 Z M 177.00000 71.00000 215.97114 138.50000 138.02886 138.50000 177.00000 71.00000 Z "/>
<rect x="175.00000" y="54.00000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="226.96152" y="144.00000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="123.03848" y="144.00000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="175.00000" y="69.00000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="213.97114" y="136.50000" width="4" height="4" fill="#00C000" stroke="none"/>
<rect x="136.02886" y="136.50000" width="4" height="4" fill="#00C000" stroke="none"/>
<text font-family="Arial" font-size="12" x="162" y="162">filled</text>
</g>
</g>
<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.2 $</text>
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
</svg>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,124 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!ELEMENT_NAME>
<?xml version="1.0" encoding="UTF-8"?>
<!--comment-->
<svg width="1000" height="1000" xmlns="http://www.w3.org/2000/svg">
<g color="green">
<symbol id="sym1" width="10" height="10" viewBox="0 0 2 2" preserveAspectRatio="none">
<use href="#rect2" fill="currentColor"/>
</symbol>
<symbol id="sym2" width="10" height="15" viewBox="0 0 2 2" preserveAspectRatio="xMidYMax slice">
<circle cx="1" cy="1" r="1" id="myCircle" fill="url(#grad1_1)" stroke="currentColor"/>
</symbol>
<symbol id="sym3" width="10" height="15" viewBox="0 0 2 2" preserveAspectRatio="xMaxYMin meet">
<use href="#myLine"/>
</symbol>
<symbol id="sym4" width="10" height="15" viewBox="0 0 2 2" preserveAspectRatio="xMaxYMax meet">
<ellipse cx="0" cy="1" rx="1" ry="0.5" fill="url(#grad2)" stroke="url(#grad2_1)" stroke-width="0.05" id="myElipse" clip-path="url(#myClip)" opacity="0.5" transform="translate(0,0)"/>
</symbol>
</g>
<symbol id="sym5" overflow="visible" viewBox="0 0 1000 1000" width="2" height="2" preserveAspectRatio="xMidYMid meet">
<circle cx="800" cy="10" r="10"/>
<circle cx="820" cy="10" r="10"/>
</symbol>
<symbol id="sym6" class="mySymbol" transform="scale(2)" viewBox="0 0 1000 1000" width="2" height="2" preserveAspectRatio="xMidYMin slice">
<circle cx="840" cy="10" r="10"/>
<circle cx="860" cy="10" r="10"/>
</symbol>
<g class="myFill">
<circle cx="880" cy="10" r="10"/>
<circle cx="900" cy="10" r="10"/>
</g>
<rect x="2" y="2" width="10" height="10" style="fill: red" class="mineStyle2"/>
<rect x="110" y="0"/>
<use href="#myPolygon" fill="currentColor"/>
<use href="#myPolyline"/>
<use href="&nbsp;#sym1&nbsp;" x="5" y="5em" transform="scale(2)" style="opacity:0.8;fill-opacity:1e12;stroke-opacity:1.175494351e-38;stroke-width:.e" />
<use href="#sym2" x="5" y="5" transform="scale(10) " style="opacity:0.7;fill-opacity:inf;stroke-opacity:infinity;stroke-width:nan" />
<use href="#sym3" x="+5" y="5" transform="scale(10)" style="opacity:0.9;" />
<use href="#sym4" x="5" y="5" transform = "scale(1e+1) rotate(-10)" style="opacity:1.0" />
<use href="#sym5"/>
<use href="#sym6" transform="scale(0.5)"/>
<g fill="url(#grad1)" mask="url(#vg)" transform="rotate(0 0 0) translate(2 0) scale(1.0)" style="color:blue">
<path d="M420.82388 380H588.68467V422.805317H420.82388Z" stroke-width="0" stroke-dasharray="100%" stroke-dashoffset="0" />
<path d="m420.82403 440.7101v63.94623l167.86079 25.5782V440.7101Z" style="opacity:0.9;color:black;fill:red;fill-opacity:0.5;fill-rule:evenodd;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.9;stroke:black;display:inline;paint-order: stroke; " transform="matrix(1,0,0,1,20,0)" id="path1"/>
<use href="#path1" transform="translate(10,10)"/>
<path d="M420.82403 523.07258V673.47362L588.68482 612.59701V548.13942Z"/>
<g stroke-width="3.864492">
<path d="M256.61221 100.51736H752.8963V386.99554H256.61221Z"/>
<path d="M201.875 100.51736H238.366478V386.99554H201.875Z"/>
<path d="M771.14203 100.51736H807.633508V386.99554H771.14203Z"/>
</g>
</g>
<g fill="url(#grad2)" clip-path="url(#clip)">
<path d="M420.82403 691.37851 588.68482 630.5019 589 834H421Z"/>
<path d="m420.82403 852.52249h167.86079v28.64782H420.82403v-28.64782 0 0"/>
<path d="m439.06977 879.17031c0 0-14.90282 8.49429-18.24574 15.8161-4.3792 9.59153 0 31.63185 0 31.63185h167.86079c0 0 4.3792-22.04032 0-31.63185-3.34292-7.32181-18.24574-15.8161-18.24574-15.8161z"/>
</g>
<g>
<g></g>
<polyline fill="none" stroke-width="10"
points="0,0 1000,0 1000,1000 0,1000" />
<line x1="0" y1="0" x2="1000" y2="0" stroke="" id="lineId"/>
<path d="M647.5 800C692.5 786 730 786 775 800S857.5 814 902.5 800" stroke="#222f35" stroke="url(#grad1)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="white"/>
<path d="M647.5 800Q711.25 786 775 800T902.5 800" stroke="#222f35" stroke="url(#grad2)" stroke-width="2" stroke-dasharray="20 10" stroke-linecap="square" stroke-linejoin="bevel" fill="white"/>
</g>
<image href="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTAgNTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBmaWxsPSIjMjIyZjM1IiBjeD0iNTAlIiBjeT0iNTAlIiByPSI1MCUiLz48L3N2Zz4=" height="50" width="50" x="650" y="875" />
<image href="data:image/svg+xml;utf8,%3Csvg viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle fill='%23222f35' cx='50%25' cy='50%25' r='50%25'/%3E%3C/svg%3E" height="50" width="50" x="725" y="875" />
<image href="data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2050%2050%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle%20fill%3D%22%23222f35%22%20cx%3D%2250%25%22%20cy%3D%2250%25%22%20r%3D%2250%25%22%2F%3E%3C%2Fsvg%3E" height="50" width="50" x="800" y="875" id="img" transform="translate(-17,10)"/>
<use href="#img" transform="translate(57,-10)"/>
<path d="M885.834 872.086A45 45 0 1 1 885.834 919.815L909.698 895.95Z" fill="#223" opacity="0.6" stroke-linejoin="miter" stroke-linecap="round" id="man"/>
<use href="#man" x="0" y="0" />
<defs>
<linearGradient id="grad1" gradientTransform="translate(0, 0)" x1="0" y1="0" x2="100%" y2="0">
<stop offset="0%" stop-color="#50585d"/>
<stop offset="100%" stop-color="#252f35"/>
</linearGradient>
<linearGradient href="#grad1" id="grad1_1" gradientUnits="userSpaceOnUse"/>
<radialGradient id="grad2" cx="100%" cy="0.25" fx="0.5" fy="0.5" r="1.5" gradientTransform="scale(0.2)" spreadMethod="reflect">
<stop offset="0%" stop-color="#252f35" stop-opacity="80%"/>
<stop offset="100%" style="stop-color:#000000;stop-opacity:1;"/>
</radialGradient>
<radialGradient href="#grad2" id="grad2_1" gradientUnits="userSpaceOnUse"/>
<mask id="vg" mask-type="alpha" maskContentUnits="userSpaceOnUse">
<circle style="stroke: black;" cx="50%" cy="50%" r="50%" />
<rect fill="white" x="0" y="0" width="100%" height="100%" />
<path fill="black" d="m280 140h15v55l8 10 8-10v-55h15v60l-23 25-23-25z"/>
<path fill="rgb(0,0,0)" d="m335 140v80h45v-50h-25v10h10v30h-15v-57h18v-13z"/>
</mask>
<clipPath id="clip">
<ellipse cx="50%" cy="50%" rx="50%" ry="50%" />
<rect x="0%" y="0%" width="1000" height="1000" />
<polygon points="0,0 1000,0 1000,1000 0,1000" />
</clipPath>
<clipPath id="myClip">
<rect x="0%" y="0%" width="1" height="1"/>
</clipPath>
<rect x="0" y="0" width="10" height="10" id="rect2" class="mineStyle1"/>
<polygon points="0,100 50,25 50,75 100,0" fill="black" id="myPolygon"/>
<polyline points="0,100 50,25 50,75 100,0" transform="translate(0, 0)" id="myPolyline"/>
<style>
<![CDATA[
rect.mineStyle2 {
fill: grey; stroke: #000000; stroke-width: 4; transform: scale(2); clip-path: url(#clip)
}
rect {
fill: #00cc00; stroke: #99ff33; stroke-width: 5;
}
symbol {
fill: #ff00ff;
}
symbol.mySymbol {
fill: #ffff00;
}
.myFill {
fill: #0000ff;
}
rect.mineStyle1 {
fill: blue; stroke: #3399ff; fill-opacity: 0.7; stroke-opacity: 0.9; fill-rule: evenodd; stroke-width: 1; stroke-dasharray: 1; opacity: 0.9; stroke-linejoin: miter; stroke-linecap: butt; transform: scale(1); clip-path: url(#none); mask: url(#none);
}
]]>
</style>
<line x1="0" y1="0" x2="100" y2="150" stroke="black" id="myLine" stroke-width="0.1"/>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@@ -0,0 +1 @@
{"v":"5.7.4","fr":30,"ip":0,"op":150,"w":500,"h":500,"nm":"Transform Tests (Skew & 3D)","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer with Skew","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[100,100,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":1,"k":[{"t":0,"s":[0],"e":[30]},{"t":30,"s":[30],"e":[0]},{"t":60,"s":[0]}]},"sa":{"a":0,"k":0}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":0,"k":[80,80]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0},"nm":"Rectangle"},{"ty":"fl","c":{"a":0,"k":[1,0,0,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill"}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":1,"ind":2,"ty":4,"nm":"3D Rotated Shape","sr":1,"ks":{"o":{"a":0,"k":100},"rx":{"a":1,"k":[{"t":0,"s":[0],"e":[45]},{"t":30,"s":[45],"e":[0]},{"t":60,"s":[0]}]},"ry":{"a":1,"k":[{"t":0,"s":[0],"e":[30]},{"t":60,"s":[30]}]},"rz":{"a":0,"k":0},"p":{"a":0,"k":[100,100,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":0,"k":[60,60]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0},"nm":"Rectangle"},{"ty":"fl","c":{"a":0,"k":[0.2,0.5,0.9,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill"}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Skew Test Shape","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[100,100,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]},"sk":{"a":1,"k":[{"t":0,"s":[0],"e":[30]},{"t":15,"s":[30],"e":[60]},{"t":30,"s":[60],"e":[30]},{"t":45,"s":[30],"e":[45]},{"t":60,"s":[45],"e":[30]},{"t":75,"s":[30],"e":[0]},{"t":90,"s":[0]}]},"sa":{"a":1,"k":[{"t":0,"s":[0],"e":[0]},{"t":15,"s":[0],"e":[45]},{"t":30,"s":[45],"e":[90]},{"t":45,"s":[90],"e":[-90]},{"t":60,"s":[-90],"e":[180]},{"t":75,"s":[180],"e":[0]},{"t":90,"s":[0]}]}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":0,"k":[80,80]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":10},"nm":"Rectangle"},{"ty":"fl","c":{"a":0,"k":[0.2,0.6,0.9,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill"}],"ip":0,"op":90,"st":0,"bm":0},{"ty":4,"nm":"Rectangle 2","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[304.5,352.2827]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"rc","bm":0,"hd":false,"nm":"Rectangle Path 2","d":1,"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0},"s":{"a":0,"k":[133,98.56532879503823]}},{"ty":"fl","bm":0,"hd":false,"nm":"Fill","c":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[1,0.5569,0.9255],"t":0},{"s":[0.3176,0.0157,0.2667],"t":23}],"sid":"sdf"},"r":1,"o":{"a":0,"k":100}}],"ind":4},{"ty":4,"nm":"Rectangle 1","sr":1,"st":0,"op":150,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[133,210.8551]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"shapes":[{"ty":"rc","bm":0,"hd":false,"nm":"Rectangle Path 1","d":1,"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0},"s":{"a":0,"k":[58.00000000000001,65.71021919669215]}},{"ty":"fl","bm":0,"hd":false,"nm":"Fill","c":{"a":0,"k":[1,0.5569,0.9255],"sid":"sdf"},"r":1,"o":{"a":0,"k":100}}],"ind":5}]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"v":"5.7.4","fr":30,"ip":0,"op":60,"w":400,"h":400,"nm":"MultipleModifiersCombination","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"RoundedCorner+TrimPath+Repeater","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":1,"k":[{"t":0,"s":[0],"e":[360]},{"t":60,"s":[360]}]},"p":{"a":0,"k":[200,200,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"rc","d":1,"s":{"a":0,"k":[30,30]},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":3},"nm":"SmallRectangle"},{"ty":"rd","r":{"a":1,"k":[{"t":0,"s":[0],"e":[15]},{"t":30,"s":[15],"e":[0]},{"t":60,"s":[0]}]},"nm":"RoundCornersAnimated"},{"ty":"tm","s":{"a":1,"k":[{"t":0,"s":[0],"e":[50]},{"t":60,"s":[50]}]},"e":{"a":0,"k":[100]},"o":{"a":0,"k":[0]},"m":1,"nm":"TrimPath"},{"ty":"st","c":{"a":0,"k":[0.2,0.6,1,1]},"o":{"a":0,"k":100},"w":{"a":0,"k":4},"lc":2,"lj":2,"ml":4,"nm":"Stroke"},{"ty":"rp","c":{"a":0,"k":6},"o":{"a":0,"k":0},"m":1,"tr":{"ty":"tr","p":{"a":0,"k":[50,0]},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"r":{"a":0,"k":60},"so":{"a":0,"k":100},"eo":{"a":0,"k":100}},"nm":"Repeater"}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"OffsetPath+RoundedCorner","sr":1,"ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":0,"k":[200,100,0]},"a":{"a":0,"k":[0,0,0]},"s":{"a":0,"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"el","d":1,"s":{"a":0,"k":[60,60]},"p":{"a":0,"k":[0,0]},"nm":"Ellipse"},{"ty":"rd","r":{"a":0,"k":20},"nm":"RoundCorners"},{"ty":"op","a":{"a":1,"k":[{"t":0,"s":[-5],"e":[5]},{"t":30,"s":[5],"e":[-5]},{"t":60,"s":[-5]}]},"lj":1,"ml":4,"nm":"OffsetPathAnimated"},{"ty":"fl","c":{"a":0,"k":[1,0.3,0.3,1]},"o":{"a":0,"k":100},"r":1,"nm":"Fill"}],"ip":0,"op":60,"st":0,"bm":0}]}

View File

@@ -0,0 +1,88 @@
/*
* Copyright (c) 2022 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
TEST_CASE("Accessor Creation", "[tvgAccessor]")
{
auto accessor = unique_ptr<Accessor>(Accessor::gen());
REQUIRE(accessor);
auto accessor2 = unique_ptr<Accessor>(Accessor::gen());
REQUIRE(accessor2);
}
#ifdef THORVG_SVG_LOADER_SUPPORT
TEST_CASE("Set", "[tvgAccessor]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
auto picture = Picture::gen();
REQUIRE(picture);
REQUIRE(picture->load(TEST_DIR"/test0.svg") == Result::Success);
auto accessor = unique_ptr<Accessor>(Accessor::gen());
REQUIRE(accessor);
//Case 1
REQUIRE(accessor->set(picture, nullptr, nullptr) == Result::InvalidArguments);
//Case 2
Shape* ret = nullptr;
auto f = [](const tvg::Paint* paint, void* data) -> bool
{
if (paint->type() == Type::Shape) {
auto shape = (tvg::Shape*) paint;
uint8_t r, g, b;
shape->fill(&r, &g, &b);
if (r == 255 && g == 255 && b == 255) {
shape->fill(0, 0, 255);
shape->id = Accessor::id("TestAccessor");
*static_cast<Shape**>(data) = shape;
return false;
}
}
return true;
};
REQUIRE(accessor->set(picture, f, &ret) == Result::Success);
REQUIRE((ret && ret->id == Accessor::id("TestAccessor")));
Picture::rel(picture);
}
REQUIRE(Initializer::term() == Result::Success);
}
#endif

View File

@@ -0,0 +1,189 @@
/*
* Copyright (c) 2023 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include <fstream>
#include <cstring>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
TEST_CASE("Animation Basic", "[tvgAnimation]")
{
auto animation = unique_ptr<Animation>(Animation::gen());
REQUIRE(animation);
auto picture = animation->picture();
REQUIRE(picture->type() == Type::Picture);
//Negative cases
REQUIRE(animation->frame(0.0f) == Result::InsufficientCondition);
REQUIRE(animation->curFrame() == 0.0f);
REQUIRE(animation->totalFrame() == 0.0f);
REQUIRE(animation->duration() == 0.0f);
}
#ifdef THORVG_LOTTIE_LOADER_SUPPORT
TEST_CASE("Lottie Raw Data", "[tvgAnimation]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto animation = unique_ptr<Animation>(Animation::gen());
REQUIRE(animation);
auto picture = animation->picture();
ifstream file(TEST_DIR"/test.lot");
REQUIRE(file.is_open());
file.seekg(0, std::ios::end);
auto size = file.tellg();
file.seekg(0, std::ios::beg);
auto data = (char*)malloc(size);
file.seekg(0, ios::beg);
file.read(data, size);
file.close();
REQUIRE(picture->load(data, size, "lot", "", true) == Result::Success);
free(data);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Lottie Frames Counting", "[tvgAnimation]")
{
REQUIRE(Initializer::init(1) == Result::Success);
{
auto animation = unique_ptr<Animation>(Animation::gen());
REQUIRE(animation);
auto picture = animation->picture();
REQUIRE(picture->load(TEST_DIR"/invalid.lot") == Result::InvalidArguments);
REQUIRE(picture->load(TEST_DIR"/test.lot") == Result::Success);
REQUIRE(animation->totalFrame() == Approx(120).margin(0.001f));
REQUIRE(animation->curFrame() == 0);
REQUIRE(animation->duration() == Approx(4.004).margin(0.001f)); //120/29.97
REQUIRE(animation->frame(20.0f) == Result::Success);
for (float i = 1.0f; i < 120.0f; i += 10.0f) {
REQUIRE(animation->frame(i) == Result::Success);
REQUIRE(animation->curFrame() == i);
}
REQUIRE(animation->frame(102.8f) == Result::Success);
REQUIRE(animation->curFrame() == Approx(102.8f));
REQUIRE(animation->frame(13.32f) == Result::Success);
REQUIRE(animation->curFrame() == Approx(13.32f));
REQUIRE(animation->frame(27.1232f) == Result::Success);
REQUIRE(animation->curFrame() == Approx(27.1232f));
REQUIRE(animation->frame(87.0004f) == Result::Success);
REQUIRE(animation->curFrame() == Approx(87.0004f));
REQUIRE(animation->frame(88.0005f) == Result::Success);
REQUIRE(animation->curFrame() == Approx(88.0005f));
REQUIRE(animation->frame(89.0009f) == Result::Success);
REQUIRE(animation->curFrame() == Approx(89.0009f));
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Lottie Accessor", "[tvgAnimation]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto animation = unique_ptr<Animation>(Animation::gen());
REQUIRE(animation);
auto picture = animation->picture();
REQUIRE(picture->load(TEST_DIR"/test2.lot") == Result::Success);
//specify the lottie scene first
REQUIRE(animation->frame(20.0f) == Result::Success);
//Find specific paint nodes
REQUIRE(!picture->paint(Accessor::id("test1")));
REQUIRE(!picture->paint(Accessor::id("abcd")));
REQUIRE(!picture->paint(Accessor::id("abcd")));
REQUIRE(picture->paint(Accessor::id("bar")));
REQUIRE(picture->paint(Accessor::id("pad1")));
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Lottie Segment", "[tvgAnimation]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto animation = unique_ptr<Animation>(Animation::gen());
REQUIRE(animation);
auto picture = animation->picture();
float begin, end;
//Segment by range before loaded
REQUIRE(animation->segment(0, 0.5) == Result::InsufficientCondition);
//Get current segment before loaded
REQUIRE(animation->segment(&begin, &end) == Result::InsufficientCondition);
//Animation load
REQUIRE(picture->load(TEST_DIR"/segment.lot") == Result::Success);
//Get current segment before segment
REQUIRE(animation->segment(&begin, &end) == Result::Success);
REQUIRE(begin == 0.0f);
REQUIRE(end == animation->totalFrame());
//Segment by range
REQUIRE(animation->segment(0.25, 0.5) == Result::Success);
//Get current segment
REQUIRE(animation->segment(&begin, &end) == Result::Success);
REQUIRE(begin == 0.25f);
REQUIRE(end == 0.5f);
//Get only segment begin
REQUIRE(animation->segment(&begin) == Result::Success);
REQUIRE(begin == 0.25f);
//Get only segment end
REQUIRE(animation->segment(nullptr, &end) == Result::Success);
REQUIRE(end == 0.5f);
//Segment by invalid range
REQUIRE(animation->segment(1.5, -0.5) == Result::InvalidArguments);
}
REQUIRE(Initializer::term() == Result::Success);
}
#endif

View File

@@ -0,0 +1,292 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
TEST_CASE("Filling Creation", "[tvgFill]")
{
auto linear = unique_ptr<LinearGradient>(LinearGradient::gen());
REQUIRE(linear);
REQUIRE(linear->type() == Type::LinearGradient);
auto radial = unique_ptr<RadialGradient>(RadialGradient::gen());
REQUIRE(radial);
REQUIRE(radial->type() == Type::RadialGradient);
}
TEST_CASE("Common Filling", "[tvgFill]")
{
auto fill = LinearGradient::gen();
REQUIRE(fill);
//Options
REQUIRE(fill->spread() == FillSpread::Pad);
REQUIRE(fill->spread(FillSpread::Pad) == Result::Success);
REQUIRE(fill->spread(FillSpread::Reflect) == Result::Success);
REQUIRE(fill->spread(FillSpread::Repeat) == Result::Success);
REQUIRE(fill->spread() == FillSpread::Repeat);
//ColorStops
const Fill::ColorStop* cs = nullptr;
REQUIRE(fill->colorStops(nullptr) == 0);
REQUIRE(fill->colorStops(&cs) == 0);
REQUIRE(cs == nullptr);
Fill::ColorStop cs2[4] = {
{0.0f, 0, 0, 0, 0},
{0.2f, 50, 25, 50, 25},
{0.5f, 100, 100, 100, 125},
{1.0f, 255, 255, 255, 255}
};
REQUIRE(fill->colorStops(nullptr, 4) == Result::InvalidArguments);
REQUIRE(fill->colorStops(cs2, 0) == Result::InvalidArguments);
REQUIRE(fill->colorStops(cs2, 4) == Result::Success);
REQUIRE(fill->colorStops(&cs) == 4);
for (int i = 0; i < 4; ++i) {
REQUIRE(cs[i].offset == cs2[i].offset);
REQUIRE(cs[i].r == cs2[i].r);
REQUIRE(cs[i].g == cs2[i].g);
REQUIRE(cs[i].b == cs2[i].b);
};
//Reset ColorStop
REQUIRE(fill->colorStops(nullptr, 0) == Result::Success);
REQUIRE(fill->colorStops(&cs) == 0);
//Set to Shape
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->fill(fill) == Result::Success);
REQUIRE(shape->fill() == fill);
Paint::rel(shape);
}
TEST_CASE("Fill Transformation", "[tvgFill]")
{
auto fill = unique_ptr<LinearGradient>(LinearGradient::gen());
REQUIRE(fill);
//no transformation
auto mGet = fill->transform();
REQUIRE(mGet.e11 == Approx(1.0f).margin(0.000001));
REQUIRE(mGet.e12 == Approx(0.0f).margin(0.000001));
REQUIRE(mGet.e13 == Approx(0.0f).margin(0.000001));
REQUIRE(mGet.e21 == Approx(0.0f).margin(0.000001));
REQUIRE(mGet.e22 == Approx(1.0f).margin(0.000001));
REQUIRE(mGet.e23 == Approx(0.0f).margin(0.000001));
REQUIRE(mGet.e31 == Approx(0.0f).margin(0.000001));
REQUIRE(mGet.e32 == Approx(0.0f).margin(0.000001));
REQUIRE(mGet.e33 == Approx(1.0f).margin(0.000001));
auto mSet = Matrix{1.1f, 2.2f, 3.3f, 4.4f, 5.5f, 6.6f, -7.7f, -8.8f, -9.9f};
REQUIRE(fill->transform(mSet) == Result::Success);
//transformation was set
mGet = fill->transform();
REQUIRE(mGet.e11 == Approx(mSet.e11).margin(0.000001));
REQUIRE(mGet.e12 == Approx(mSet.e12).margin(0.000001));
REQUIRE(mGet.e13 == Approx(mSet.e13).margin(0.000001));
REQUIRE(mGet.e21 == Approx(mSet.e21).margin(0.000001));
REQUIRE(mGet.e22 == Approx(mSet.e22).margin(0.000001));
REQUIRE(mGet.e23 == Approx(mSet.e23).margin(0.000001));
REQUIRE(mGet.e31 == Approx(mSet.e31).margin(0.000001));
REQUIRE(mGet.e32 == Approx(mSet.e32).margin(0.000001));
REQUIRE(mGet.e33 == Approx(mSet.e33).margin(0.000001));
}
TEST_CASE("Linear Filling", "[tvgFill]")
{
auto fill = unique_ptr<LinearGradient>(LinearGradient::gen());
REQUIRE(fill);
float x1, y1, x2, y2;
REQUIRE(fill->linear(nullptr, nullptr, nullptr, nullptr) == Result::Success);
REQUIRE(fill->linear(0, 0, 0, 0) == Result::Success);
REQUIRE(fill->linear(&x1, nullptr, &x2, nullptr) == Result::Success);
REQUIRE(x1 == 0.0f);
REQUIRE(x2 == 0.0f);
REQUIRE(fill->linear(-1.0f, -1.0f, 100.0f, 100.0f) == Result::Success);
REQUIRE(fill->linear(&x1, &y1, &x2, &y2) == Result::Success);
REQUIRE(x1 == -1.0f);
REQUIRE(y1 == -1.0f);
REQUIRE(x2 == 100.0f);
REQUIRE(y2 == 100.0f);
}
TEST_CASE("Radial Filling", "[tvgFill]")
{
auto fill = unique_ptr<RadialGradient>(RadialGradient::gen());
REQUIRE(fill);
float cx, cy, r, fx, fy, fr;
REQUIRE(fill->radial(0, 0, -1, 0, 0, 0) == Result::InvalidArguments);
REQUIRE(fill->radial(0, 0, 0, 0, 0, -1) == Result::InvalidArguments);
REQUIRE(fill->radial(nullptr, nullptr, nullptr) == Result::Success);
REQUIRE(fill->radial(100, 120, 50, 10, 20, 5) == Result::Success);
REQUIRE(fill->radial(&cx, nullptr, &r) == Result::Success);
REQUIRE(cx == 100.0f);
REQUIRE(r == 50.0f);
REQUIRE(fill->radial(nullptr, &cy, nullptr, &fx, &fy, &fr) == Result::Success);
REQUIRE(cy == 120);
REQUIRE(fx == 10);
REQUIRE(fy == 20);
REQUIRE(fr == 5);
REQUIRE(fill->radial(0, 0, 0, 0, 0, 0) == Result::Success);
REQUIRE(fill->radial(&cx, &cy, &r, &fx, &fy, &fr) == Result::Success);
REQUIRE(cx == 0.0f);
REQUIRE(cy == 0.0f);
REQUIRE(r == 0.0f);
REQUIRE(fx == 0.0f);
REQUIRE(fy == 0.0f);
REQUIRE(fr == 0.0f);
}
TEST_CASE("Linear Filling Duplication", "[tvgFill]")
{
auto fill = unique_ptr<LinearGradient>(LinearGradient::gen());
REQUIRE(fill);
//Setup
Fill::ColorStop cs[4] = {
{0.0f, 0, 0, 0, 0},
{0.2f, 50, 25, 50, 25},
{0.5f, 100, 100, 100, 125},
{1.0f, 255, 255, 255, 255}
};
REQUIRE(fill->colorStops(cs, 4) == Result::Success);
REQUIRE(fill->spread(FillSpread::Reflect) == Result::Success);
REQUIRE(fill->linear(-10.0f, 10.0f, 100.0f, 120.0f) == Result::Success);
auto m = Matrix{1.1f, 2.2f, 3.3f, 4.4f, 5.5f, 6.6f, -7.7f, -8.8f, -9.9f};
REQUIRE(fill->transform(m) == Result::Success);
//Duplication
auto dup = unique_ptr<LinearGradient>((LinearGradient*)fill->duplicate());
REQUIRE(dup);
REQUIRE(dup->spread() == FillSpread::Reflect);
float x1, y1, x2, y2;
REQUIRE(fill->linear(&x1, &y1, &x2, &y2) == Result::Success);
REQUIRE(x1 == -10.0f);
REQUIRE(y1 == 10.0f);
REQUIRE(x2 == 100.0f);
REQUIRE(y2 == 120.0f);
const Fill::ColorStop* cs2 = nullptr;
REQUIRE(fill->colorStops(&cs2) == 4);
for (int i = 0; i < 4; ++i) {
REQUIRE(cs[i].offset == cs2[i].offset);
REQUIRE(cs[i].r == cs2[i].r);
REQUIRE(cs[i].g == cs2[i].g);
REQUIRE(cs[i].b == cs2[i].b);
}
auto mDup = dup->transform();
REQUIRE(mDup.e11 == Approx(m.e11).margin(0.000001));
REQUIRE(mDup.e12 == Approx(m.e12).margin(0.000001));
REQUIRE(mDup.e13 == Approx(m.e13).margin(0.000001));
REQUIRE(mDup.e21 == Approx(m.e21).margin(0.000001));
REQUIRE(mDup.e22 == Approx(m.e22).margin(0.000001));
REQUIRE(mDup.e23 == Approx(m.e23).margin(0.000001));
REQUIRE(mDup.e31 == Approx(m.e31).margin(0.000001));
REQUIRE(mDup.e32 == Approx(m.e32).margin(0.000001));
REQUIRE(mDup.e33 == Approx(m.e33).margin(0.000001));
}
TEST_CASE("Radial Filling Duplication", "[tvgFill]")
{
auto fill = unique_ptr<RadialGradient>(RadialGradient::gen());
REQUIRE(fill);
//Setup
Fill::ColorStop cs[4] = {
{0.0f, 0, 0, 0, 0},
{0.2f, 50, 25, 50, 25},
{0.5f, 100, 100, 100, 125},
{1.0f, 255, 255, 255, 255}
};
REQUIRE(fill->colorStops(cs, 4) == Result::Success);
REQUIRE(fill->spread(FillSpread::Reflect) == Result::Success);
REQUIRE(fill->radial(100.0f, 120.0f, 50.0f, 10.0f, 20.0f, 5.0f) == Result::Success);
auto m = Matrix{1.1f, 2.2f, 3.3f, 4.4f, 5.5f, 6.6f, -7.7f, -8.8f, -9.9f};
REQUIRE(fill->transform(m) == Result::Success);
//Duplication
auto dup = unique_ptr<RadialGradient>((RadialGradient*)fill->duplicate());
REQUIRE(dup);
REQUIRE(dup->spread() == FillSpread::Reflect);
float cx, cy, r, fx, fy, fr;
REQUIRE(dup->radial(&cx, &cy, &r, &fx, &fy, &fr) == Result::Success);
REQUIRE(cx == 100.0f);
REQUIRE(cy == 120.0f);
REQUIRE(r == 50.0f);
REQUIRE(fx == 10.0f);
REQUIRE(fy == 20.0f);
REQUIRE(fr == 5.0f);
const Fill::ColorStop* cs2 = nullptr;
REQUIRE(fill->colorStops(&cs2) == 4);
for (int i = 0; i < 4; ++i) {
REQUIRE(cs[i].offset == cs2[i].offset);
REQUIRE(cs[i].r == cs2[i].r);
REQUIRE(cs[i].g == cs2[i].g);
REQUIRE(cs[i].b == cs2[i].b);
}
auto mDup = dup->transform();
REQUIRE(mDup.e11 == Approx(m.e11).margin(0.000001));
REQUIRE(mDup.e12 == Approx(m.e12).margin(0.000001));
REQUIRE(mDup.e13 == Approx(m.e13).margin(0.000001));
REQUIRE(mDup.e21 == Approx(m.e21).margin(0.000001));
REQUIRE(mDup.e22 == Approx(m.e22).margin(0.000001));
REQUIRE(mDup.e23 == Approx(m.e23).margin(0.000001));
REQUIRE(mDup.e31 == Approx(m.e31).margin(0.000001));
REQUIRE(mDup.e32 == Approx(m.e32).margin(0.000001));
REQUIRE(mDup.e33 == Approx(m.e33).margin(0.000001));
}

View File

@@ -0,0 +1,61 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include "config.h"
#include "catch.hpp"
#include <cstring>
using namespace tvg;
TEST_CASE("Basic initialization", "[tvgInitializer]")
{
REQUIRE(Initializer::init() == Result::Success);
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Multiple initialization", "[tvgInitializer]")
{
REQUIRE(Initializer::init() == Result::Success);
REQUIRE(Initializer::init() == Result::Success);
REQUIRE(Initializer::term() == Result::Success);
REQUIRE(Initializer::init() == Result::Success);
REQUIRE(Initializer::term() == Result::Success);
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Version", "[tvgInitializer]")
{
REQUIRE(strcmp(Initializer::version(nullptr, nullptr, nullptr), THORVG_VERSION_STRING) == 0);
uint32_t major, minor, micro;
REQUIRE(strcmp(Initializer::version(&major, &minor, &micro), THORVG_VERSION_STRING) == 0);
char curVersion[10];
snprintf(curVersion, sizeof(curVersion), "%d.%d.%d", major, minor, micro);
REQUIRE(strcmp(curVersion, THORVG_VERSION_STRING) == 0);
}
TEST_CASE("Negative termination", "[tvgInitializer]")
{
REQUIRE(Initializer::term() == Result::InsufficientCondition);
}

View File

@@ -0,0 +1,304 @@
/*
* Copyright (c) 2024 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include "config.h"
#include <thorvg.h>
#ifdef THORVG_LOTTIE_LOADER_SUPPORT
#include <thorvg_lottie.h>
#endif
#include <fstream>
#include <cstring>
#include "catch.hpp"
using namespace tvg;
using namespace std;
#ifdef THORVG_LOTTIE_LOADER_SUPPORT
TEST_CASE("Lottie Coverages", "[tvgLottie]")
{
REQUIRE(Initializer::init() == Result::Success);
{
#define TEST_CNT 10
const char* names[TEST_CNT] = {
"test3.lot",
"test4.lot",
"test5.lot",
"test6.lot",
"test7.lot",
"test8.lot",
"test9.lot",
"test10.lot",
"test11.lot",
"test12.lot"
};
auto animation = unique_ptr<Animation>(Animation::gen());
REQUIRE(animation);
auto picture = animation->picture();
for (int i = 0; i < TEST_CNT; ++i) {
char buf[100];
snprintf(buf, sizeof(buf), TEST_DIR"/%s", names[i]);
REQUIRE(picture->load(buf) == Result::Success);
REQUIRE(animation->frame(0.0f) == Result::InsufficientCondition);
REQUIRE(animation->frame(animation->totalFrame() * 0.5f) == Result::Success);
REQUIRE(animation->frame(animation->totalFrame()) == Result::Success);
}
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Lottie Slot", "[tvgLottie]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto animation = unique_ptr<LottieAnimation>(LottieAnimation::gen());
REQUIRE(animation);
auto picture = animation->picture();
//Slot Test 1
const char* slotJson = R"({"gradient_fill":{"p":{"p":2,"k":{"a":0,"k":[0,0.1,0.1,0.2,1,1,0.1,0.2,0.1,1]}}}})";
//Negative: slot generation before loaded
REQUIRE(animation->gen(slotJson) == 0);
REQUIRE(picture->load(TEST_DIR"/slot.lot") == Result::Success);
auto id = animation->gen(slotJson);
REQUIRE(id > 0);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->apply(id) == Result::Success);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->apply(id) == Result::Success);
REQUIRE(animation->gen("") == 0);
REQUIRE(animation->del(id) == Result::Success);
//Slot Test 2
const char* slotJson2 = R"({"lottie-icon-outline":{"p":{"a":0,"k":[1,1,0]}},"lottie-icon-solid":{"p":{"a":0,"k":[0,0,1]}}})";
auto id2 = animation->gen(slotJson2);
REQUIRE(id2 > 0);
REQUIRE(animation->apply(id2) == Result::Success);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->apply(id2) == Result::Success);
REQUIRE(animation->del(id2) == Result::Success);
//Slot Test 3 (Transform)
const char* positionSlot = R"({"transform_id":{"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"s":[100,100],"t":0},{"s":[200,300],"t":100}]}}})";
auto id3 = animation->gen(positionSlot);
REQUIRE(id3 > 0);
REQUIRE(animation->apply(id3) == Result::Success);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->del(id3) == Result::Success);
const char* scaleSlot = R"({"transform_id":{"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"s":[0,0],"t":0},{"s":[100,100],"t":100}]}}})";
auto id4 = animation->gen(scaleSlot);
REQUIRE(id4 > 0);
REQUIRE(animation->apply(id4) == Result::Success);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->del(id4) == Result::Success);
const char* rotationSlot = R"({"transform_id":{"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"s":[0],"t":0},{"s":[180],"t":100}]}}})";
auto id5 = animation->gen(rotationSlot);
REQUIRE(id5 > 0);
REQUIRE(animation->apply(id5) == Result::Success);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->del(id5) == Result::Success);
const char* opacitySlot = R"({"transform_id":{"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"s":[0],"t":0},{"s":[100],"t":100}]}}})";
auto id6 = animation->gen(opacitySlot);
REQUIRE(id6 > 0);
REQUIRE(animation->apply(id6) == Result::Success);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->del(id6) == Result::Success);
//Slot Test 4: Expression
const char* expressionSlot = R"({"rect_rotation":{"p":{"x":"var $bm_rt = time * 360;"}},"rect_scale":{"p":{"x":"var $bm_rt = [];$bm_rt[0] = value[0] + Math.cos(2 * Math.PI * time) * 100;$bm_rt[1] = value[1];"}},"rect_position":{"p":{"x":"var $bm_rt = [];$bm_rt[0] = value[0] + Math.cos(2 * Math.PI * time) * 100;$bm_rt[1] = value[1];"}}})";
auto id7 = animation->gen(expressionSlot);
REQUIRE(id7 > 0);
REQUIRE(animation->apply(id7) == Result::Success);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->del(id7) == Result::Success);
//Slot Test 5: Text
const char* textSlot = R"({"text_doc":{"p":{"k":[{"s":{"f":"Ubuntu Light Italic","t":"ThorVG!","j":0,"s":48,"fc":[1,1,1]},"t":0}]}}})";
auto id8 = animation->gen(textSlot);
REQUIRE(id8 > 0);
REQUIRE(animation->apply(id8) == Result::Success);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->del(id8) == Result::Success);
//Slot Test 6: Image
const char* imageSlot = R"({"path_img":{"p":{"id":"image_0","w":200,"h":300,"u":"images/","p":"logo.png","e":0}}})";
auto id9 = animation->gen(imageSlot);
REQUIRE(id9 > 0);
REQUIRE(animation->apply(id9) == Result::Success);
REQUIRE(animation->apply(0) == Result::Success);
REQUIRE(animation->del(id9) == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Lottie Marker", "[tvgLottie]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto animation = unique_ptr<LottieAnimation>(LottieAnimation::gen());
REQUIRE(animation);
auto picture = animation->picture();
//Set marker name before loaded
REQUIRE(animation->segment("sectionC") == Result::InsufficientCondition);
//Animation load
REQUIRE(picture->load(TEST_DIR"/segment.lot") == Result::Success);
//Set marker
REQUIRE(animation->segment("sectionA") == Result::Success);
//Set marker by invalid name
REQUIRE(animation->segment("") == Result::InvalidArguments);
//Get marker count
REQUIRE(animation->markersCnt() == 3);
//Get marker name by index
REQUIRE(!strcmp(animation->marker(1), "sectionB"));
//Get marker name by invalid index
REQUIRE(animation->marker(-1) == nullptr);
REQUIRE(animation->segment(nullptr) == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Lottie Tween", "[tvgLottie]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto animation = unique_ptr<LottieAnimation>(LottieAnimation::gen());
REQUIRE(animation);
auto picture = animation->picture();
REQUIRE(animation->tween(0.0f, 10.0f, 0.5f) == Result::InsufficientCondition);
REQUIRE(picture->load(TEST_DIR"/test.lot") == Result::Success);
//Set initial frame to avoid frame difference being too small
REQUIRE(animation->frame(5.0f) == Result::Success);
//Tween between frames with different progress values
REQUIRE(animation->tween(0.0f, 10.0f, 0.5f) == Result::Success);
REQUIRE(animation->tween(10.0f, 20.0f, 0.0f) == Result::Success);
REQUIRE(animation->tween(20.0f, 30.0f, 1.0f) == Result::Success);
//Tween with different frame ranges
REQUIRE(animation->tween(10.0f, 50.0f, 0.25f) == Result::Success);
REQUIRE(animation->tween(50.0f, 100.0f, 0.75f) == Result::Success);
//Tween between distant frames
REQUIRE(animation->tween(0.0f, 100.0f, 0.5f) == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Lottie Quality", "[tvgLottie]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto animation = unique_ptr<LottieAnimation>(LottieAnimation::gen());
REQUIRE(animation);
auto picture = animation->picture();
REQUIRE(animation->quality(50) == Result::InsufficientCondition);
REQUIRE(picture->load(TEST_DIR"/test.lot") == Result::Success);
//Set quality with minimum value
REQUIRE(animation->quality(0) == Result::Success);
//Set quality with default value
REQUIRE(animation->quality(50) == Result::Success);
//Set quality with maximum value
REQUIRE(animation->quality(100) == Result::Success);
//Set quality with various values
REQUIRE(animation->quality(25) == Result::Success);
REQUIRE(animation->quality(75) == Result::Success);
//Set quality with invalid value (> 100)
REQUIRE(animation->quality(101) == Result::InvalidArguments);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Lottie Asset Resolver", "[tvgLottie]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto animation = unique_ptr<LottieAnimation>(LottieAnimation::gen());
REQUIRE(animation);
auto picture = animation->picture();
auto resolver = [](Paint* p, const char* src, void* data) -> bool {
if (p->type() == Type::Picture) {
string resolvedPath = string(TEST_DIR) + "/image/test.png";
auto ret = static_cast<Picture*>(p)->load(resolvedPath.c_str());
return (ret == Result::Success);
} else if (p->type() == Type::Text) {
string fontPath = string(TEST_DIR) + "/font/Arial.ttf";
if (Text::load(fontPath.c_str()) != Result::Success) return false;
auto ret = static_cast<Text*>(p)->font("Arial");
return (ret == Result::Success);
}
return false;
};
// Test unset resolver
REQUIRE(picture->resolver(resolver, nullptr) == Result::Success);
REQUIRE(picture->resolver(nullptr, nullptr) == Result::Success);
//Resolver Test (Image and Font)
REQUIRE(picture->resolver(resolver, nullptr) == Result::Success);
REQUIRE(picture->load(TEST_DIR"/resolver.json") == Result::Success);
REQUIRE(animation->frame(animation->totalFrame() * 0.5f) == Result::Success);
//Test that setting/unsetting resolver after load
REQUIRE(picture->resolver(resolver, nullptr) == Result::InsufficientCondition);
REQUIRE(picture->resolver(nullptr, nullptr) == Result::InsufficientCondition);
}
REQUIRE(Initializer::term() == Result::Success);
}
#endif

View File

@@ -0,0 +1,5 @@
// The only purpose of this file is to DEFINE the catch config so it can include main()
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include "catch.hpp"

View File

@@ -0,0 +1,430 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
TEST_CASE("Custom Transformation", "[tvgPaint]")
{
auto shape = Shape::gen();
REQUIRE(shape);
//Verify default transform
Matrix m1 = shape->transform();
REQUIRE(m1.e11 == Approx(1.0f).margin(0.000001));
REQUIRE(m1.e12 == Approx(0).margin(0.000001));
REQUIRE(m1.e13 == Approx(0).margin(0.000001));
REQUIRE(m1.e21 == Approx(0).margin(0.000001));
REQUIRE(m1.e22 == Approx(1.0f).margin(0.000001));
REQUIRE(m1.e23 == Approx(0).margin(0.000001));
REQUIRE(m1.e31 == Approx(0).margin(0.000001));
REQUIRE(m1.e32 == Approx(0).margin(0.000001));
REQUIRE(m1.e33 == Approx(1.0f).margin(0.000001));
//Custom transform
auto m2 = Matrix{1.0f, 2.0f, 3.0f, 4.0f, 0.0f, -4.0f, -3.0f, -2.0f, -1.0f};
REQUIRE(shape->transform(m2) == Result::Success);
auto m3 = shape->transform();
REQUIRE(m2.e11 == Approx(m3.e11).margin(0.000001));
REQUIRE(m2.e12 == Approx(m3.e12).margin(0.000001));
REQUIRE(m2.e13 == Approx(m3.e13).margin(0.000001));
REQUIRE(m2.e21 == Approx(m3.e21).margin(0.000001));
REQUIRE(m2.e22 == Approx(m3.e22).margin(0.000001));
REQUIRE(m2.e23 == Approx(m3.e23).margin(0.000001));
REQUIRE(m2.e31 == Approx(m3.e31).margin(0.000001));
REQUIRE(m2.e32 == Approx(m3.e32).margin(0.000001));
REQUIRE(m2.e33 == Approx(m3.e33).margin(0.000001));
//It's not allowed if the custom transform is applied.
REQUIRE(shape->translate(155.0f, -155.0f) == Result::InsufficientCondition);
REQUIRE(shape->scale(4.7f) == Result::InsufficientCondition);
REQUIRE(shape->rotate(45.0f) == Result::InsufficientCondition);
//Verify Transform is not modified
auto m4 = shape->transform();
REQUIRE(m2.e11 == Approx(m4.e11).margin(0.000001));
REQUIRE(m2.e12 == Approx(m4.e12).margin(0.000001));
REQUIRE(m2.e13 == Approx(m4.e13).margin(0.000001));
REQUIRE(m2.e21 == Approx(m4.e21).margin(0.000001));
REQUIRE(m2.e22 == Approx(m4.e22).margin(0.000001));
REQUIRE(m2.e23 == Approx(m4.e23).margin(0.000001));
REQUIRE(m2.e31 == Approx(m4.e31).margin(0.000001));
REQUIRE(m2.e32 == Approx(m4.e32).margin(0.000001));
REQUIRE(m2.e33 == Approx(m4.e33).margin(0.000001));
Paint::rel(shape);
}
TEST_CASE("Basic Transformation", "[tvgPaint]")
{
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->translate(155.0f, -155.0f) == Result::Success);
REQUIRE(shape->rotate(45.0f) == Result::Success);
REQUIRE(shape->scale(4.7f) == Result::Success);
auto m = shape->transform();
REQUIRE(m.e11 == Approx(3.323402f).margin(0.000001));
REQUIRE(m.e12 == Approx(-3.323401f).margin(0.000001));
REQUIRE(m.e13 == Approx(155.0f).margin(0.000001));
REQUIRE(m.e21 == Approx(3.323401f).margin(0.000001));
REQUIRE(m.e22 == Approx(3.323402f).margin(0.000001));
REQUIRE(m.e23 == Approx(-155.0f).margin(0.000001));
REQUIRE(m.e31 == Approx(0).margin(0.000001));
REQUIRE(m.e32 == Approx(0).margin(0.000001));
REQUIRE(m.e33 == Approx(1).margin(0.000001));
Paint::rel(shape);
}
TEST_CASE("Opacity", "[tvgPaint]")
{
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->opacity() == 255);
REQUIRE(shape->opacity(155) == Result::Success);
REQUIRE(shape->opacity() == 155);
REQUIRE(shape->opacity(-1) == Result::Success);
REQUIRE(shape->opacity() == 255);
REQUIRE(shape->opacity(0) == Result::Success);
REQUIRE(shape->opacity() == 0);
Paint::rel(shape);
}
TEST_CASE("Visibility", "[tvgPaint]")
{
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->visible() == true);
REQUIRE(shape->visible(false) == Result::Success);
REQUIRE(shape->visible() == false);
REQUIRE(shape->visible(false) == Result::Success);
REQUIRE(shape->visible() == false);
REQUIRE(shape->visible(true) == Result::Success);
REQUIRE(shape->visible() == true);
Paint::rel(shape);
}
TEST_CASE("Bounding Box", "[tvgPaint]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto buffer = unique_ptr<uint32_t[]>(new uint32_t[500*500]);
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
canvas->target(buffer.get(), 500, 500, 500, ColorSpace::ARGB8888);
auto shape = Shape::gen();
canvas->add(shape);
//Negative
float x = 0, y = 0, w = 0, h = 0;
REQUIRE(shape->bounds(&x, &y, &w, &h) == Result::InsufficientCondition);
//Case 1
REQUIRE(shape->appendRect(0.0f, 10.0f, 20.0f, 100.0f, 50.0f, 50.0f) == Result::Success);
REQUIRE(shape->translate(100.0f, 111.0f) == Result::Success);
canvas->update();
//Positive
REQUIRE(shape->bounds(&x, &y, &w, &h) == Result::Success);
REQUIRE(x == 100.0f);
REQUIRE(y == 121.0f);
REQUIRE(w == 20.0f);
REQUIRE(h == 100.0f);
Point pts[4];
REQUIRE(shape->bounds(pts) == Result::Success);
REQUIRE(pts[0].x == 100.0f);
REQUIRE(pts[3].x == 100.0f);
REQUIRE(pts[0].y == 121.0f);
REQUIRE(pts[1].y == 121.0f);
REQUIRE(pts[1].x == 120.0f);
REQUIRE(pts[2].x == 120.0f);
REQUIRE(pts[2].y == 221.0f);
REQUIRE(pts[3].y == 221.0f);
REQUIRE(canvas->sync() == Result::Success);
//Case 2
REQUIRE(shape->reset() == Result::Success);
REQUIRE(shape->moveTo(0.0f, 10.0f) == Result::Success);
REQUIRE(shape->lineTo(20.0f, 210.0f) == Result::Success);
auto identity = Matrix{1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f};
REQUIRE(shape->transform(identity) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(shape->bounds(&x, &y, &w, &h) == Result::Success);
REQUIRE(x == 0.0f);
REQUIRE(y == 10.0f);
REQUIRE(w == 20.0f);
REQUIRE(h == 200.0f);
REQUIRE(shape->bounds(pts) == Result::Success);
REQUIRE(pts[0].x == 0.0f);
REQUIRE(pts[3].x == 0.0f);
REQUIRE(pts[0].y == 10.0f);
REQUIRE(pts[1].y == 10.0f);
REQUIRE(pts[1].x == 20.0f);
REQUIRE(pts[2].x == 20.0f);
REQUIRE(pts[2].y == 210.0f);
REQUIRE(pts[3].y == 210.0f);
REQUIRE(canvas->sync() == Result::Success);
//Case3
REQUIRE(shape->reset() == Result::Success);
REQUIRE(shape->moveTo(10, 10) == Result::Success);
REQUIRE(shape->lineTo(190, 10) == Result::Success);
REQUIRE(shape->strokeWidth(12.0f) == Result::Success);
REQUIRE(shape->strokeFill(255, 0, 0, 255) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(shape->bounds(&x, &y, &w, &h) == Result::Success);
REQUIRE(x == 4.0f);
REQUIRE(y == 4.0f);
REQUIRE(h == 12.0f);
REQUIRE(w == 192.0f);
REQUIRE(shape->bounds(pts) == Result::Success);
REQUIRE(pts[0].x == 4.0f);
REQUIRE(pts[3].x == 4.0f);
REQUIRE(pts[0].y == 4.0f);
REQUIRE(pts[1].y == 4.0f);
REQUIRE(pts[1].x == 196.0f);
REQUIRE(pts[2].x == 196.0f);
REQUIRE(pts[2].y == 16.0f);
REQUIRE(pts[3].y == 16.0f);
#ifdef THORVG_TTF_LOADER_SUPPORT
//Text
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
auto text = Text::gen();
REQUIRE(canvas->add(text) == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
//Empty Size
REQUIRE(text->bounds(&x, &y, &w, &h) == Result::Success);
//Case 1
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(32) == Result::Success);
REQUIRE(text->text("TEST") == Result::Success);
REQUIRE(text->translate(100.0f, 111.0f) == Result::Success);
REQUIRE(text->bounds(&x, &y, &w, &h) == Result::Success);
REQUIRE(x == Approx(101.0f).margin(0.000001));
REQUIRE(y == Approx(118.5625f).margin(0.000001));
REQUIRE(w == Approx(107.1875f).margin(0.000001));
REQUIRE(h == Approx(31.58334f).margin(0.001f));
REQUIRE(canvas->update() == Result::Success);
REQUIRE(text->bounds(pts) == Result::Success);
REQUIRE(pts[0].x == Approx(101.0f).margin(0.000001));
REQUIRE(pts[3].x == Approx(101.0f).margin(0.000001));
REQUIRE(pts[1].x == Approx(208.1875f).margin(0.000001));
REQUIRE(pts[2].x == Approx(208.1875f).margin(0.000001));
REQUIRE(pts[0].y == Approx(118.5625f).margin(0.000001));
REQUIRE(pts[1].y == Approx(118.5625f).margin(0.000001));
REQUIRE(pts[2].y == Approx(150.14584f).margin(0.000001));
REQUIRE(pts[3].y == Approx(150.14584f).margin(0.000001));
//Case 2
REQUIRE(text->text("BOUNDS") == Result::Success);
identity = Matrix{1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f};
REQUIRE(text->transform(identity) == Result::Success);
REQUIRE(text->bounds(&x, &y, &w, &h) == Result::Success);
REQUIRE(x == Approx(3.125f).margin(0.000001));
REQUIRE(y == Approx(7.54167f).margin(0.000001));
REQUIRE(w == Approx(177.1875f).margin(0.000001));
REQUIRE(h == Approx(31.60417f).margin(0.000001));
REQUIRE(canvas->update() == Result::Success);
REQUIRE(text->bounds(pts) == Result::Success);
REQUIRE(pts[0].x == Approx(3.125f).margin(0.000001));
REQUIRE(pts[3].x == Approx(3.125f).margin(0.000001));
REQUIRE(pts[1].x == Approx(180.3125f).margin(0.000001));
REQUIRE(pts[2].x == Approx(180.3125f).margin(0.000001));
REQUIRE(pts[0].y == Approx(7.54167f).margin(0.000001));
REQUIRE(pts[1].y == Approx(7.54167f).margin(0.000001));
REQUIRE(pts[2].y == Approx(39.14584f).margin(0.000001));
REQUIRE(pts[3].y == Approx(39.14584f).margin(0.000001));
#endif
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Intersection", "[tvgPaint]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
uint32_t buffer[200 * 200];
canvas->target(buffer, 200, 200, 200, ColorSpace::ARGB8888);
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->appendRect(50, 50, 100, 100) == Result::Success);
REQUIRE(shape->fill(255, 0, 0, 255) == Result::Success);
REQUIRE(canvas->add(shape) == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
// Case1. Fully contained
REQUIRE(shape->intersects(0, 0, 200, 200) == true);
// Case2. Partially overlapping
REQUIRE(shape->intersects(25, 25, 50, 50) == true);
REQUIRE(shape->intersects(125, 125, 50, 50) == true);
// Case3. Edge-touching
REQUIRE(shape->intersects(49, 49, 2, 2) == true);
REQUIRE(shape->intersects(149, 149, 2, 2) == true);
// Case4. Fully separated
REQUIRE(shape->intersects(0, 0, 25, 25) == false);
REQUIRE(shape->intersects(175, 175, 25, 25) == false);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Duplication", "[tvgPaint]")
{
vector<Paint*> paints;
auto shape = Shape::gen();
REQUIRE(shape);
paints.push_back(shape);
#ifdef THORVG_TTF_LOADER_SUPPORT
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
auto text = Text::gen();
REQUIRE(text);
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(32) == Result::Success);
REQUIRE(text->text("Original Text") == Result::Success);
REQUIRE(text->fill(255, 0, 0) == Result::Success);
paints.push_back(text);
#endif
for (auto& paint : paints) {
//Setup paint properties
REQUIRE(paint->opacity(0) == Result::Success);
REQUIRE(paint->translate(200.0f, 100.0f) == Result::Success);
REQUIRE(paint->scale(2.2f) == Result::Success);
REQUIRE(paint->rotate(90.0f) == Result::Success);
auto comp = Shape::gen();
REQUIRE(comp);
REQUIRE(paint->clip(comp) == Result::Success);
//Duplication
auto dup = paint->duplicate();
REQUIRE(dup);
//Compare properties
REQUIRE(dup->opacity() == 0);
auto m = paint->transform();
REQUIRE(m.e11 == Approx(0.0f).margin(0.000001));
REQUIRE(m.e12 == Approx(-2.2f).margin(0.000001));
REQUIRE(m.e13 == Approx(200.0f).margin(0.000001));
REQUIRE(m.e21 == Approx(2.2f).margin(0.000001));
REQUIRE(m.e22 == Approx(0.0f).margin(0.000001));
REQUIRE(m.e23 == Approx(100.0f).margin(0.000001));
REQUIRE(m.e31 == Approx(0.0f).margin(0.000001));
REQUIRE(m.e32 == Approx(0.0f).margin(0.000001));
REQUIRE(m.e33 == Approx(1.0f).margin(0.000001));
Paint::rel(dup);
}
//release
for (auto p : paints) {
Paint::rel(p);
}
}
TEST_CASE("Reference Count", "[tvgPaint]")
{
auto shape = Shape::gen();
REQUIRE(shape->refCnt() == 0);
REQUIRE(shape->unref(false) == 0);
REQUIRE(shape->ref() == 1);
REQUIRE(shape->ref() == 2);
REQUIRE(shape->ref() == 3);
REQUIRE(shape->unref() == 2);
REQUIRE(shape->unref() == 1);
REQUIRE(shape->unref() == 0);
Initializer::init();
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
shape = Shape::gen();
REQUIRE(shape->ref() == 1);
canvas->add(shape);
REQUIRE(shape->refCnt() == 2);
REQUIRE(shape->unref() == 1);
shape = Shape::gen();
REQUIRE(shape->ref() == 1);
auto scene = Scene::gen();
scene->add(shape);
canvas->add(scene);
REQUIRE(shape->refCnt() == 2);
REQUIRE(shape->unref() == 1);
shape = Shape::gen();
REQUIRE(shape->ref() == 1);
scene = Scene::gen();
scene->add(shape);
scene->remove();
canvas->add(scene);
REQUIRE(shape->unref() == 0);
}
Initializer::term();
}

View File

@@ -0,0 +1,460 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include <fstream>
#include <cstring>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
TEST_CASE("Picture Creation", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
REQUIRE(picture->type() == Type::Picture);
Paint::rel(picture);
}
TEST_CASE("Load RAW Data", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
ifstream file(TEST_DIR"/rawimage_200x300.raw");
if (!file.is_open()) return;
auto data = (uint32_t*)malloc(sizeof(uint32_t) * (200*300));
file.read(reinterpret_cast<char *>(data), sizeof (uint32_t) * 200 * 300);
file.close();
//Negative cases
REQUIRE(picture->load(nullptr, 200, 300, ColorSpace::ARGB8888, false) == Result::InvalidArguments);
REQUIRE(picture->load(data, 0, 0, ColorSpace::ARGB8888, false) == Result::InvalidArguments);
REQUIRE(picture->load(data, 200, 0, ColorSpace::ARGB8888, false) == Result::InvalidArguments);
REQUIRE(picture->load(data, 0, 300, ColorSpace::ARGB8888, false) == Result::InvalidArguments);
//Positive cases
REQUIRE(picture->load(data, 200, 300, ColorSpace::ARGB8888, false) == Result::Success);
REQUIRE(picture->load(data, 200, 300, ColorSpace::ARGB8888, true) == Result::Success);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 200);
REQUIRE(h == 300);
Paint::rel(picture);
free(data);
}
TEST_CASE("Picture Size", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::InsufficientCondition);
//Primary
ifstream file(TEST_DIR"/rawimage_200x300.raw");
if (!file.is_open()) return;
auto data = (uint32_t*)malloc(sizeof(uint32_t) * (200*300));
file.read(reinterpret_cast<char *>(data), sizeof (uint32_t) * 200 * 300);
file.close();
REQUIRE(picture->load(data, 200, 300, ColorSpace::ARGB8888, false) == Result::Success);
REQUIRE(picture->size(nullptr, nullptr) == Result::Success);
REQUIRE(picture->size(100, 100) == Result::Success);
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 100);
REQUIRE(h == 100);
free(data);
//Secondary
ifstream file2(TEST_DIR"/rawimage_250x375.raw");
if (!file2.is_open()) return;
data = (uint32_t*)malloc(sizeof(uint32_t) * (250*375));
file2.read(reinterpret_cast<char *>(data), sizeof (uint32_t) * 250 * 375);
file2.close();
REQUIRE(picture->load(data, 250, 375, ColorSpace::ARGB8888, false) == Result::Success);
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(picture->size(w, h) == Result::Success);
free(data);
Paint::rel(picture);
}
TEST_CASE("Picture Origin", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::InsufficientCondition);
//Primary
ifstream file(TEST_DIR"/rawimage_200x300.raw");
if (!file.is_open()) return;
auto data = (uint32_t*)malloc(sizeof(uint32_t) * (200*300));
file.read(reinterpret_cast<char *>(data), sizeof (uint32_t) * 200 * 300);
file.close();
REQUIRE(picture->load(data, 200, 300, ColorSpace::ARGB8888, false) == Result::Success);
REQUIRE(picture->origin(0.0f, 0.0f) == Result::Success);
REQUIRE(picture->origin(0.5f, 0.5f) == Result::Success);
REQUIRE(picture->origin(1.0f, 1.0f) == Result::Success);
REQUIRE(picture->origin(-1.0f, -1.0f) == Result::Success);
free(data);
Paint::rel(picture);
}
TEST_CASE("Picture Resolver", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::InsufficientCondition);
//Primary
ifstream file(TEST_DIR"/rawimage_200x300.raw");
if (!file.is_open()) return;
auto data = (uint32_t*)malloc(sizeof(uint32_t) * (200*300));
file.read(reinterpret_cast<char *>(data), sizeof (uint32_t) * 200 * 300);
file.close();
auto resolver = [](Paint* paint, const char* src, void *data) -> bool
{
return false;
};
REQUIRE(picture->resolver(resolver, nullptr) == Result::Success);
REQUIRE(picture->load(data, 200, 300, ColorSpace::ARGB8888, false) == Result::Success);
free(data);
Paint::rel(picture);
}
TEST_CASE("Picture Duplication", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
//Primary
ifstream file(TEST_DIR"/rawimage_200x300.raw");
if (!file.is_open()) return;
auto data = (uint32_t*)malloc(sizeof(uint32_t) * (200*300));
file.read(reinterpret_cast<char *>(data), sizeof (uint32_t) * 200 * 300);
file.close();
REQUIRE(picture->load(data, 200, 300, ColorSpace::ARGB8888, false) == Result::Success);
REQUIRE(picture->size(100, 100) == Result::Success);
auto dup = (Picture*)picture->duplicate();
REQUIRE(dup);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 100);
REQUIRE(h == 100);
free(data);
Paint::rel(dup);
Paint::rel(picture);
}
#ifdef THORVG_SVG_LOADER_SUPPORT
TEST_CASE("Load SVG file", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
//Invalid file
REQUIRE(picture->load("invalid.svg") == Result::InvalidArguments);
//Load Svg file
REQUIRE(picture->load(TEST_DIR"/test1.svg") == Result::Success);
REQUIRE(picture->load(TEST_DIR"/test2.svg") == Result::Success);
REQUIRE(picture->load(TEST_DIR"/test3.svg") == Result::Success);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
Paint::rel(picture);
}
TEST_CASE("Load SVG Data", "[tvgPicture]")
{
static const char* svg = "<svg height=\"1000\" viewBox=\"0 0 1000 1000\" width=\"1000\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M.10681413.09784845 1000.0527.01592069V1000.0851L.06005738 999.9983Z\" fill=\"#ffffff\" stroke-width=\"3.910218\"/><g fill=\"#252f35\"><g stroke-width=\"3.864492\"><path d=\"M256.61221 100.51736H752.8963V386.99554H256.61221Z\"/><path d=\"M201.875 100.51736H238.366478V386.99554H201.875Z\"/><path d=\"M771.14203 100.51736H807.633508V386.99554H771.14203Z\"/></g><path d=\"M420.82388 380H588.68467V422.805317H420.82388Z\" stroke-width=\"3.227\"/><path d=\"m420.82403 440.7101v63.94623l167.86079 25.5782V440.7101Z\"/><path d=\"M420.82403 523.07258V673.47362L588.68482 612.59701V548.13942Z\"/></g><g fill=\"#222f35\"><path d=\"M420.82403 691.37851 588.68482 630.5019 589 834H421Z\"/><path d=\"m420.82403 852.52249h167.86079v28.64782H420.82403v-28.64782 0 0\"/><path d=\"m439.06977 879.17031c0 0-14.90282 8.49429-18.24574 15.8161-4.3792 9.59153 0 31.63185 0 31.63185h167.86079c0 0 4.3792-22.04032 0-31.63185-3.34292-7.32181-18.24574-15.8161-18.24574-15.8161z\"/></g><g fill=\"#ffffff\"><path d=\"m280 140h15v55l8 10 8-10v-55h15v60l-23 25-23-25z\"/><path d=\"m335 140v80h45v-50h-25v10h10v30h-15v-57h18v-13z\"/></g></svg>";
auto picture = Picture::gen();
REQUIRE(picture);
//Negative cases
REQUIRE(picture->load(nullptr, 100, "") == Result::InvalidArguments);
REQUIRE(picture->load(svg, 0, "") == Result::InvalidArguments);
//Positive cases
REQUIRE(picture->load(svg, strlen(svg), "svg") == Result::Success);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 1000);
REQUIRE(h == 1000);
Paint::rel(picture);
}
#endif
#ifdef THORVG_PNG_LOADER_SUPPORT
TEST_CASE("Load PNG file from path", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
//Invalid file
REQUIRE(picture->load("invalid.png") == Result::InvalidArguments);
REQUIRE(picture->load(TEST_DIR"/test.png") == Result::Success);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 512);
REQUIRE(h == 512);
Paint::rel(picture);
}
TEST_CASE("Load PNG file from data", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
//Open file
ifstream file(TEST_DIR"/test.png", ios::in | ios::binary);
REQUIRE(file.is_open());
auto size = sizeof(uint32_t) * (1000*1000);
auto data = (char*)malloc(size);
file.read(data, size);
file.close();
REQUIRE(picture->load(data, size, "") == Result::Success);
REQUIRE(picture->load(data, size, "png", "", true) == Result::Success);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 512);
REQUIRE(h == 512);
free(data);
Paint::rel(picture);
}
TEST_CASE("Load PNG file and render", "[tvgPicture]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
auto picture = Picture::gen();
REQUIRE(picture);
REQUIRE(picture->load(TEST_DIR"/test.png") == Result::Success);
REQUIRE(picture->opacity(192) == Result::Success);
REQUIRE(picture->scale(5.0) == Result::Success);
REQUIRE(canvas->add(picture) == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
#endif
#ifdef THORVG_JPG_LOADER_SUPPORT
TEST_CASE("Load JPG file from path", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
//Invalid file
REQUIRE(picture->load("invalid.jpg") == Result::InvalidArguments);
REQUIRE(picture->load(TEST_DIR"/test.jpg") == Result::Success);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 512);
REQUIRE(h == 512);
Paint::rel(picture);
}
TEST_CASE("Load JPG file from data", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
//Open file
ifstream file(TEST_DIR"/test.jpg", ios::in | ios::binary);
REQUIRE(file.is_open());
auto begin = file.tellg();
file.seekg(0, ios::end);
auto size = file.tellg() - begin;
auto data = (char*)malloc(size);
file.seekg(0, ios::beg);
file.read(data, size);
file.close();
REQUIRE(picture->load(data, size, "") == Result::Success);
REQUIRE(picture->load(data, size, "jpg", "", true) == Result::Success);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 512);
REQUIRE(h == 512);
free(data);
Paint::rel(picture);
}
TEST_CASE("Load JPG file and render", "[tvgPicture]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
auto picture = Picture::gen();
REQUIRE(picture);
REQUIRE(picture->load(TEST_DIR"/test.jpg") == Result::Success);
REQUIRE(canvas->add(picture) == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
#endif
#ifdef THORVG_WEBP_LOADER_SUPPORT
TEST_CASE("Load WEBP file from path", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
//Invalid file
REQUIRE(picture->load("invalid.webp") == Result::InvalidArguments);
REQUIRE(picture->load(TEST_DIR"/test.webp") == Result::Success);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 512);
REQUIRE(h == 512);
Paint::rel(picture);
}
TEST_CASE("Load WEBP file from data", "[tvgPicture]")
{
auto picture = Picture::gen();
REQUIRE(picture);
//Open file
ifstream file(TEST_DIR"/test.webp", ios::in | ios::binary);
REQUIRE(file.is_open());
auto size = sizeof(uint32_t) * (1000*1000);
auto data = (char*)malloc(size);
file.read(data, size);
file.close();
REQUIRE(picture->load(data, size, "") == Result::Success);
REQUIRE(picture->load(data, size, "webp", "", true) == Result::Success);
float w, h;
REQUIRE(picture->size(&w, &h) == Result::Success);
REQUIRE(w == 512);
REQUIRE(h == 512);
free(data);
Paint::rel(picture);
}
TEST_CASE("Load WEBP file and render", "[tvgPicture]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
auto picture = Picture::gen();
REQUIRE(picture);
REQUIRE(picture->load(TEST_DIR"/test.webp") == Result::Success);
REQUIRE(picture->opacity(192) == Result::Success);
REQUIRE(picture->scale(5.0) == Result::Success);
REQUIRE(canvas->add(picture) == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
#endif

View File

@@ -0,0 +1,60 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include <fstream>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
TEST_CASE("Saver Creation", "[tvgSavers]")
{
auto saver = unique_ptr<Saver>(Saver::gen());
REQUIRE(saver);
}
#if defined(THORVG_GIF_SAVER_SUPPORT) && defined(THORVG_LOTTIE_LOADER_SUPPORT)
TEST_CASE("Save a lottie into gif", "[tvgSavers]") {
REQUIRE(Initializer::init() == Result::Success);
{
auto animation = Animation::gen();
auto picture = animation->picture();
REQUIRE(picture->load(TEST_DIR"/test.lot") == Result::Success);
REQUIRE(picture->size(100, 100) == Result::Success);
auto bg = Shape::gen();
REQUIRE(bg->fill(255, 255, 255) == Result::Success);
REQUIRE(bg->appendRect(0, 0, 100, 100) == Result::Success);
auto saver = unique_ptr<Saver>(Saver::gen());
REQUIRE(saver);
REQUIRE(saver->background(bg) == Result::Success);
REQUIRE(saver->save(animation, TEST_DIR"/test.gif") == Result::Success);
REQUIRE(saver->sync() == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
#endif

View File

@@ -0,0 +1,192 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
TEST_CASE("Scene Creation", "[tvgScene]")
{
auto scene = Scene::gen();
REQUIRE(scene);
REQUIRE(scene->type() == Type::Scene);
Paint::rel(scene);
}
TEST_CASE("Pushing Paints Into Scene", "[tvgScene]")
{
auto scene = Scene::gen();
REQUIRE(scene);
REQUIRE(scene->parent() == nullptr);
Paint* paints[3];
//Pushing Paints
paints[0] = Shape::gen();
paints[0]->ref();
REQUIRE(paints[0]->parent() == nullptr);
REQUIRE(scene->add(paints[0]) == Result::Success);
REQUIRE(paints[0]->parent() == scene);
paints[1] = Picture::gen();
paints[1]->ref();
REQUIRE(paints[1]->parent() == nullptr);
REQUIRE(scene->add(paints[1]) == Result::Success);
REQUIRE(paints[1]->parent() == scene);
paints[2] = Picture::gen();
paints[2]->ref();
REQUIRE(paints[2]->parent() == nullptr);
REQUIRE(scene->add(paints[2]) == Result::Success);
REQUIRE(paints[2]->parent() == scene);
//Pushing Null Pointer
REQUIRE(scene->add(nullptr) == Result::InvalidArguments);
//Pushing Invalid Paint
REQUIRE(scene->add(nullptr) == Result::InvalidArguments);
REQUIRE(scene->remove(paints[0]) == Result::Success);
REQUIRE(scene->remove(paints[0]) == Result::InsufficientCondition);
REQUIRE(scene->add(paints[0], paints[1]) == Result::Success);
REQUIRE(scene->remove(paints[1]) == Result::Success);
REQUIRE(scene->remove(paints[1]) == Result::InsufficientCondition);
REQUIRE(scene->remove(paints[2]) == Result::Success);
REQUIRE(scene->remove(paints[0]) == Result::Success);
paints[0]->unref();
paints[1]->unref();
paints[2]->unref();
Paint::rel(scene);
}
TEST_CASE("Scene Clear", "[tvgScene]")
{
auto scene = Scene::gen();
REQUIRE(scene);
REQUIRE(scene->add(Shape::gen()) == Result::Success);
REQUIRE(scene->remove() == Result::Success);
Paint::rel(scene);
}
TEST_CASE("Scene Clear And Reuse Shape", "[tvgScene]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
uint32_t buffer[100*100];
canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888);
auto scene = Scene::gen();
REQUIRE(scene);
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->ref() == 1);
REQUIRE(scene->add(shape) == Result::Success);
REQUIRE(canvas->add(scene) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
//No deallocate shape.
REQUIRE(scene->remove() == Result::Success);
//Reuse shape.
REQUIRE(scene->add(shape) == Result::Success);
REQUIRE(shape->unref() == 1); //The scene still holds 1.
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Scene Effects", "[tvgScene]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->appendCircle(50, 50, 30, 30) == Result::Success);
REQUIRE(shape->fill(0, 255, 0, 255) == Result::Success);
auto scene = Scene::gen();
REQUIRE(scene);
REQUIRE(scene->add(shape) == Result::Success);
auto picture = tvg::Picture::gen();
picture->load(TEST_DIR"/tiger.svg");
scene->add(picture);
REQUIRE(canvas->add(scene) == Result::Success);
REQUIRE(scene->add(SceneEffect::Clear) == Result::Success);
REQUIRE(scene->add(SceneEffect::GaussianBlur, 1.5, 0, 0, 75) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(scene->add(SceneEffect::Clear) == Result::Success);
REQUIRE(scene->add(SceneEffect::DropShadow, 128, 128, 128, 200, 45.0, 5.0, 2.0, 60) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(scene->add(SceneEffect::Clear) == Result::Success);
REQUIRE(scene->add(SceneEffect::Fill, 255, 0, 0, 128) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(scene->add(SceneEffect::Clear) == Result::Success);
REQUIRE(scene->add(SceneEffect::Tint, 0, 0, 0, 255, 255, 255, 50.0) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(scene->add(SceneEffect::Clear) == Result::Success);
REQUIRE(scene->add(SceneEffect::Tritone, 0, 0, 0, 128, 128, 128, 255, 255, 255, 128) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(scene->add(SceneEffect::GaussianBlur, 1.5, 0, 0, 75) == Result::Success);
REQUIRE(scene->add(SceneEffect::DropShadow, 128, 128, 128, 200, 45.0, 5.0, 2.0, 60) == Result::Success);
REQUIRE(canvas->add(scene->duplicate()) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}

View File

@@ -0,0 +1,246 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
TEST_CASE("Shape Creation", "[tvgShape]")
{
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->type() == Type::Shape);
Paint::rel(shape);
}
TEST_CASE("Appending Commands", "[tvgShape]")
{
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->close() == Result::Success);
REQUIRE(shape->moveTo(100, 100) == Result::Success);
REQUIRE(shape->moveTo(99999999.0f, -99999999.0f) == Result::Success);
REQUIRE(shape->moveTo(0, 0) == Result::Success);
REQUIRE(shape->lineTo(120, 140) == Result::Success);
REQUIRE(shape->lineTo(99999999.0f, -99999999.0f) == Result::Success);
REQUIRE(shape->lineTo(0, 0) == Result::Success);
REQUIRE(shape->cubicTo(0, 0, 0, 0, 0, 0) == Result::Success);
REQUIRE(shape->cubicTo(0, 0, 99999999.0f, -99999999.0f, 0, 0) == Result::Success);
REQUIRE(shape->cubicTo(0, 0, 99999999.0f, -99999999.0f, 99999999.0f, -99999999.0f) == Result::Success);
REQUIRE(shape->cubicTo(99999999.0f, -99999999.0f, 99999999.0f, -99999999.0f, 99999999.0f, -99999999.0f) == Result::Success);
REQUIRE(shape->close() == Result::Success);
REQUIRE(shape->reset() == Result::Success);
REQUIRE(shape->reset() == Result::Success);
Paint::rel(shape);
}
TEST_CASE("Appending Shapes", "[tvgShape]")
{
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->moveTo(100, 100) == Result::Success);
REQUIRE(shape->lineTo(120, 140) == Result::Success);
REQUIRE(shape->appendRect(0, 0, 0, 0, 0, 0) == Result::Success);
REQUIRE(shape->appendRect(0, 0,99999999.0f, -99999999.0f, 0, 0, true) == Result::Success);
REQUIRE(shape->appendRect(0, 0, 0, 0, -99999999.0f, 99999999.0f, false) == Result::Success);
REQUIRE(shape->appendRect(99999999.0f, -99999999.0f, 99999999.0f, -99999999.0f, 99999999.0f, -99999999.0f, true) == Result::Success);
REQUIRE(shape->appendRect(99999999.0f, -99999999.0f, 99999999.0f, -99999999.0f, 99999999.0f, -99999999.0f, false) == Result::Success);
REQUIRE(shape->appendCircle(0, 0, 0, 0) == Result::Success);
REQUIRE(shape->appendCircle(-99999999.0f, 99999999.0f, 0, 0, true) == Result::Success);
REQUIRE(shape->appendCircle(-99999999.0f, 99999999.0f, -99999999.0f, 99999999.0f, false) == Result::Success);
Paint::rel(shape);
}
TEST_CASE("Appending Paths", "[tvgShape]")
{
auto shape = Shape::gen();
REQUIRE(shape);
//Negative cases
REQUIRE(shape->appendPath(nullptr, 0, nullptr, 0) == Result::InvalidArguments);
REQUIRE(shape->appendPath(nullptr, 100, nullptr, 0) == Result::InvalidArguments);
REQUIRE(shape->appendPath(nullptr, 0, nullptr, 100) == Result::InvalidArguments);
PathCommand cmds[5] = {
PathCommand::Close,
PathCommand::MoveTo,
PathCommand::LineTo,
PathCommand::CubicTo,
PathCommand::Close
};
Point pts[5] = {
{100, 100},
{200, 200},
{10, 10},
{20, 20},
{30, 30}
};
REQUIRE(shape->appendPath(cmds, 0, pts, 5) == Result::InvalidArguments);
REQUIRE(shape->appendPath(cmds, 5, pts, 0) == Result::InvalidArguments);
REQUIRE(shape->appendPath(cmds, 5, pts, 5) == Result::Success);
const PathCommand* cmds2;
const Point* pts2;
uint32_t cmds2Cnt, pts2Cnt;
REQUIRE(shape->path(&cmds2, &cmds2Cnt, &pts2, &pts2Cnt) == Result::Success);
REQUIRE(cmds2Cnt == 5);
REQUIRE(pts2Cnt == 5);
for (int i = 0; i < 5; ++i) {
REQUIRE(cmds2[i] == cmds[i]);
REQUIRE(pts[i].x == pts2[i].x);
REQUIRE(pts[i].y == pts2[i].y);
}
shape->reset();
REQUIRE(shape->path(nullptr, &cmds2Cnt, nullptr, &pts2Cnt) == Result::Success);
REQUIRE(cmds2Cnt == 0);
REQUIRE(pts2Cnt == 0);
Paint::rel(shape);
}
TEST_CASE("Stroking", "[tvgShape]")
{
auto shape = Shape::gen();
REQUIRE(shape);
//Stroke Order Before Stroke Setting
REQUIRE(shape->order(true) == Result::Success);
REQUIRE(shape->order(false) == Result::Success);
//Stroke Width
REQUIRE(shape->strokeWidth(0) == Result::Success);
REQUIRE(shape->strokeWidth() == 0);
REQUIRE(shape->strokeWidth(300) == Result::Success);
REQUIRE(shape->strokeWidth() == 300);
//Stroke Color
uint8_t r, g, b, a;
REQUIRE(shape->strokeFill(0, 50, 100, 200) == Result::Success);
REQUIRE(shape->strokeFill(nullptr, nullptr, &b, nullptr) == Result::Success);
REQUIRE(b == 100);
REQUIRE(shape->strokeFill(&r, &g, &b, &a) == Result::Success);
REQUIRE(r == 0);
REQUIRE(g == 50);
REQUIRE(b == 100);
REQUIRE(a == 200);
REQUIRE(shape->strokeFill(nullptr, nullptr, nullptr, nullptr) == Result::Success);
//Stroke Dash
REQUIRE(shape->strokeDash(nullptr, 3) == Result::InvalidArguments);
float dashPattern0[3] = {-10.0f, 1.5f, 2.22f};
REQUIRE(shape->strokeDash(dashPattern0, 0) == Result::InvalidArguments);
REQUIRE(shape->strokeDash(dashPattern0, 3) == Result::Success);
float dashPattern1[2] = {0.0f, 0.0f};
REQUIRE(shape->strokeDash(dashPattern1, 2) == Result::Success);
float dashPattern2[1] = {10.0f};
REQUIRE(shape->strokeDash(dashPattern2, 1) == Result::Success);
float dashPattern3[3] = {1.0f, 1.5f, 2.22f};
REQUIRE(shape->strokeDash(dashPattern3, 3) == Result::Success);
REQUIRE(shape->strokeDash(dashPattern3, 3, 4.5) == Result::Success);
const float* dashPattern4;
float offset;
REQUIRE(shape->strokeDash(nullptr) == 3);
REQUIRE(shape->strokeDash(&dashPattern4) == 3);
REQUIRE(shape->strokeDash(&dashPattern4, &offset) == 3);
REQUIRE(dashPattern4[0] == 1.0f);
REQUIRE(dashPattern4[1] == 1.5f);
REQUIRE(dashPattern4[2] == 2.22f);
REQUIRE(offset == 4.5f);
REQUIRE(shape->strokeDash(nullptr, 0) == Result::Success);
//Stroke Cap
REQUIRE(shape->strokeCap() == StrokeCap::Square);
REQUIRE(shape->strokeCap(StrokeCap::Round) == Result::Success);
REQUIRE(shape->strokeCap(StrokeCap::Butt) == Result::Success);
REQUIRE(shape->strokeCap() == StrokeCap::Butt);
//Stroke Join
REQUIRE(shape->strokeJoin() == StrokeJoin::Bevel);
REQUIRE(shape->strokeJoin(StrokeJoin::Miter) == Result::Success);
REQUIRE(shape->strokeJoin(StrokeJoin::Round) == Result::Success);
REQUIRE(shape->strokeJoin() == StrokeJoin::Round);
//Stroke Miterlimit
REQUIRE(shape->strokeMiterlimit() == 4.0f);
REQUIRE(shape->strokeMiterlimit(0.00001f) == Result::Success);
REQUIRE(shape->strokeMiterlimit() == 0.00001f);
REQUIRE(shape->strokeMiterlimit(1000.0f) == Result::Success);
REQUIRE(shape->strokeMiterlimit() == 1000.0f);
REQUIRE(shape->strokeMiterlimit(-0.001f) == Result::InvalidArguments);
REQUIRE(shape->trimpath(0.3f, 0.88f, false) == Result::Success);
//Stroke Order After Stroke Setting
REQUIRE(shape->order(true) == Result::Success);
REQUIRE(shape->order(false) == Result::Success);
Paint::rel(shape);
}
TEST_CASE("Shape Filling", "[tvgShape]")
{
auto shape = Shape::gen();
REQUIRE(shape);
//Fill Color
uint8_t r, g, b, a;
REQUIRE(shape->fill(255, 100, 50, 5) == Result::Success);
REQUIRE(shape->fill(&r, nullptr, &b, nullptr) == Result::Success);
REQUIRE(r == 255);
REQUIRE(b == 50);
REQUIRE(shape->fill(&r, &g, &b, &a) == Result::Success);
REQUIRE(g == 100);
REQUIRE(a == 5);
//Fill Rule
REQUIRE(shape->fillRule() == FillRule::NonZero);
REQUIRE(shape->fillRule(FillRule::EvenOdd) == Result::Success);
REQUIRE(shape->fillRule() == FillRule::EvenOdd);
Paint::rel(shape);
}

View File

@@ -0,0 +1,245 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
#ifdef THORVG_SW_RASTER_SUPPORT
TEST_CASE("Missing Initialization", "[tvgSwCanvas]")
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas == nullptr);
}
TEST_CASE("Basic Creation", "[tvgSwCanvas]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
auto canvas2 = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas2);
auto canvas3 = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas3);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Target Buffer", "[tvgSwCanvas]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
REQUIRE(canvas->target(nullptr, 100, 100, 100, ColorSpace::ARGB8888) == Result::InvalidArguments);
REQUIRE(canvas->target(buffer, 0, 100, 100, ColorSpace::ARGB8888) == Result::InvalidArguments);
REQUIRE(canvas->target(buffer, 100, 0, 100, ColorSpace::ARGB8888) == Result::InvalidArguments);
REQUIRE(canvas->target(buffer, 100, 200, 100, ColorSpace::ARGB8888) == Result::InvalidArguments);
REQUIRE(canvas->target(buffer, 100, 100, 0, ColorSpace::ARGB8888) == Result::InvalidArguments);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Pushing Paints", "[tvgSwCanvas]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
//Try all types of paints.
REQUIRE(canvas->add(Shape::gen()) == Result::Success);
REQUIRE(canvas->add(Picture::gen()) == Result::Success);
REQUIRE(canvas->add(Scene::gen()) == Result::Success);
//Cases by contexts.
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->add(Shape::gen()) == Result::Success);
REQUIRE(canvas->add(Shape::gen()) == Result::Success);
REQUIRE(canvas->remove() == Result::Success);
Paint* paints[2];
paints[0] = Shape::gen();
REQUIRE(canvas->add(paints[0]) == Result::Success);
//Negative case 1
REQUIRE(canvas->add(nullptr) == Result::InvalidArguments);
paints[1] = Shape::gen();
REQUIRE(canvas->add(paints[1]) == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
//Check list of paints
auto list = canvas->paints();
REQUIRE(list.size() == 2);
int idx = 0;
for (auto paint : list) {
REQUIRE(paints[idx] == paint);
++idx;
}
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Update", "[tvgSwCanvas]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->add(Shape::gen()) == Result::Success);
//No added shape
auto shape = Shape::gen();
//Normal case
REQUIRE(canvas->add(shape) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->update() == Result::InsufficientCondition);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(canvas->update() == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Synchronized Drawing", "[tvgSwCanvas]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(canvas->draw() == Result::InsufficientCondition);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
//Invalid Shape
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(canvas->add(shape) == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
auto shape2 = Shape::gen();
REQUIRE(shape2);
REQUIRE(shape2->appendRect(0, 0, 100, 100) == Result::Success);
REQUIRE(shape2->fill(255, 255, 255, 255) == Result::Success);
REQUIRE(canvas->add(shape2) == Result::Success);
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Asynchronous Drawing", "[tvgSwCanvas]")
{
//Use multi-threading
REQUIRE(Initializer::init(2) == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
for (int i = 0; i < 3; ++i) {
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->appendRect(0, 0, 100, 100) == Result::Success);
REQUIRE(shape->fill(255, 255, 255, 255) == Result::Success);
REQUIRE(canvas->add(shape) == Result::Success);
}
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Viewport", "[tvgSwCanvas]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
REQUIRE(canvas->viewport(25, 25, 100, 100) == Result::Success);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
REQUIRE(canvas->viewport(25, 25, 50, 50) == Result::Success);
auto shape = Shape::gen();
REQUIRE(shape);
REQUIRE(shape->appendRect(0, 0, 100, 100) == Result::Success);
REQUIRE(shape->fill(255, 255, 255, 255) == Result::Success);
REQUIRE(canvas->add(shape) == Result::Success);
//Negative, not allowed
REQUIRE(canvas->viewport(15, 25, 5, 5) == Result::InsufficientCondition);
REQUIRE(canvas->draw() == Result::Success);
//Negative, not allowed
REQUIRE(canvas->viewport(25, 25, 10, 10) == Result::InsufficientCondition);
REQUIRE(canvas->sync() == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
#endif

View File

@@ -0,0 +1,373 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <thorvg.h>
#include <fstream>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
#ifdef THORVG_SW_RASTER_SUPPORT
TEST_CASE("Basic draw", "[tvgSwEngine]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888S) == Result::Success);
std::vector<MaskMethod> masks;
masks.push_back(MaskMethod::None);
masks.push_back(MaskMethod::Alpha);
masks.push_back(MaskMethod::InvAlpha);
masks.push_back(MaskMethod::Luma);
masks.push_back(MaskMethod::InvLuma);
masks.push_back(MaskMethod::Add);
masks.push_back(MaskMethod::Subtract);
masks.push_back(MaskMethod::Intersect);
masks.push_back(MaskMethod::Difference);
masks.push_back(MaskMethod::Lighten);
masks.push_back(MaskMethod::Darken);
std::vector<BlendMethod> methods;
methods.push_back(BlendMethod::Normal);
methods.push_back(BlendMethod::Multiply);
methods.push_back(BlendMethod::Screen);
methods.push_back(BlendMethod::Overlay);
methods.push_back(BlendMethod::Darken);
methods.push_back(BlendMethod::Lighten);
methods.push_back(BlendMethod::ColorDodge);
methods.push_back(BlendMethod::ColorBurn);
methods.push_back(BlendMethod::HardLight);
methods.push_back(BlendMethod::SoftLight);
methods.push_back(BlendMethod::Difference);
methods.push_back(BlendMethod::Hue);
methods.push_back(BlendMethod::Saturation);
methods.push_back(BlendMethod::Color);
methods.push_back(BlendMethod::Luminosity);
methods.push_back(BlendMethod::Add);
methods.push_back(BlendMethod::Composition);
auto mask = []() {
auto mask = Shape::gen();
mask->appendRect(0, 10, 20, 30, 5, 5);
mask->opacity(127);
mask->fill(255, 255, 255);
return mask;
};
for (auto method : methods) {
for (auto maskOp : masks) {
//Arc Line
auto shape1 = Shape::gen();
REQUIRE(shape1->strokeFill(255, 255, 255, 255) == Result::Success);
REQUIRE(shape1->strokeWidth(2) == Result::Success);
REQUIRE(shape1->blend(method) == Result::Success);
if (maskOp != MaskMethod::None) REQUIRE(shape1->mask(mask(), maskOp) == Result::Success);
REQUIRE(canvas->add(shape1) == Result::Success);
//Cubic
auto shape2 = Shape::gen();
REQUIRE(shape2->moveTo(50, 25) == Result::Success);
REQUIRE(shape2->cubicTo(62, 25, 75, 38, 75, 50) == Result::Success);
REQUIRE(shape2->close() == Result::Success);
REQUIRE(shape2->strokeFill(255, 0, 0, 125) == Result::Success);
REQUIRE(shape2->strokeWidth(1) == Result::Success);
REQUIRE(shape2->blend(method) == Result::Success);
if (maskOp != MaskMethod::None) REQUIRE(shape2->mask(mask(), maskOp) == Result::Success);
REQUIRE(canvas->add(shape2) == Result::Success);
//Fill
auto shape3 = Shape::gen();
REQUIRE(shape3->moveTo(0, 0) == Result::Success);
REQUIRE(shape3->lineTo(20, 0) == Result::Success);
REQUIRE(shape3->lineTo(20, 20) == Result::Success);
REQUIRE(shape3->lineTo(0, 20) == Result::Success);
REQUIRE(shape3->close() == Result::Success);
REQUIRE(shape3->fill(255, 255, 255) == Result::Success);
REQUIRE(shape3->blend(method) == Result::Success);
if (maskOp != MaskMethod::None) REQUIRE(shape3->mask(mask(), maskOp) == Result::Success);
REQUIRE(canvas->add(shape3) == Result::Success);
//Dashed Line shape
auto shape4 = Shape::gen();
float dashPattern[2] = {2.5f, 5.0f};
REQUIRE(shape4->moveTo(0, 0) == Result::Success);
REQUIRE(shape4->lineTo(25, 25) == Result::Success);
REQUIRE(shape4->cubicTo(50, 50, 75, -75, 50, 100) == Result::Success);
REQUIRE(shape4->close() == Result::Success);
REQUIRE(shape4->fill(255, 255, 255) == Result::Success);
REQUIRE(shape4->strokeFill(255, 0, 0, 255) == Result::Success);
REQUIRE(shape4->strokeWidth(2) == Result::Success);
REQUIRE(shape4->strokeDash(dashPattern, 2) == Result::Success);
REQUIRE(shape4->strokeCap(StrokeCap::Round) == Result::Success);
REQUIRE(shape4->blend(method) == Result::Success);
if (maskOp != MaskMethod::None) REQUIRE(shape4->mask(mask(), maskOp) == Result::Success);
REQUIRE(canvas->add(shape4) == Result::Success);
}
}
REQUIRE(canvas->draw(true) == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Image Draw", "[tvgSwEngine]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
//raw image
ifstream file(TEST_DIR"/rawimage_200x300.raw");
if (!file.is_open()) return;
auto data = (uint32_t*)malloc(sizeof(uint32_t) * (200*300));
file.read(reinterpret_cast<char *>(data), sizeof (uint32_t) * 200 * 300);
file.close();
std::vector<MaskMethod> masks;
masks.push_back(MaskMethod::None);
masks.push_back(MaskMethod::Alpha);
masks.push_back(MaskMethod::InvAlpha);
masks.push_back(MaskMethod::Luma);
masks.push_back(MaskMethod::InvLuma);
masks.push_back(MaskMethod::Add);
masks.push_back(MaskMethod::Subtract);
masks.push_back(MaskMethod::Intersect);
masks.push_back(MaskMethod::Difference);
masks.push_back(MaskMethod::Lighten);
masks.push_back(MaskMethod::Darken);
std::vector<BlendMethod> methods;
methods.push_back(BlendMethod::Normal);
methods.push_back(BlendMethod::Multiply);
methods.push_back(BlendMethod::Screen);
methods.push_back(BlendMethod::Overlay);
methods.push_back(BlendMethod::Darken);
methods.push_back(BlendMethod::Lighten);
methods.push_back(BlendMethod::ColorDodge);
methods.push_back(BlendMethod::ColorBurn);
methods.push_back(BlendMethod::HardLight);
methods.push_back(BlendMethod::SoftLight);
methods.push_back(BlendMethod::Difference);
methods.push_back(BlendMethod::Hue);
methods.push_back(BlendMethod::Saturation);
methods.push_back(BlendMethod::Color);
methods.push_back(BlendMethod::Luminosity);
methods.push_back(BlendMethod::Add);
methods.push_back(BlendMethod::Composition);
auto mask = []() {
auto mask = Shape::gen();
mask->appendRect(0, 10, 20, 30, 5, 5);
mask->fill(255, 255, 255);
return mask;
};
for (auto method : methods) {
for (auto maskOp : masks) {
//Non-transformed images
auto picture = Picture::gen();
REQUIRE(picture->load(data, 200, 300, ColorSpace::ARGB8888, false) == Result::Success);
REQUIRE(picture->blend(method) == Result::Success);
if (maskOp != MaskMethod::None) REQUIRE(picture->mask(mask(), maskOp) == Result::Success);
REQUIRE(canvas->add(picture) == Result::Success);
//Clipped images
auto picture2 = picture->duplicate();
REQUIRE(picture2->clip(mask()) == Result::Success);
REQUIRE(canvas->add(picture2) == Result::Success);
// Transformed images
auto picture3 = picture->duplicate();
REQUIRE(picture3->rotate(45) == Result::Success);
REQUIRE(canvas->add(picture3) == Result::Success);
//Up-scaled Image
auto picture4 = picture->duplicate();
REQUIRE(picture4->scale(2.0f) == Result::Success);
REQUIRE(canvas->add(picture4) == Result::Success);
//Down-scaled Image
auto picture5 = picture->duplicate();
REQUIRE(picture5->scale(0.25f) == Result::Success);
REQUIRE(canvas->add(picture5) == Result::Success);
//Direct Clipped image
auto picture6 = Picture::gen();
REQUIRE(picture6->load(data, 200, 300, ColorSpace::ARGB8888, false) == Result::Success);
REQUIRE(picture6->clip(mask()) == Result::Success);
REQUIRE(picture6->blend(method) == Result::Success);
REQUIRE(canvas->add(picture6) == Result::Success);
//Scaled Clipped image
auto picture7 = picture6->duplicate();
REQUIRE(picture7->scale(2.0f) == Result::Success);
REQUIRE(canvas->add(picture7) == Result::Success);
}
}
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
free(data);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Filling Draw", "[tvgSwEngine]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
uint32_t buffer[100*100];
REQUIRE(canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888) == Result::Success);
std::vector<MaskMethod> masks;
masks.push_back(MaskMethod::None);
masks.push_back(MaskMethod::Alpha);
masks.push_back(MaskMethod::InvAlpha);
masks.push_back(MaskMethod::Luma);
masks.push_back(MaskMethod::InvLuma);
masks.push_back(MaskMethod::Add);
masks.push_back(MaskMethod::Subtract);
masks.push_back(MaskMethod::Intersect);
masks.push_back(MaskMethod::Difference);
masks.push_back(MaskMethod::Lighten);
masks.push_back(MaskMethod::Darken);
std::vector<BlendMethod> methods;
methods.push_back(BlendMethod::Normal);
methods.push_back(BlendMethod::Multiply);
methods.push_back(BlendMethod::Screen);
methods.push_back(BlendMethod::Overlay);
methods.push_back(BlendMethod::Darken);
methods.push_back(BlendMethod::Lighten);
methods.push_back(BlendMethod::ColorDodge);
methods.push_back(BlendMethod::ColorBurn);
methods.push_back(BlendMethod::HardLight);
methods.push_back(BlendMethod::SoftLight);
methods.push_back(BlendMethod::Difference);
methods.push_back(BlendMethod::Hue);
methods.push_back(BlendMethod::Saturation);
methods.push_back(BlendMethod::Color);
methods.push_back(BlendMethod::Luminosity);
methods.push_back(BlendMethod::Add);
methods.push_back(BlendMethod::Composition);
auto mask = []() {
auto mask = Shape::gen();
mask->appendRect(10, 10, 20, 30, 5, 5);
mask->opacity(127);
mask->fill(255, 255, 255);
return mask;
};
Fill::ColorStop cs[4] = {
{0.1f, 0, 0, 0, 0},
{0.2f, 50, 25, 50, 25},
{0.5f, 100, 100, 100, 125},
{0.9f, 255, 255, 255, 255}
};
for (auto method : methods) {
for (auto maskOp : masks) {
//Linear Gradient
auto linear = LinearGradient::gen();
REQUIRE(linear->colorStops(cs, 4) == Result::Success);
REQUIRE(linear->spread(FillSpread::Repeat) == Result::Success);
REQUIRE(linear->linear(0.0f, 0.0f, 100.0f, 120.0f) == Result::Success);
auto shape = Shape::gen();
REQUIRE(shape->appendRect(0, 0, 50, 50, 5, 5) == Result::Success);
REQUIRE(shape->fill(linear) == Result::Success);
REQUIRE(shape->blend(method) == Result::Success);
if (maskOp != MaskMethod::None) REQUIRE(shape->mask(mask(), maskOp) == Result::Success);
REQUIRE(canvas->add(shape) == Result::Success);
//Radial Gradient
auto radial = RadialGradient::gen();
REQUIRE(radial->colorStops(cs, 4) == Result::Success);
REQUIRE(radial->spread(FillSpread::Pad) == Result::Success);
REQUIRE(radial->radial(50.0f, 50.0f, 50.0f, 50.0f, 50.0f, 0.0f) == Result::Success);
auto shape2 = Shape::gen();
REQUIRE(shape2->appendRect(50, 0, 50, 50) == Result::Success);
REQUIRE(shape2->fill(radial) == Result::Success);
REQUIRE(shape2->blend(method) == Result::Success);
if (maskOp != MaskMethod::None) REQUIRE(shape2->mask(mask(), maskOp) == Result::Success);
REQUIRE(canvas->add(shape2) == Result::Success);
}
}
REQUIRE(canvas->draw() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
REQUIRE(Initializer::term() == Result::Success);
}
TEST_CASE("Image Rotation", "[tvgSwEngine]")
{
REQUIRE(Initializer::init() == Result::Success);
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
REQUIRE(canvas);
const uint32_t cw = 960;
const uint32_t ch = 960;
vector<uint32_t> buffer(static_cast<size_t>(cw) * ch);
REQUIRE(canvas->target(buffer.data(), cw, ch, cw, ColorSpace::ARGB8888) == Result::Success);
auto picture = Picture::gen();
REQUIRE(picture);
ifstream file(TEST_DIR"/rawimage_250x375.raw");
if (!file.is_open()) return;
auto data = (uint32_t*)malloc(sizeof(uint32_t) * (250*375));
file.read(reinterpret_cast<char *>(data), sizeof (uint32_t) * 250 * 375);
file.close();
REQUIRE(picture->load(data, 250, 375, ColorSpace::ARGB8888, false) == Result::Success);
REQUIRE(picture->size(240, 240) == Result::Success);
REQUIRE(picture->transform({0.572866f, -4.431353f, 336.605835f, 5.198910f, -0.386219f, 30.710693f, 0.0f, 0.0f, 1.0f}) == Result::Success);
REQUIRE(canvas->add(picture) == Result::Success);
REQUIRE(canvas->draw(true) == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
free(data);
}
REQUIRE(Initializer::term() == Result::Success);
}
#endif

View File

@@ -0,0 +1,307 @@
/*
* Copyright (c) 2021 - 2026 ThorVG project. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <fstream>
#include <cstring>
#include <thorvg.h>
#include "config.h"
#include "catch.hpp"
using namespace tvg;
using namespace std;
#ifdef THORVG_TTF_LOADER_SUPPORT
TEST_CASE("Text Creation", "[tvgText]")
{
auto text = Text::gen();
REQUIRE(text);
REQUIRE(text->type() == Type::Text);
Paint::rel(text);
}
TEST_CASE("Load TTF Data from a file", "[tvgText]")
{
Initializer::init();
{
auto text = Text::gen();
REQUIRE(text);
REQUIRE(Text::unload(TEST_DIR"/invalid.ttf") == Result::InsufficientCondition);
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
REQUIRE(Text::load(TEST_DIR"/invalid.ttf") == Result::InvalidArguments);
REQUIRE(Text::unload(TEST_DIR"/Arial.ttf") == Result::Success);
REQUIRE(Text::load("") == Result::InvalidArguments);
REQUIRE(Text::load(TEST_DIR"/NanumGothicCoding.ttf") == Result::Success);
Paint::rel(text);
}
Initializer::term();
}
TEST_CASE("Load TTF Data from a memory", "[tvgText]")
{
Initializer::init();
{
ifstream file(TEST_DIR"/Arial.ttf", ios::binary);
REQUIRE(file.is_open());
file.seekg(0, std::ios::end);
auto size = file.tellg();
file.seekg(0, std::ios::beg);
auto data = (char*)malloc(size);
REQUIRE(data);
file.read(data, size);
file.close();
auto text = Text::gen();
REQUIRE(text);
static const char* svg = "<svg height=\"1000\" viewBox=\"0 0 600 600\" ></svg>";
//load
REQUIRE(Text::load(nullptr, data, size) == Result::InvalidArguments);
REQUIRE(Text::load("Arial", data, 0) == Result::InvalidArguments);
REQUIRE(Text::load("Arial", data, 0) == Result::InvalidArguments);
REQUIRE(Text::load("ArialSvg", svg, strlen(svg), "unknown") == Result::NonSupport);
REQUIRE(Text::load("ArialUnknown", data, size, "unknown") == Result::Success);
REQUIRE(Text::load("ArialTtf", data, size, "ttf", true) == Result::Success);
REQUIRE(Text::load("Arial", data, size, "") == Result::Success);
//unload
REQUIRE(Text::load("invalid", nullptr, 0) == Result::InsufficientCondition);
REQUIRE(Text::load("ArialSvg", nullptr, 0) == Result::InsufficientCondition);
REQUIRE(Text::load("ArialUnknown", nullptr, 0) == Result::Success);
REQUIRE(Text::load("ArialTtf", nullptr, 0) == Result::Success);
REQUIRE(Text::load("Arial", nullptr, 111) == Result::Success);
free(data);
Paint::rel(text);
}
Initializer::term();
}
TEST_CASE("Text Font", "[tvgText]")
{
Initializer::init();
{
auto text = Text::gen();
REQUIRE(text);
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(80) == Result::Success);
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(1) == Result::Success);
REQUIRE(text->size(50) == Result::Success);
REQUIRE(text->font(nullptr) == Result::Success);
REQUIRE(text->font("InvalidFont") == Result::InsufficientCondition);
Paint::rel(text);
}
Initializer::term();
}
TEST_CASE("Text Basic", "[tvgText]")
{
Initializer::init();
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
uint32_t buffer[100*100];
canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888);
auto text = Text::gen();
REQUIRE(text);
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(80) == Result::Success);
REQUIRE(text->text(nullptr) == Result::Success);
REQUIRE(text->text("") == Result::Success);
REQUIRE(text->text("ABCDEFGHIJIKLMOPQRSTUVWXYZ") == Result::Success);
REQUIRE(text->text("THORVG Text") == Result::Success);
REQUIRE(text->fill(255, 255, 255) == Result::Success);
REQUIRE(canvas->add(text) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
Initializer::term();
}
TEST_CASE("Text with composite glyphs", "[tvgText]")
{
Initializer::init();
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
uint32_t buffer[100*100];
canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888);
auto text = Text::gen();
REQUIRE(text);
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(80) == Result::Success);
REQUIRE(text->text("\xc5\xbb\x6f\xc5\x82\xc4\x85\x64\xc5\xba \xc8\xab") == Result::Success);
REQUIRE(text->fill(255, 255, 255) == Result::Success);
REQUIRE(canvas->add(text) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
Initializer::term();
}
TEST_CASE("Text Styles", "[tvgText]")
{
Initializer::init();
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
uint32_t buffer[100*100];
canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888);
auto text = Text::gen();
REQUIRE(text);
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(80) == Result::Success);
REQUIRE(text->text("ThorVG Test\n Text!") == Result::Success);
REQUIRE(text->fill(255, 255, 255) == Result::Success);
REQUIRE(text->outline(0, 0, 0, 0) == Result::Success);
REQUIRE(text->outline(3, 255, 255, 255) == Result::Success);
REQUIRE(text->outline(0, 0, 0, 0) == Result::Success);
REQUIRE(text->italic(-10.0f) == Result::Success);
REQUIRE(text->italic(10000.0f) == Result::Success);
REQUIRE(text->italic(0.0) == Result::Success);
REQUIRE(text->italic(0.18f) == Result::Success);
REQUIRE(canvas->add(text) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
Initializer::term();
}
TEST_CASE("Text Layout", "[tvgText]")
{
Initializer::init();
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
uint32_t buffer[100*100];
canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888);
auto text = Text::gen();
REQUIRE(text);
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(80) == Result::Success);
REQUIRE(text->fill(255, 255, 255) == Result::Success);
REQUIRE(text->text("ThorVG Test\n Text!") == Result::Success);
REQUIRE(text->align(0.0f, 0.0f) == Result::Success);
REQUIRE(text->align(0.5f, 0.5f) == Result::Success);
REQUIRE(text->align(1.0f, 1.0f) == Result::Success);
REQUIRE(text->align(2.0f, 2.0f) == Result::Success);
REQUIRE(text->align(-1.0f, -1.0f) == Result::Success);
REQUIRE(text->layout(0, 0) == Result::Success);
REQUIRE(text->layout(-100, -100) == Result::Success);
REQUIRE(text->layout(100, 100) == Result::Success);
REQUIRE(canvas->add(text) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
Initializer::term();
}
TEST_CASE("Text Wrap Mode", "[tvgText]")
{
Initializer::init();
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
uint32_t buffer[100*100];
canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888);
auto text = Text::gen();
REQUIRE(text);
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(80) == Result::Success);
REQUIRE(text->fill(255, 255, 255) == Result::Success);
REQUIRE(text->align(0.5f, 0.5f) == Result::Success);
REQUIRE(text->text("Very Long Long Text ThorVG Test\n ABCDEFGHIJKLMNOPRSTU!") == Result::Success);
REQUIRE(text->layout(100, 100) == Result::Success);
REQUIRE(canvas->add(text) == Result::Success);
REQUIRE(text->wrap(TextWrap::Character) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(text->wrap(TextWrap::Word) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(text->wrap(TextWrap::Smart) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
REQUIRE(text->wrap(TextWrap::Ellipsis) == Result::Success);
REQUIRE(canvas->update() == Result::Success);
REQUIRE(canvas->sync() == Result::Success);
}
Initializer::term();
}
TEST_CASE("Text Spacing", "[tvgText]")
{
Initializer::init();
{
auto canvas = unique_ptr<SwCanvas>(SwCanvas::gen());
uint32_t buffer[100*100];
canvas->target(buffer, 100, 100, 100, ColorSpace::ARGB8888);
auto text = Text::gen();
REQUIRE(text);
REQUIRE(Text::load(TEST_DIR"/Arial.ttf") == Result::Success);
REQUIRE(text->font("Arial") == Result::Success);
REQUIRE(text->size(80) == Result::Success);
REQUIRE(text->text("\xc5\xbb\x6f\xc5\x82\xc4\x85\x64\xc5\xba \xc8\xab") == Result::Success);
REQUIRE(text->spacing(-1.0f, -1.0f) == Result::InvalidArguments);
REQUIRE(text->spacing(0.0f, 0.0f) == Result::Success);
REQUIRE(text->spacing(1.5f, 1.5f) == Result::Success);
REQUIRE(text->spacing(2.0f, 2.0f) == Result::Success);
REQUIRE(canvas->add(text) == Result::Success);
}
Initializer::term();
}
#endif