LOADIMAGE: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
m (Fix typo)
(Update examples 2 & 3 to showcase new features)
Line 100: Line 100:
----
----


;Example 3: To load an image from memory and display it on the screen
;Example 3: Load and scale an image from memory and display it on the screen.
{{CodeStart}}
{{CodeStart}}
{{Cl|OPTION _EXPLICIT}}
{{Cl|OPTION}} {{Cl|_EXPLICIT}}


{{Cl|DIM}} Bee& '                                              the image file
{{Cl|DIM}} Bee& {{Text|<nowiki>'                                              the image file</nowiki>|#919191}}
{{Cl|DIM}} cx%, cy% '                                          center x,y coordinate for image
{{Cl|DIM}} cx%, cy% {{Text|<nowiki>'                                          center x,y coordinate for image</nowiki>|#919191}}


{{Cl|RESTORE}} Data_tbee0_png_2314
{{Cl|RESTORE}} Data_tbee0_png_2314
Bee& = {{Cl|_LOADIMAGE}}(LoadResource, 32, "memory") '         load image file into memory
Bee& = {{Cl|_LOADIMAGE}}({{Text|LoadResource|#55FF55}}, {{Text|32|#F580B1}}, {{Text|<nowiki>"memory, hq3xa"</nowiki>|#FFB100}}) {{Text|<nowiki>'   load image file from memory and scale it using a pixel scaler</nowiki>|#919191}}
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(640, 480, 32) '                        enter a graphics screen
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}({{Text|640|#F580B1}}, {{Text|480|#F580B1}}, {{Text|32|#F580B1}}) {{Text|<nowiki>'                        enter a graphics screen</nowiki>|#919191}}
{{Cl|CLS}} , {{Cl|_RGB32}}(127, 127, 127) '                            clear the screen with gray
{{Cl|CLS}} , {{Cl|_RGB32}}({{Text|127|#F580B1}}, {{Text|127|#F580B1}}, {{Text|127|#F580B1}}) {{Text|<nowiki>'                            clear the screen with gray</nowiki>|#919191}}
{{Cl|LOCATE}} 2, 15 '                                          position text cursor
{{Cl|LOCATE}} {{Text|2|#F580B1}}, {{Text|15|#F580B1}} {{Text|<nowiki>'                                          position text cursor</nowiki>|#919191}}
{{Cl|PRINT}} "An image loaded into memory and placed on the screen."
{{Cl|PRINT}} {{Text|<nowiki>"An image loaded into memory and placed on the screen."</nowiki>|#FFB100}}
cx% = (640 - {{Cl|_WIDTH}}(Bee&)) \ 2 '                        calculate x center position
cx% = ({{Text|640|#F580B1}} - {{Cl|_WIDTH (function)|_WIDTH}}(Bee&)) \ {{Text|2|#F580B1}} {{Text|<nowiki>'                        calculate x center position</nowiki>|#919191}}
cy% = (480 - {{Cl|_HEIGHT}}(Bee&)) \ 2 '                        calculate y center position
cy% = ({{Text|480|#F580B1}} - {{Cl|_HEIGHT}}(Bee&)) \ {{Text|2|#F580B1}} {{Text|<nowiki>'                        calculate y center position</nowiki>|#919191}}
{{Cl|_PUTIMAGE}} (cx%, cy%), Bee& '                            place image onto center of screen
{{Cl|_PUTIMAGE}} (cx%, cy%), Bee& {{Text|<nowiki>'                            place image onto center of screen</nowiki>|#919191}}
{{Cl|SLEEP}} '                                                  wait for key stroke
{{Cl|SLEEP}} {{Text|<nowiki>'                                                  wait for key stroke</nowiki>|#919191}}
{{Cl|_FREEIMAGE}} Bee& '                                        remove image from memory
{{Cl|_FREEIMAGE}} Bee& {{Text|<nowiki>'                                        remove image from memory</nowiki>|#919191}}
{{Cl|SYSTEM}} '                                                return to OS
{{Cl|SYSTEM}} {{Text|<nowiki>'                                                return to OS</nowiki>|#919191}}




Data_tbee0_png_2314:
Data_tbee0_png_2314:
{{Cl|DATA}} 2314,2988,-1
{{Cl|DATA}} {{Text|2314|#F580B1}},{{Text|2988|#F580B1}},{{Text|-1|#F580B1}}
{{Cl|DATA}} eJx1VmdUU9kWDiihKDGEariKEKzUoV4FHWMgCYj0iVIVKeIocgNKiSCIkQuEZGBQRARxgCdNLNRQFYgE
{{Cl|DATA}} eJx1VmdUU9kWDiihKDGEariKEKzUoV4FHWMgCYj0iVIVKeIocgNKiSCIkQuEZGBQRARxgCdNLNRQFYgE
{{Cl|DATA}} pGMARYOSCCqiSAkgUia8f28t3zrfPvtb31lnn732+bF3o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wa0MjCmgov0XSVDl05s+{{Text|2xivHT24xKmYVpN8B0ND7YV0uiuP|#F580B1}}/YwY/dpVBJtS4H7GBgWXU/rcaMO
{{Cl|DATA}} 0/JDoxNaFs+f25NGTThR8EyYcqjUjdMamtQsk5jgPzu72+WnCrEXWlQgt7JS7JGALjna/dWf0VHxfQtG
{{Cl|DATA}} {{Text|0|#F580B1}}/JDoxNaFs+f25NGTThR8EyYcqjUjdMamtQsk5jgPzu72+WnCrEXWlQgt7JS7JGALjna/dWf0VHxfQtG
{{Cl|DATA}} 0YcZIKBUQIE2+t+RQsI3O2SzPVdJgEQxPk4OlwLOxeYveaOrXXb8smk3/Z+JgAC8lUkOW93AGx2tePu3
{{Cl|DATA}} {{Text|0YcZIKBUQIE2|#F580B1}}+t+RQsI3O2SzPVdJgEQxPk4OlwLOxeYveaOrXXb8smk3/Z+JgAC8lUkOW93AGx2tePu3
{{Cl|DATA}} 9ax4lEHYWNtbPTxyKu5fF0s/3Q==
{{Cl|DATA}} {{Text|9ax4lEHYWNtbPTxyKu5fF0s|#F580B1}}/{{Text|3Q|#F580B1}}==


' Convert a base64 string to a normal string
{{Text|<nowiki>' Convert a base64 string to a normal string</nowiki>|#919191}}
{{Cl|FUNCTION}} DecodeBase64$ (s {{Cl|AS}} {{Cl|STRING}})
{{Cl|FUNCTION}} {{Text|DecodeBase64$|#55FF55}} (s {{Cl|AS}} {{Cl|STRING}})
     {{Cl|CONST}} BASE64_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
     {{Cl|CONST}} BASE64_CHARACTERS = {{Text|<nowiki>"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"</nowiki>|#FFB100}}


     {{Cl|DIM}} {{Cl|AS}} {{Cl|STRING}} buffer, result
     {{Cl|DIM}} {{Cl|AS}} {{Cl|STRING}} buffer, result
Line 170: Line 170:
     {{Cl|DIM}} {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}} char1, char2, char3, char4
     {{Cl|DIM}} {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|_BYTE}} char1, char2, char3, char4


     {{Cl|FOR}} i = 1 {{Cl|TO}} {{Cl|LEN}}(s) {{Cl|STEP}} 4
     {{Cl|FOR}} i = {{Text|1|#F580B1}} {{Cl|TO}} {{Cl|LEN}}(s) {{Cl|STEP}} {{Text|4|#F580B1}}
         char1 = {{Cl|INSTR}}(BASE64_CHARACTERS, {{Cl|CHR$}}({{Cl|ASC (function)|ASC}}(s, i))) - 1
         char1 = {{Cl|INSTR}}(BASE64_CHARACTERS, {{Cl|CHR$}}({{Cl|ASC (function)|ASC}}(s, i))) - {{Text|1|#F580B1}}
         char2 = {{Cl|INSTR}}(BASE64_CHARACTERS, {{Cl|CHR$}}({{Cl|ASC (function)|ASC}}(s, i + 1))) - 1
         char2 = {{Cl|INSTR}}(BASE64_CHARACTERS, {{Cl|CHR$}}({{Cl|ASC (function)|ASC}}(s, i + {{Text|1|#F580B1}}))) - {{Text|1|#F580B1}}
         char3 = {{Cl|INSTR}}(BASE64_CHARACTERS, {{Cl|CHR$}}({{Cl|ASC (function)|ASC}}(s, i + 2))) - 1
         char3 = {{Cl|INSTR}}(BASE64_CHARACTERS, {{Cl|CHR$}}({{Cl|ASC (function)|ASC}}(s, i + {{Text|2|#F580B1}}))) - {{Text|1|#F580B1}}
         char4 = {{Cl|INSTR}}(BASE64_CHARACTERS, {{Cl|CHR$}}({{Cl|ASC (function)|ASC}}(s, i + 3))) - 1
         char4 = {{Cl|INSTR}}(BASE64_CHARACTERS, {{Cl|CHR$}}({{Cl|ASC (function)|ASC}}(s, i + {{Text|3|#F580B1}}))) - {{Text|1|#F580B1}}
         buffer = {{Cl|CHR$}}({{Cl|_SHL}}(char1, 2) {{Cl|OR}} {{Cl|_SHR}}(char2, 4)) + {{Cl|CHR$}}({{Cl|_SHL}}(char2 {{Cl|AND}} 15, 4) {{Cl|OR}} {{Cl|_SHR}}(char3, 2)) + {{Cl|CHR$}}({{Cl|_SHL}}(char3 {{Cl|AND}} 3, 6) {{Cl|OR}} char4)
         buffer = {{Cl|CHR$}}({{Cl|_SHL}}(char1, {{Text|2|#F580B1}}) {{Cl|OR}} {{Cl|_SHR}}(char2, {{Text|4|#F580B1}})) + {{Cl|CHR$}}({{Cl|_SHL}}(char2 {{Cl|AND}} {{Text|15|#F580B1}}, {{Text|4|#F580B1}}) {{Cl|OR}} {{Cl|_SHR}}(char3, {{Text|2|#F580B1}})) + {{Cl|CHR$}}({{Cl|_SHL}}(char3 {{Cl|AND}} {{Text|3|#F580B1}}, {{Text|6|#F580B1}}) {{Cl|OR}} char4)


         result = result + buffer
         result = result + buffer
     {{Cl|NEXT}}
     {{Cl|NEXT}}


     ' Remove padding
     {{Text|<nowiki>' Remove padding</nowiki>|#919191}}
     {{Cl|IF}} {{Cl|RIGHT$}}(s, 2) = "==" {{Cl|THEN}}
     {{Cl|IF}} {{Cl|RIGHT$}}(s, {{Text|2|#F580B1}}) = {{Text|<nowiki>"=="</nowiki>|#FFB100}} {{Cl|THEN}}
         result = {{Cl|LEFT$}}(result, {{Cl|LEN}}(result) - 2)
         result = {{Cl|LEFT$}}(result, {{Cl|LEN}}(result) - {{Text|2|#F580B1}})
     {{Cl|ELSEIF}} {{Cl|RIGHT$}}(s, 1) = "=" {{Cl|THEN}}
     {{Cl|ELSEIF}} {{Cl|RIGHT$}}(s, {{Text|1|#F580B1}}) = {{Text|<nowiki>"="</nowiki>|#FFB100}} {{Cl|THEN}}
         result = {{Cl|LEFT$}}(result, {{Cl|LEN}}(result) - 1)
         result = {{Cl|LEFT$}}(result, {{Cl|LEN}}(result) - {{Text|1|#F580B1}})
     {{Cl|END IF}}
     {{Cl|END IF}}


     DecodeBase64 = result
     {{Text|DecodeBase64|#55FF55}} = result
{{Cl|END FUNCTION}}
{{Cl|END FUNCTION}}




' Loads a binary file encoded with Bin2Data
{{Text|<nowiki>' Loads a binary file encoded with Bin2Data</nowiki>|#919191}}
' Usage:
{{Text|<nowiki>' Usage:</nowiki>|#919191}}
'  1. Encode the binary file with Bin2Data
{{Text|<nowiki>'  1. Encode the binary file with Bin2Data</nowiki>|#919191}}
'  2. Include the file or it's contents
{{Text|<nowiki>'  2. Include the file or it's contents</nowiki>|#919191}}
'  3. Load the file like so:
{{Text|<nowiki>'  3. Load the file like so:</nowiki>|#919191}}
'      Restore label_generated_by_bin2data
{{Text|<nowiki>'      Restore label_generated_by_bin2data</nowiki>|#919191}}
'      Dim buffer As String
{{Text|<nowiki>'      Dim buffer As String</nowiki>|#919191}}
'      buffer = LoadResource  ' buffer will now hold the contents of the file
{{Text|<nowiki>'      buffer = LoadResource  ' buffer will now hold the contents of the file</nowiki>|#919191}}
{{Cl|FUNCTION}} LoadResource$
{{Cl|FUNCTION}} {{Text|LoadResource$|#55FF55}}
     {{Cl|DIM}} {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|LONG}} ogSize, resize
     {{Cl|DIM}} {{Cl|AS}} {{Cl|_UNSIGNED}} {{Cl|LONG}} ogSize, resize
     {{Cl|DIM}} {{Cl|AS}} {{Cl|_BYTE}} isCompressed
     {{Cl|DIM}} {{Cl|AS}} {{Cl|_BYTE}} isCompressed


     {{Cl|READ}} ogSize, resize, isCompressed ' read the header
     {{Cl|READ}} ogSize, resize, isCompressed {{Text|<nowiki>' read the header</nowiki>|#919191}}


     {{Cl|DIM}} {{Cl|AS}} {{Cl|STRING}} buffer, result
     {{Cl|DIM}} {{Cl|AS}} {{Cl|STRING}} buffer, result


     ' Read the whole resource data
     {{Text|<nowiki>' Read the whole resource data</nowiki>|#919191}}
     {{Cl|DO}} {{Cl|WHILE}} {{Cl|LEN}}(result) < resize
     {{Cl|DO...LOOP|DO WHILE}} {{Cl|LEN}}(result) < resize
         {{Cl|READ}} buffer
         {{Cl|READ}} buffer
         result = result + buffer
         result = result + buffer
     {{Cl|LOOP}}
     {{Cl|LOOP}}


     ' Decode the data
     {{Text|<nowiki>' Decode the data</nowiki>|#919191}}
     buffer = DecodeBase64(result)
     buffer = {{Text|DecodeBase64|#55FF55}}(result)


     ' Expand the data if needed
     {{Text|<nowiki>' Expand the data if needed</nowiki>|#919191}}
     {{Cl|IF}} isCompressed {{Cl|THEN}}
     {{Cl|IF}} isCompressed {{Cl|THEN}}
         result = {{Cl|_INFLATE$}}(buffer, ogSize)
         result = {{Cl|_INFLATE$}}(buffer, ogSize)
Line 223: Line 223:
     {{Cl|END IF}}
     {{Cl|END IF}}


     LoadResource = result
     {{Text|LoadResource|#55FF55}} = result
{{Cl|END FUNCTION}}
{{Cl|END FUNCTION}}
{{CodeEnd}}
{{CodeEnd}}
{{Small|Adapted from example code by Terry Ritchie}}
{{Small|Adapted from example code by Terry Ritchie}}
----
;Example 4: Load SVG vector graphics data from memory and display it on the screen.
{{CodeStart}}
{{Cl|OPTION}} {{Cl|_EXPLICIT}}
{{Cm|$RESIZE}}:{{Cl|SMOOTH}}
{{Cl|RESTORE}} svg_data
{{Cl|DIM}} {{Cl|AS}} {{Cl|STRING}} svg, buffer
{{Cl|DO}}
    {{Cl|READ}} buffer
    svg = svg + buffer
{{Cl|DO...LOOP|LOOP WHILE}} {{Cl|LEN}}(buffer) > {{Text|0|#F580B1}}
{{Cl|DIM}} img {{Cl|AS}} {{Cl|LONG}}: img = {{Cl|_LOADIMAGE}}(svg, {{Text|32|#F580B1}}, {{Text|<nowiki>"memory"</nowiki>|#FFB100}})
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}({{Cl|_WIDTH (function)|_WIDTH}}(img) \ {{Text|2|#F580B1}}, {{Cl|_HEIGHT}}(img) \ {{Text|2|#F580B1}}, {{Text|32|#F580B1}})
{{Cl|_PUTIMAGE}} , img
{{Cl|END}}
svg_data:
{{Cl|DATA}} {{Text|<nowiki>"<?xml version='1.0' encoding='UTF-8' ?><svg width='1000pt' height='1000pt' viewBox='0 0 1000 1000' version='1.1'"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" xmlns='http://www.w3.org/2000/svg'><g id='#20170121'><path fill='#201701' opacity='0.13' d=' M 106.96 93.79 C 1"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"04.15 93.03 108.51 90.01 108.73 92.72 C 108.29 92.99 107.41 93.52 106.96 93.79 Z' /><path fill='#201701' opacity"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"='0.13' d=' M 95.83 672.05 C 107.63 671.85 119.43 672.04 131.22 671.71 C 139.42 727.72 147.68 783.74 155.45 839."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"81 C 228.65 825.83 301.68 810.94 374.89 796.94 C 376.25 803.91 377.72 810.86 378.82 817.88 C 293.95 832.31 208.9"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"6 846.09 123.99 859.95 C 114.39 797.35 104.85 734.73 95.83 672.05 Z' /><path fill='#201701' opacity='0.13' d=' M"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 521.05 768.20 C 534.58 765.42 548.14 762.73 561.72 760.16 C 562.95 768.56 565.81 776.63 566.98 785.04 C 567.43 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"787.26 564.47 787.52 562.98 787.94 C 551.02 789.90 539.03 791.74 527.09 793.81 C 524.63 785.38 522.88 776.78 521"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".05 768.20 Z' /></g><g id='#020092ff'><path fill='#020092' opacity='1.00' d=' M 106.96 93.79 C 107.41 93.52 108."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"29 92.99 108.73 92.72 C 336.34 137.82 564.13 182.21 791.76 227.19 C 817.05 336.43 842.81 445.56 868.11 554.80 C "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"868.62 557.35 869.19 559.88 869.87 562.39 C 878.00 595.95 885.78 629.60 893.49 663.25 C 834.46 674.50 775.55 686"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".43 716.55 697.87 C 715.74 696.15 714.88 694.44 714.33 692.63 C 706.05 658.24 698.55 623.65 689.93 589.34 C 726."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"01 585.53 762.08 581.64 798.16 577.87 C 802.63 599.61 808.04 621.15 812.43 642.90 C 831.94 640.28 851.28 636.51 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"870.74 633.57 C 857.58 577.56 843.81 521.71 831.20 465.56 C 811.07 465.46 790.94 465.84 770.80 465.98 C 776.45 4"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"92.17 782.87 518.20 788.09 544.48 C 759.90 546.24 731.75 548.79 703.57 550.70 C 697.63 523.64 691.95 496.52 686."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"24 469.42 C 685.88 468.36 685.65 466.48 684.07 466.80 C 676.97 466.51 669.85 466.89 662.75 467.02 C 656.82 443.4"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"4 651.75 419.64 645.92 396.03 C 702.40 398.45 758.87 401.46 815.37 403.38 C 811.57 385.34 807.31 367.38 802.84 3"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"49.49 C 794.05 349.00 785.31 347.90 776.52 347.53 C 772.46 331.59 768.99 315.50 765.53 299.43 C 774.51 300.25 78"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"3.40 301.81 792.39 302.49 C 788.94 284.70 784.17 267.20 780.48 249.46 C 706.88 236.49 633.33 223.26 559.66 210.7"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"7 C 569.11 259.65 579.47 308.34 589.07 357.19 C 564.12 353.65 539.45 347.94 514.69 343.15 C 505.33 295.17 495.94"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 247.21 486.83 199.18 C 377.19 179.64 267.44 160.57 157.70 141.55 C 164.44 186.45 171.33 231.33 177.95 276.25 C "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"162.60 274.65 147.62 270.60 132.39 268.14 C 132.34 267.86 132.25 267.29 132.20 267.01 C 123.70 209.29 115.52 151"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".50 106.96 93.79 Z' /><path fill='#020092' opacity='1.00' d=' M 283.57 200.46 C 330.37 207.33 377.13 214.50 423."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"87 221.86 C 425.83 233.08 428.13 244.23 429.97 255.47 C 421.61 254.67 413.30 253.47 404.95 252.59 C 408.92 275.9"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"4 413.79 299.15 417.42 322.56 C 378.33 315.91 339.58 307.18 300.55 300.13 L 299.94 300.03 C 294.61 266.82 288.66"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 233.70 283.57 200.46 Z' /><path fill='#020092' opacity='1.00' d=' M 639.80 254.69 C 669.80 258.62 699.63 263.89"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 729.58 268.25 C 731.57 279.41 734.82 290.30 736.55 301.51 C 708.29 298.65 680.19 294.41 651.99 291.05 C 650.07 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"290.67 646.84 290.96 646.71 288.28 C 644.49 277.06 641.65 265.97 639.80 254.69 Z' /><path fill='#020092' opacity"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"='1.00' d=' M 137.19 299.86 C 152.41 301.91 167.55 304.72 182.61 307.71 C 186.47 330.64 189.44 353.71 193.25 376"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".64 C 203.45 376.73 213.62 377.76 223.83 377.87 C 226.98 406.33 232.57 434.48 237.00 462.75 C 263.64 464.66 290."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"30 466.42 316.95 468.23 C 319.82 468.43 322.60 469.25 325.38 469.95 C 285.26 470.57 245.13 470.59 205.02 471.18 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"C 205.92 478.53 207.16 485.84 208.18 493.17 C 193.63 492.45 179.09 491.81 164.54 491.13 C 155.30 427.40 145.80 3"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"63.69 137.19 299.86 Z' /><path fill='#020092' opacity='1.00' d=' M 305.04 329.95 C 330.62 334.17 356.13 338.88 3"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"81.68 343.22 C 384.12 343.39 385.82 345.03 385.94 347.49 C 359.64 346.62 333.48 343.77 307.21 342.59 C 306.33 33"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"8.41 305.67 334.18 305.04 329.95 Z' /><path fill='#020092' opacity='1.00' d=' M 655.68 329.67 C 685.52 332.13 71"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"5.28 335.70 745.12 338.10 C 748.01 351.15 751.01 364.17 753.82 377.24 C 724.03 375.46 694.28 373.46 664.50 371.5"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"1 C 661.43 357.59 658.50 343.64 655.68 329.67 Z' /><path fill='#020092' opacity='1.00' d=' M 519.38 367.56 C 527"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".41 366.68 535.18 369.59 543.07 370.60 C 559.90 373.13 576.52 377.27 593.48 378.82 C 594.60 383.72 595.66 388.63"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 596.53 393.59 C 608.25 394.98 620.07 394.35 631.81 395.53 C 633.51 406.66 636.94 417.43 639.00 428.50 C 631.56 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"429.00 624.36 426.58 616.95 426.62 C 619.52 440.27 622.86 453.78 626.02 467.31 C 620.79 467.36 615.57 467.44 610"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".35 467.40 C 613.42 482.02 616.67 496.61 619.33 511.32 C 598.90 509.83 578.43 509.70 558.00 508.33 C 552.09 508."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"49 546.07 508.39 540.49 506.20 C 550.71 505.25 560.99 505.52 571.23 504.88 C 570.23 499.37 569.21 493.87 568.17 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"488.37 C 580.84 489.18 593.53 489.71 606.17 490.84 C 604.86 480.25 602.24 469.83 599.38 459.56 C 575.21 457.58 5"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"51.12 454.48 526.93 452.96 C 528.02 458.05 529.15 463.13 530.14 468.24 C 510.17 468.25 490.21 468.62 470.24 468."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"63 C 465.10 441.88 458.41 415.35 454.62 388.39 C 474.39 388.90 494.12 390.24 513.89 390.82 C 515.50 400.12 517.9"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"3 409.26 519.54 418.56 C 543.68 422.11 567.95 424.84 592.16 428.00 C 591.09 419.01 588.76 410.23 586.52 401.49 C"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 565.61 398.13 544.54 395.64 523.76 391.54 C 522.82 383.45 520.78 375.56 519.38 367.56 Z' /><path fill='#020092'"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" opacity='1.00' d=' M 324.73 424.74 C 350.47 424.78 376.21 425.51 401.94 426.00 C 404.12 440.54 407.23 454.95 41"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"0.30 469.33 C 384.61 469.57 358.91 469.64 333.23 469.96 C 329.62 455.06 326.39 440.00 324.73 424.74 Z' /></g><g "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"id='#00bbfdff'><path fill='#00bbfd' opacity='1.00' d=' M 157.70 141.55 C 267.44 160.57 377.19 179.64 486.83 199."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"18 C 495.94 247.21 505.33 295.17 514.69 343.15 C 516.39 351.26 517.75 359.43 519.38 367.56 C 520.78 375.56 522.8"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"2 383.45 523.76 391.54 C 520.48 391.09 517.18 390.95 513.89 390.82 C 494.12 390.24 474.39 388.90 454.62 388.39 C"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 445.78 387.51 436.88 387.63 428.02 387.22 C 430.24 400.30 433.11 413.27 435.06 426.40 C 424.02 426.45 412.98 42"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"6.35 401.94 426.00 C 376.21 425.51 350.47 424.78 324.73 424.74 C 322.36 410.54 319.90 396.34 317.83 382.09 C 286"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".51 380.50 255.15 379.59 223.83 377.87 C 213.62 377.76 203.45 376.73 193.25 376.64 C 189.44 353.71 186.47 330.64"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 182.61 307.71 C 181.21 297.20 179.55 286.73 177.95 276.25 C 171.33 231.33 164.44 186.45 157.70 141.55 M 283.57 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"200.46 C 288.66 233.70 294.61 266.82 299.94 300.03 L 300.55 300.13 C 301.22 310.16 303.60 320.01 305.04 329.95 C"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 305.67 334.18 306.33 338.41 307.21 342.59 C 333.48 343.77 359.64 346.62 385.94 347.49 C 397.99 349.47 410.34 34"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"8.78 422.47 350.29 C 421.27 340.97 419.38 331.74 417.42 322.56 C 413.79 299.15 408.92 275.94 404.95 252.59 C 413"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".30 253.47 421.61 254.67 429.97 255.47 C 428.13 244.23 425.83 233.08 423.87 221.86 C 377.13 214.50 330.37 207.33"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 283.57 200.46 Z' /></g><g id='#037efeff'><path fill='#037efe' opacity='1.00' d=' M 559.66 210.77 C 633.33 223.2"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"6 706.88 236.49 780.48 249.46 C 784.17 267.20 788.94 284.70 792.39 302.49 C 783.40 301.81 774.51 300.25 765.53 2"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"99.43 C 768.99 315.50 772.46 331.59 776.52 347.53 C 785.31 347.90 794.05 349.00 802.84 349.49 C 807.31 367.38 81"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"1.57 385.34 815.37 403.38 C 758.87 401.46 702.40 398.45 645.92 396.03 C 641.22 395.75 636.51 395.69 631.81 395.5"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"3 C 620.07 394.35 608.25 394.98 596.53 393.59 C 595.66 388.63 594.60 383.72 593.48 378.82 C 591.96 371.62 590.82"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 364.34 589.07 357.19 C 579.47 308.34 569.11 259.65 559.66 210.77 M 639.80 254.69 C 641.65 265.97 644.49 277.06 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"646.71 288.28 C 646.84 290.96 650.07 290.67 651.99 291.05 C 680.19 294.41 708.29 298.65 736.55 301.51 C 734.82 2"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"90.30 731.57 279.41 729.58 268.25 C 699.63 263.89 669.80 258.62 639.80 254.69 M 655.68 329.67 C 658.50 343.64 66"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"1.43 357.59 664.50 371.51 C 694.28 373.46 724.03 375.46 753.82 377.24 C 751.01 364.17 748.01 351.15 745.12 338.1"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"0 C 715.28 335.70 685.52 332.13 655.68 329.67 Z' /></g><g id='#07063664'><path fill='#070636' opacity='0.39' d='"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" M 71.29 255.81 C 91.75 258.62 111.74 264.36 132.20 267.01 C 132.25 267.29 132.34 267.86 132.39 268.14 C 133.72 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"278.69 135.54 289.18 136.45 299.79 C 128.64 299.02 120.99 297.19 113.23 296.07 C 123.23 360.99 133.01 425.96 142"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".23 491.00 C 149.72 492.31 158.20 489.46 164.97 493.55 C 168.25 518.72 172.05 543.84 175.69 568.97 C 167.85 569."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"55 159.99 569.07 152.15 569.36 C 158.55 607.12 163.99 645.06 169.26 683.00 C 174.39 718.40 180.23 753.69 185.06 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"789.13 C 192.48 788.35 199.88 787.27 207.13 785.49 C 207.66 789.50 208.15 793.52 208.66 797.55 C 357.65 768.80 5"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"06.40 738.72 655.43 710.15 C 659.89 711.72 664.56 710.47 669.06 709.73 C 680.61 707.76 692.18 705.88 703.74 703."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"95 C 703.73 703.08 703.71 701.32 703.70 700.44 C 707.91 699.66 712.09 698.66 716.31 697.92 C 718.13 708.23 721.5"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"8 718.20 722.99 728.60 C 672.87 738.14 622.82 748.08 572.78 758.02 C 569.11 758.83 565.42 759.54 561.72 760.16 C"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 548.14 762.73 534.58 765.42 521.05 768.20 C 472.34 777.86 423.61 787.37 374.89 796.94 C 301.68 810.94 228.65 82"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"5.83 155.45 839.81 C 147.68 783.74 139.42 727.72 131.22 671.71 C 118.83 586.83 106.51 501.94 94.36 417.01 C 87.0"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"5 363.24 78.74 309.58 71.29 255.81 Z' /><path fill='#070636' opacity='0.39' d=' M 868.11 554.80 C 869.53 557.08 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"869.90 559.74 869.87 562.39 C 869.19 559.88 868.62 557.35 868.11 554.80 Z' /></g><g id='#030173ff'><path fill='#"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"030173' opacity='1.00' d=' M 132.39 268.14 C 147.62 270.60 162.60 274.65 177.95 276.25 C 179.55 286.73 181.21 29"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"7.20 182.61 307.71 C 167.55 304.72 152.41 301.91 137.19 299.86 L 136.45 299.79 C 135.54 289.18 133.72 278.69 132"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".39 268.14 Z' /><path fill='#030173' opacity='1.00' d=' M 300.55 300.13 C 339.58 307.18 378.33 315.91 417.42 322"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".56 C 419.38 331.74 421.27 340.97 422.47 350.29 C 410.34 348.78 397.99 349.47 385.94 347.49 C 385.82 345.03 384."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"12 343.39 381.68 343.22 C 356.13 338.88 330.62 334.17 305.04 329.95 C 303.60 320.01 301.22 310.16 300.55 300.13 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"Z' /><path fill='#030173' opacity='1.00' d=' M 514.69 343.15 C 539.45 347.94 564.12 353.65 589.07 357.19 C 590.8"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"2 364.34 591.96 371.62 593.48 378.82 C 576.52 377.27 559.90 373.13 543.07 370.60 C 535.18 369.59 527.41 366.68 5"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"19.38 367.56 C 517.75 359.43 516.39 351.26 514.69 343.15 Z' /><path fill='#030173' opacity='1.00' d=' M 223.83 3"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"77.87 C 255.15 379.59 286.51 380.50 317.83 382.09 C 319.90 396.34 322.36 410.54 324.73 424.74 C 326.39 440.00 32"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"9.62 455.06 333.23 469.96 C 330.61 470.03 327.99 470.04 325.38 469.95 C 322.60 469.25 319.82 468.43 316.95 468.2"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"3 C 290.30 466.42 263.64 464.66 237.00 462.75 C 232.57 434.48 226.98 406.33 223.83 377.87 Z' /><path fill='#0301"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"73' opacity='1.00' d=' M 428.02 387.22 C 436.88 387.63 445.78 387.51 454.62 388.39 C 458.41 415.35 465.10 441.88"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 470.24 468.63 C 450.26 468.99 430.28 469.12 410.30 469.33 C 407.23 454.95 404.12 440.54 401.94 426.00 C 412.98 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"426.35 424.02 426.45 435.06 426.40 C 433.11 413.27 430.24 400.30 428.02 387.22 Z' /><path fill='#030173' opacity"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"='1.00' d=' M 513.89 390.82 C 517.18 390.95 520.48 391.09 523.76 391.54 C 544.54 395.64 565.61 398.13 586.52 401"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".49 C 588.76 410.23 591.09 419.01 592.16 428.00 C 567.95 424.84 543.68 422.11 519.54 418.56 C 517.93 409.26 515."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"50 400.12 513.89 390.82 Z' /><path fill='#030173' opacity='1.00' d=' M 631.81 395.53 C 636.51 395.69 641.22 395."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"75 645.92 396.03 C 651.75 419.64 656.82 443.44 662.75 467.02 C 650.51 467.25 638.26 467.09 626.02 467.31 C 622.8"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"6 453.78 619.52 440.27 616.95 426.62 C 624.36 426.58 631.56 429.00 639.00 428.50 C 636.94 417.43 633.51 406.66 6"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"31.81 395.53 Z' /><path fill='#030173' opacity='1.00' d=' M 526.93 452.96 C 551.12 454.48 575.21 457.58 599.38 4"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"59.56 C 602.24 469.83 604.86 480.25 606.17 490.84 C 593.53 489.71 580.84 489.18 568.17 488.37 C 566.81 481.54 56"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"5.39 474.73 564.15 467.88 C 552.81 467.76 541.48 468.31 530.14 468.24 C 529.15 463.13 528.02 458.05 526.93 452.9"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"6 Z' /><path fill='#030173' opacity='1.00' d=' M 164.54 491.13 C 179.09 491.81 193.63 492.45 208.18 493.17 C 220"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".62 574.19 232.20 655.34 244.88 736.31 C 364.76 716.81 484.55 696.79 604.42 677.24 C 597.17 638.73 589.27 600.34"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 581.85 561.85 C 503.33 567.41 424.89 574.31 346.38 579.86 C 343.09 557.68 338.91 535.64 335.49 513.47 C 403.82 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"511.01 472.15 508.27 540.49 506.20 C 546.07 508.39 552.09 508.49 558.00 508.33 C 578.43 509.70 598.90 509.83 619"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".33 511.32 C 624.96 539.15 630.91 566.92 636.22 594.82 C 654.16 593.42 672.03 591.20 689.93 589.34 C 698.55 623."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"65 706.05 658.24 714.33 692.63 C 714.88 694.44 715.74 696.15 716.55 697.87 L 716.31 697.92 C 712.09 698.66 707.9"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"1 699.66 703.70 700.44 C 687.57 703.45 671.37 706.23 655.43 710.15 C 506.40 738.72 357.65 768.80 208.66 797.55 C"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 208.15 793.52 207.66 789.50 207.13 785.49 C 196.62 713.31 186.29 641.13 175.69 568.97 C 172.05 543.84 168.25 51"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"8.72 164.97 493.55 C 164.86 492.95 164.65 491.74 164.54 491.13 Z' /><path fill='#030173' opacity='1.00' d=' M 49"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"1.14 609.06 C 493.10 608.85 495.06 608.66 497.03 608.49 C 499.31 623.04 502.81 637.37 504.76 651.98 C 457.05 658"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".09 409.45 665.07 361.75 671.24 C 359.06 655.39 356.39 639.54 353.85 623.66 C 399.57 618.48 445.38 613.96 491.14"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 609.06 Z' /></g><g id='#013f595d'><path fill='#013f59' opacity='0.36' d=' M 113.23 296.07 C 120.99 297.19 128.6"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"4 299.02 136.45 299.79 L 137.19 299.86 C 145.80 363.69 155.30 427.40 164.54 491.13 C 164.65 491.74 164.86 492.95"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 164.97 493.55 C 158.20 489.46 149.72 492.31 142.23 491.00 C 133.01 425.96 123.23 360.99 113.23 296.07 Z' /></g>"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"<g id='#00031421'><path fill='#000314' opacity='0.13' d=' M 26.27 404.22 C 49.11 407.31 71.67 412.76 94.36 417.0"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"1 C 106.51 501.94 118.83 586.83 131.22 671.71 C 119.43 672.04 107.63 671.85 95.83 672.05 C 104.85 734.73 114.39 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"797.35 123.99 859.95 C 208.96 846.09 293.95 832.31 378.82 817.88 C 377.72 810.86 376.25 803.91 374.89 796.94 C 4"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"23.61 787.37 472.34 777.86 521.05 768.20 C 522.88 776.78 524.63 785.38 527.09 793.81 C 539.03 791.74 551.02 789."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"90 562.98 787.94 C 564.47 787.52 567.43 787.26 566.98 785.04 C 565.81 776.63 562.95 768.56 561.72 760.16 C 565.4"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"2 759.54 569.11 758.83 572.78 758.02 C 575.64 774.80 580.61 791.17 583.86 807.90 C 576.28 809.90 568.52 811.06 5"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"60.86 812.70 C 413.96 841.53 267.05 870.38 120.15 899.24 C 112.85 900.50 105.69 902.60 98.27 903.07 C 74.21 736."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"80 50.05 570.54 26.27 404.22 Z' /></g><g id='#f87d03ff'><path fill='#f87d03' opacity='1.00' d=' M 770.80 465.98 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"C 790.94 465.84 811.07 465.46 831.20 465.56 C 843.81 521.71 857.58 577.56 870.74 633.57 C 851.28 636.51 831.94 6"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"40.28 812.43 642.90 C 808.04 621.15 802.63 599.61 798.16 577.87 C 762.08 581.64 726.01 585.53 689.93 589.34 C 67"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"2.03 591.20 654.16 593.42 636.22 594.82 C 630.91 566.92 624.96 539.15 619.33 511.32 C 616.67 496.61 613.42 482.0"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"2 610.35 467.40 C 615.57 467.44 620.79 467.36 626.02 467.31 C 638.26 467.09 650.51 467.25 662.75 467.02 C 669.85"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 466.89 676.97 466.51 684.07 466.80 C 685.65 466.48 685.88 468.36 686.24 469.42 C 691.95 496.52 697.63 523.64 70"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"3.57 550.70 C 731.75 548.79 759.90 546.24 788.09 544.48 C 782.87 518.20 776.45 492.17 770.80 465.98 Z' /></g><g "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"id='#febd04ff'><path fill='#febd04' opacity='1.00' d=' M 470.24 468.63 C 490.21 468.62 510.17 468.25 530.14 468."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"24 C 541.48 468.31 552.81 467.76 564.15 467.88 C 565.39 474.73 566.81 481.54 568.17 488.37 C 569.21 493.87 570.2"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"3 499.37 571.23 504.88 C 560.99 505.52 550.71 505.25 540.49 506.20 C 472.15 508.27 403.82 511.01 335.49 513.47 C"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 338.91 535.64 343.09 557.68 346.38 579.86 C 424.89 574.31 503.33 567.41 581.85 561.85 C 589.27 600.34 597.17 63"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"8.73 604.42 677.24 C 484.55 696.79 364.76 716.81 244.88 736.31 C 232.20 655.34 220.62 574.19 208.18 493.17 C 207"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".16 485.84 205.92 478.53 205.02 471.18 C 245.13 470.59 285.26 470.57 325.38 469.95 C 327.99 470.04 330.61 470.03"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>" 333.23 469.96 C 358.91 469.64 384.61 469.57 410.30 469.33 C 430.28 469.12 450.26 468.99 470.24 468.63 M 491.14 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"609.06 C 445.38 613.96 399.57 618.48 353.85 623.66 C 356.39 639.54 359.06 655.39 361.75 671.24 C 409.45 665.07 4"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"57.05 658.09 504.76 651.98 C 502.81 637.37 499.31 623.04 497.03 608.49 C 495.06 608.66 493.10 608.85 491.14 609."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"06 Z' /></g><g id='#5d470f6b'><path fill='#5d470f' opacity='0.42' d=' M 152.15 569.36 C 159.99 569.07 167.85 569"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>".55 175.69 568.97 C 186.29 641.13 196.62 713.31 207.13 785.49 C 199.88 787.27 192.48 788.35 185.06 789.13 C 180."</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"23 753.69 174.39 718.40 169.26 683.00 C 163.99 645.06 158.55 607.12 152.15 569.36 Z' /><path fill='#5d470f' opac"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"ity='0.42' d=' M 655.43 710.15 C 671.37 706.23 687.57 703.45 703.70 700.44 C 703.71 701.32 703.73 703.08 703.74 "</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>"703.95 C 692.18 705.88 680.61 707.76 669.06 709.73 C 664.56 710.47 659.89 711.72 655.43 710.15 Z'/></g></svg>"</nowiki>|#FFB100}}
{{Cl|DATA}} {{Text|<nowiki>""</nowiki>|#FFB100}}
{{CodeEnd}}





Revision as of 05:44, 25 September 2023

The _LOADIMAGE function loads an image into memory and returns valid LONG image handle values that are less than -1.


Syntax

handle& = _LOADIMAGE(fileName$[, [mode&][, requirements$]])


Parameters

  • filename$ is literal or variable STRING file name value.
  • Optional mode& LONG values can be:
    • 32 = 32-bit image.
    • 33 = 32-bit hardware image.
    • 256 = 8-bit (256 color) image using the QB64-PE master palette.
    • 257 = 8-bit (256 color) image using an adaptive palette.
  • Optional requirements$ STRING values can be a combination of (version 3.6.0 and up):
    • HARDWARE: Loads the image as a 32-bit hardware image. This can be used instead of mode 33 (above).
    • ADAPTIVE: Loads the image as an 8-bit (256 color) image using an adaptive palette. This can be used instead of mode 257 (above).
    • MEMORY: This will treat filename$ as a memory buffer containing the image file instead of a file name.
    • SXBR2: Applies the Super-xBR 2x pixel scaler on the image.
    • MMPX2: Applies the MMPX Style-Preserving 2x pixel scaler on the image.
    • HQ2XA: Applies the High Quality Cartoon 2x pixel scaler on the image.
    • HQ2XB: Applies the High Quality Complex 2x pixel scaler on the image.
    • HQ3XA: Applies the High Quality Cartoon 3x pixel scaler on the image.
    • HQ3XB: Applies the High Quality Complex 3x pixel scaler on the image.


Description

  • Image file formats JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC, PNM, PCX, SVG and QOI are supported. A path can also be given.
  • The mode& parameter can be 32, 33,256 or 257. Omit to use the current graphic screen settings.
  • Mode 33 images are hardware accelerated and are created using _LOADIMAGE or _COPYIMAGE (version 1.000 and up).
  • Mode 256 images are loaded using the QB64-PE master VGA palette. This is the same palette that is used for 256 color screens like SCREEN 13.
  • Mode 257 images are loaded using an adaptive palette making these images look better than mode 256 when used with 32-bit color screens (version 3.1.0 and up).
  • Loaded images can be read invisibly using POINT. Image coordinates start at 0 up to the _WIDTH - 1 and _HEIGHT - 1.
  • Images can be made into a program SCREEN or page adopting the size and palette settings or placed using _PUTIMAGE.
  • Returns -1 as an invalid handle if it can't load the image. Valid LONG handle returns are less than -1 (handle& < -1).
  • Valid images only need to be loaded once. The handle can be used repeatedly until freed.
  • Images are not deallocated when the SUB or FUNCTION they are created in ends. Free them with _FREEIMAGE.
  • Use the various pixel scalers to scale and load extremely low resolution (retro) graphics without blurring.

Errors

  • Some picture file images may not load when a mode& value is designated. Try loading it without a mode& designation.
  • It is important to free unused or discarded images with _FREEIMAGE to prevent CPU memory overflow errors.
  • In text-only SCREEN 0, mode& 32 must be specified. When loading an _ICON image use 32 for the mode& too.


Availability

  • Mode 33 was added in QB64 v1.0, which makes it also available in all QB64-PE versions.
  • Mode 257 was added in QB64-PE v3.1.0, hence it's not available in the original QB64 versions.
  • In QB64-PE v3.6.0 this function got a new optional parameter requirements$ and the ability to load image files from memory.
  • SVG and QOI support was added in QB64-PE v3.9.0.
  • Pixel scaler support was added in QB64-PE v3.9.0.


Examples

Example 1
To display an image in 32-bit color using its resolution as a program screen.
i& = _LOADIMAGE("mypic.jpg", 32)
SCREEN i&

Example 2
DRAWing and rotating an image 360 degrees using Turn Angle. POINT is used to read the invisible image source.
SCREEN _NEWIMAGE(800, 600, 32)
img& = _LOADIMAGE("QB64.PNG")                           'use any 24/32 bit image

wide% = _WIDTH(img&): deep% = _HEIGHT(img&)
TLC$ = "BL" + STR$(wide% \ 2) + "BU" + STR$(deep% \ 2)  'start draw at top left corner
RET$ = "BD BL" + STR$(wide%)                            'return to left side of image
_SOURCE img&
_DEST 0
DO
  FOR angle% = 0 TO 360 STEP 15
    CLS
    DRAW "BM400, 300" + "TA=" + VARPTR$(angle%) + TLC$
    FOR y = 0 TO deep% - 1
      FOR x = 0 TO wide% - 1
        DRAW "C" + STR$(POINT(x, y)) + "R1"            'color and DRAW each pixel
      NEXT
      DRAW RET$
    NEXT
    _DISPLAY                         'NOTE: CPU usage will be HIGH!
  NEXT
LOOP UNTIL INKEY$ > ""
Code by Ted Weissgerber

Example 3
Load and scale an image from memory and display it on the screen.
OPTION _EXPLICIT

DIM Bee& '                                               the image file
DIM cx%, cy% '                                           center x,y coordinate for image

RESTORE Data_tbee0_png_2314
Bee& = _LOADIMAGE(LoadResource, 32, "memory, hq3xa") '   load image file from memory and scale it using a pixel scaler
SCREEN _NEWIMAGE(640, 480, 32) '                         enter a graphics screen
CLS , _RGB32(127, 127, 127) '                            clear the screen with gray
LOCATE 2, 15 '                                           position text cursor
PRINT "An image loaded into memory and placed on the screen."
cx% = (640 - _WIDTH(Bee&)) \ 2 '                         calculate x center position
cy% = (480 - _HEIGHT(Bee&)) \ 2 '                        calculate y center position
_PUTIMAGE (cx%, cy%), Bee& '                             place image onto center of screen
SLEEP '                                                  wait for key stroke
_FREEIMAGE Bee& '                                        remove image from memory
SYSTEM '                                                 return to OS


Data_tbee0_png_2314:
DATA 2314,2988,-1
DATA eJx1VmdUU9kWDiihKDGEariKEKzUoV4FHWMgCYj0iVIVKeIocgNKiSCIkQuEZGBQRARxgCdNLNRQFYgE
DATA pGMARYOSCCqiSAkgUia8f28t3zrfPvtb31lnn732+bF3oqM9SV4OK4dAIORtyFbOYg+vmwxSvFt+tF0/
DATA QJ4+SrJCrK2vew0FaWJFFiK7hSIQKM66SdzUQakjEDLFNlZ414jhr3wPO6XjAPJ7V4D6yajg4eHaeQx/
DATA 7iqd7Pt2sNckOvBk8pNWtXNM5hOOmguzyMk3YSFCVqEeaS25T0YyLjYpFk23flFcKIp3biLzZgI1jjUe
DATA yriNaumc9Oye7DTKab9l/cprfEaYtZZ121hdEn1arRTCGXKa0NIEYDP1f0nLr0Qx+aVINfylyEl101GU
DATA w9uirxhQ0dLryI+G/ZemdqAEO1Al7V1d1hcu6C/zPjBovyt8IQIc/DpY4Qlp2/JEw12huF5G4dIR3owi
DATA CUu1ynOSlUDYLR7AMuNAyRAlDJOowCSObfNDwjM1trp4sFhhnrhQq0Ot/qKLPPCCWpe3uXr4aOp5PXxZ
DATA 5UZfnM1b9kUlb0FK2MMQWOdqYZ7Isu6wlYBN/bynlfj3TFXDgHfSm23+7JeR2PC6boF3+E5L7jR7TXL7
DATA /IAAPxW5PBCNKoIqstpJwbM+2lhGLx9CD33Z1PtHOCLb9Of7+XjKpCvisINvav3sf3KKfPbEjLw8of10
DATA EIW26HjrVr7F65I01NCI4MtLpwbqHhGHEEd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XU/rcaMO
DATA 0/JDoxNaFs+f25NGTThR8EyYcqjUjdMamtQsk5jgPzu72+WnCrEXWlQgt7JS7JGALjna/dWf0VHxfQtG
DATA 0YcZIKBUQIE2+t+RQsI3O2SzPVdJgEQxPk4OlwLOxeYveaOrXXb8smk3/Z+JgAC8lUkOW93AGx2tePu3
DATA 9ax4lEHYWNtbPTxyKu5fF0s/3Q==

' Convert a base64 string to a normal string
FUNCTION DecodeBase64$ (s AS STRING)
    CONST BASE64_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

    DIM AS STRING buffer, result
    DIM AS _UNSIGNED LONG i
    DIM AS _UNSIGNED _BYTE char1, char2, char3, char4

    FOR i = 1 TO LEN(s) STEP 4
        char1 = INSTR(BASE64_CHARACTERS, CHR$(ASC(s, i))) - 1
        char2 = INSTR(BASE64_CHARACTERS, CHR$(ASC(s, i + 1))) - 1
        char3 = INSTR(BASE64_CHARACTERS, CHR$(ASC(s, i + 2))) - 1
        char4 = INSTR(BASE64_CHARACTERS, CHR$(ASC(s, i + 3))) - 1
        buffer = CHR$(_SHL(char1, 2) OR _SHR(char2, 4)) + CHR$(_SHL(char2 AND 15, 4) OR _SHR(char3, 2)) + CHR$(_SHL(char3 AND 3, 6) OR char4)

        result = result + buffer
    NEXT

    ' Remove padding
    IF RIGHT$(s, 2) = "==" THEN
        result = LEFT$(result, LEN(result) - 2)
    ELSEIF RIGHT$(s, 1) = "=" THEN
        result = LEFT$(result, LEN(result) - 1)
    END IF

    DecodeBase64 = result
END FUNCTION


' Loads a binary file encoded with Bin2Data
' Usage:
'   1. Encode the binary file with Bin2Data
'   2. Include the file or it's contents
'   3. Load the file like so:
'       Restore label_generated_by_bin2data
'       Dim buffer As String
'       buffer = LoadResource   ' buffer will now hold the contents of the file
FUNCTION LoadResource$
    DIM AS _UNSIGNED LONG ogSize, resize
    DIM AS _BYTE isCompressed

    READ ogSize, resize, isCompressed ' read the header

    DIM AS STRING buffer, result

    ' Read the whole resource data
    DO WHILE LEN(result) < resize
        READ buffer
        result = result + buffer
    LOOP

    ' Decode the data
    buffer = DecodeBase64(result)

    ' Expand the data if needed
    IF isCompressed THEN
        result = _INFLATE$(buffer, ogSize)
    ELSE
        result = buffer
    END IF

    LoadResource = result
END FUNCTION
Adapted from example code by Terry Ritchie

Example 4
Load SVG vector graphics data from memory and display it on the screen.
OPTION _EXPLICIT
$RESIZE:SMOOTH

RESTORE svg_data

DIM AS STRING svg, buffer

DO
    READ buffer
    svg = svg + buffer
LOOP WHILE LEN(buffer) > 0

DIM img AS LONG: img = _LOADIMAGE(svg, 32, "memory")

SCREEN _NEWIMAGE(_WIDTH(img) \ 2, _HEIGHT(img) \ 2, 32)

_PUTIMAGE , img

END

svg_data:
DATA "<?xml version='1.0' encoding='UTF-8' ?><svg width='1000pt' height='1000pt' viewBox='0 0 1000 1000' version='1.1'"
DATA " xmlns='http://www.w3.org/2000/svg'><g id='#20170121'><path fill='#201701' opacity='0.13' d=' M 106.96 93.79 C 1"
DATA "04.15 93.03 108.51 90.01 108.73 92.72 C 108.29 92.99 107.41 93.52 106.96 93.79 Z' /><path fill='#201701' opacity"
DATA "='0.13' d=' M 95.83 672.05 C 107.63 671.85 119.43 672.04 131.22 671.71 C 139.42 727.72 147.68 783.74 155.45 839."
DATA "81 C 228.65 825.83 301.68 810.94 374.89 796.94 C 376.25 803.91 377.72 810.86 378.82 817.88 C 293.95 832.31 208.9"
DATA "6 846.09 123.99 859.95 C 114.39 797.35 104.85 734.73 95.83 672.05 Z' /><path fill='#201701' opacity='0.13' d=' M"
DATA " 521.05 768.20 C 534.58 765.42 548.14 762.73 561.72 760.16 C 562.95 768.56 565.81 776.63 566.98 785.04 C 567.43 "
DATA "787.26 564.47 787.52 562.98 787.94 C 551.02 789.90 539.03 791.74 527.09 793.81 C 524.63 785.38 522.88 776.78 521"
DATA ".05 768.20 Z' /></g><g id='#020092ff'><path fill='#020092' opacity='1.00' d=' M 106.96 93.79 C 107.41 93.52 108."
DATA "29 92.99 108.73 92.72 C 336.34 137.82 564.13 182.21 791.76 227.19 C 817.05 336.43 842.81 445.56 868.11 554.80 C "
DATA "868.62 557.35 869.19 559.88 869.87 562.39 C 878.00 595.95 885.78 629.60 893.49 663.25 C 834.46 674.50 775.55 686"
DATA ".43 716.55 697.87 C 715.74 696.15 714.88 694.44 714.33 692.63 C 706.05 658.24 698.55 623.65 689.93 589.34 C 726."
DATA "01 585.53 762.08 581.64 798.16 577.87 C 802.63 599.61 808.04 621.15 812.43 642.90 C 831.94 640.28 851.28 636.51 "
DATA "870.74 633.57 C 857.58 577.56 843.81 521.71 831.20 465.56 C 811.07 465.46 790.94 465.84 770.80 465.98 C 776.45 4"
DATA "92.17 782.87 518.20 788.09 544.48 C 759.90 546.24 731.75 548.79 703.57 550.70 C 697.63 523.64 691.95 496.52 686."
DATA "24 469.42 C 685.88 468.36 685.65 466.48 684.07 466.80 C 676.97 466.51 669.85 466.89 662.75 467.02 C 656.82 443.4"
DATA "4 651.75 419.64 645.92 396.03 C 702.40 398.45 758.87 401.46 815.37 403.38 C 811.57 385.34 807.31 367.38 802.84 3"
DATA "49.49 C 794.05 349.00 785.31 347.90 776.52 347.53 C 772.46 331.59 768.99 315.50 765.53 299.43 C 774.51 300.25 78"
DATA "3.40 301.81 792.39 302.49 C 788.94 284.70 784.17 267.20 780.48 249.46 C 706.88 236.49 633.33 223.26 559.66 210.7"
DATA "7 C 569.11 259.65 579.47 308.34 589.07 357.19 C 564.12 353.65 539.45 347.94 514.69 343.15 C 505.33 295.17 495.94"
DATA " 247.21 486.83 199.18 C 377.19 179.64 267.44 160.57 157.70 141.55 C 164.44 186.45 171.33 231.33 177.95 276.25 C "
DATA "162.60 274.65 147.62 270.60 132.39 268.14 C 132.34 267.86 132.25 267.29 132.20 267.01 C 123.70 209.29 115.52 151"
DATA ".50 106.96 93.79 Z' /><path fill='#020092' opacity='1.00' d=' M 283.57 200.46 C 330.37 207.33 377.13 214.50 423."
DATA "87 221.86 C 425.83 233.08 428.13 244.23 429.97 255.47 C 421.61 254.67 413.30 253.47 404.95 252.59 C 408.92 275.9"
DATA "4 413.79 299.15 417.42 322.56 C 378.33 315.91 339.58 307.18 300.55 300.13 L 299.94 300.03 C 294.61 266.82 288.66"
DATA " 233.70 283.57 200.46 Z' /><path fill='#020092' opacity='1.00' d=' M 639.80 254.69 C 669.80 258.62 699.63 263.89"
DATA " 729.58 268.25 C 731.57 279.41 734.82 290.30 736.55 301.51 C 708.29 298.65 680.19 294.41 651.99 291.05 C 650.07 "
DATA "290.67 646.84 290.96 646.71 288.28 C 644.49 277.06 641.65 265.97 639.80 254.69 Z' /><path fill='#020092' opacity"
DATA "='1.00' d=' M 137.19 299.86 C 152.41 301.91 167.55 304.72 182.61 307.71 C 186.47 330.64 189.44 353.71 193.25 376"
DATA ".64 C 203.45 376.73 213.62 377.76 223.83 377.87 C 226.98 406.33 232.57 434.48 237.00 462.75 C 263.64 464.66 290."
DATA "30 466.42 316.95 468.23 C 319.82 468.43 322.60 469.25 325.38 469.95 C 285.26 470.57 245.13 470.59 205.02 471.18 "
DATA "C 205.92 478.53 207.16 485.84 208.18 493.17 C 193.63 492.45 179.09 491.81 164.54 491.13 C 155.30 427.40 145.80 3"
DATA "63.69 137.19 299.86 Z' /><path fill='#020092' opacity='1.00' d=' M 305.04 329.95 C 330.62 334.17 356.13 338.88 3"
DATA "81.68 343.22 C 384.12 343.39 385.82 345.03 385.94 347.49 C 359.64 346.62 333.48 343.77 307.21 342.59 C 306.33 33"
DATA "8.41 305.67 334.18 305.04 329.95 Z' /><path fill='#020092' opacity='1.00' d=' M 655.68 329.67 C 685.52 332.13 71"
DATA "5.28 335.70 745.12 338.10 C 748.01 351.15 751.01 364.17 753.82 377.24 C 724.03 375.46 694.28 373.46 664.50 371.5"
DATA "1 C 661.43 357.59 658.50 343.64 655.68 329.67 Z' /><path fill='#020092' opacity='1.00' d=' M 519.38 367.56 C 527"
DATA ".41 366.68 535.18 369.59 543.07 370.60 C 559.90 373.13 576.52 377.27 593.48 378.82 C 594.60 383.72 595.66 388.63"
DATA " 596.53 393.59 C 608.25 394.98 620.07 394.35 631.81 395.53 C 633.51 406.66 636.94 417.43 639.00 428.50 C 631.56 "
DATA "429.00 624.36 426.58 616.95 426.62 C 619.52 440.27 622.86 453.78 626.02 467.31 C 620.79 467.36 615.57 467.44 610"
DATA ".35 467.40 C 613.42 482.02 616.67 496.61 619.33 511.32 C 598.90 509.83 578.43 509.70 558.00 508.33 C 552.09 508."
DATA "49 546.07 508.39 540.49 506.20 C 550.71 505.25 560.99 505.52 571.23 504.88 C 570.23 499.37 569.21 493.87 568.17 "
DATA "488.37 C 580.84 489.18 593.53 489.71 606.17 490.84 C 604.86 480.25 602.24 469.83 599.38 459.56 C 575.21 457.58 5"
DATA "51.12 454.48 526.93 452.96 C 528.02 458.05 529.15 463.13 530.14 468.24 C 510.17 468.25 490.21 468.62 470.24 468."
DATA "63 C 465.10 441.88 458.41 415.35 454.62 388.39 C 474.39 388.90 494.12 390.24 513.89 390.82 C 515.50 400.12 517.9"
DATA "3 409.26 519.54 418.56 C 543.68 422.11 567.95 424.84 592.16 428.00 C 591.09 419.01 588.76 410.23 586.52 401.49 C"
DATA " 565.61 398.13 544.54 395.64 523.76 391.54 C 522.82 383.45 520.78 375.56 519.38 367.56 Z' /><path fill='#020092'"
DATA " opacity='1.00' d=' M 324.73 424.74 C 350.47 424.78 376.21 425.51 401.94 426.00 C 404.12 440.54 407.23 454.95 41"
DATA "0.30 469.33 C 384.61 469.57 358.91 469.64 333.23 469.96 C 329.62 455.06 326.39 440.00 324.73 424.74 Z' /></g><g "
DATA "id='#00bbfdff'><path fill='#00bbfd' opacity='1.00' d=' M 157.70 141.55 C 267.44 160.57 377.19 179.64 486.83 199."
DATA "18 C 495.94 247.21 505.33 295.17 514.69 343.15 C 516.39 351.26 517.75 359.43 519.38 367.56 C 520.78 375.56 522.8"
DATA "2 383.45 523.76 391.54 C 520.48 391.09 517.18 390.95 513.89 390.82 C 494.12 390.24 474.39 388.90 454.62 388.39 C"
DATA " 445.78 387.51 436.88 387.63 428.02 387.22 C 430.24 400.30 433.11 413.27 435.06 426.40 C 424.02 426.45 412.98 42"
DATA "6.35 401.94 426.00 C 376.21 425.51 350.47 424.78 324.73 424.74 C 322.36 410.54 319.90 396.34 317.83 382.09 C 286"
DATA ".51 380.50 255.15 379.59 223.83 377.87 C 213.62 377.76 203.45 376.73 193.25 376.64 C 189.44 353.71 186.47 330.64"
DATA " 182.61 307.71 C 181.21 297.20 179.55 286.73 177.95 276.25 C 171.33 231.33 164.44 186.45 157.70 141.55 M 283.57 "
DATA "200.46 C 288.66 233.70 294.61 266.82 299.94 300.03 L 300.55 300.13 C 301.22 310.16 303.60 320.01 305.04 329.95 C"
DATA " 305.67 334.18 306.33 338.41 307.21 342.59 C 333.48 343.77 359.64 346.62 385.94 347.49 C 397.99 349.47 410.34 34"
DATA "8.78 422.47 350.29 C 421.27 340.97 419.38 331.74 417.42 322.56 C 413.79 299.15 408.92 275.94 404.95 252.59 C 413"
DATA ".30 253.47 421.61 254.67 429.97 255.47 C 428.13 244.23 425.83 233.08 423.87 221.86 C 377.13 214.50 330.37 207.33"
DATA " 283.57 200.46 Z' /></g><g id='#037efeff'><path fill='#037efe' opacity='1.00' d=' M 559.66 210.77 C 633.33 223.2"
DATA "6 706.88 236.49 780.48 249.46 C 784.17 267.20 788.94 284.70 792.39 302.49 C 783.40 301.81 774.51 300.25 765.53 2"
DATA "99.43 C 768.99 315.50 772.46 331.59 776.52 347.53 C 785.31 347.90 794.05 349.00 802.84 349.49 C 807.31 367.38 81"
DATA "1.57 385.34 815.37 403.38 C 758.87 401.46 702.40 398.45 645.92 396.03 C 641.22 395.75 636.51 395.69 631.81 395.5"
DATA "3 C 620.07 394.35 608.25 394.98 596.53 393.59 C 595.66 388.63 594.60 383.72 593.48 378.82 C 591.96 371.62 590.82"
DATA " 364.34 589.07 357.19 C 579.47 308.34 569.11 259.65 559.66 210.77 M 639.80 254.69 C 641.65 265.97 644.49 277.06 "
DATA "646.71 288.28 C 646.84 290.96 650.07 290.67 651.99 291.05 C 680.19 294.41 708.29 298.65 736.55 301.51 C 734.82 2"
DATA "90.30 731.57 279.41 729.58 268.25 C 699.63 263.89 669.80 258.62 639.80 254.69 M 655.68 329.67 C 658.50 343.64 66"
DATA "1.43 357.59 664.50 371.51 C 694.28 373.46 724.03 375.46 753.82 377.24 C 751.01 364.17 748.01 351.15 745.12 338.1"
DATA "0 C 715.28 335.70 685.52 332.13 655.68 329.67 Z' /></g><g id='#07063664'><path fill='#070636' opacity='0.39' d='"
DATA " M 71.29 255.81 C 91.75 258.62 111.74 264.36 132.20 267.01 C 132.25 267.29 132.34 267.86 132.39 268.14 C 133.72 "
DATA "278.69 135.54 289.18 136.45 299.79 C 128.64 299.02 120.99 297.19 113.23 296.07 C 123.23 360.99 133.01 425.96 142"
DATA ".23 491.00 C 149.72 492.31 158.20 489.46 164.97 493.55 C 168.25 518.72 172.05 543.84 175.69 568.97 C 167.85 569."
DATA "55 159.99 569.07 152.15 569.36 C 158.55 607.12 163.99 645.06 169.26 683.00 C 174.39 718.40 180.23 753.69 185.06 "
DATA "789.13 C 192.48 788.35 199.88 787.27 207.13 785.49 C 207.66 789.50 208.15 793.52 208.66 797.55 C 357.65 768.80 5"
DATA "06.40 738.72 655.43 710.15 C 659.89 711.72 664.56 710.47 669.06 709.73 C 680.61 707.76 692.18 705.88 703.74 703."
DATA "95 C 703.73 703.08 703.71 701.32 703.70 700.44 C 707.91 699.66 712.09 698.66 716.31 697.92 C 718.13 708.23 721.5"
DATA "8 718.20 722.99 728.60 C 672.87 738.14 622.82 748.08 572.78 758.02 C 569.11 758.83 565.42 759.54 561.72 760.16 C"
DATA " 548.14 762.73 534.58 765.42 521.05 768.20 C 472.34 777.86 423.61 787.37 374.89 796.94 C 301.68 810.94 228.65 82"
DATA "5.83 155.45 839.81 C 147.68 783.74 139.42 727.72 131.22 671.71 C 118.83 586.83 106.51 501.94 94.36 417.01 C 87.0"
DATA "5 363.24 78.74 309.58 71.29 255.81 Z' /><path fill='#070636' opacity='0.39' d=' M 868.11 554.80 C 869.53 557.08 "
DATA "869.90 559.74 869.87 562.39 C 869.19 559.88 868.62 557.35 868.11 554.80 Z' /></g><g id='#030173ff'><path fill='#"
DATA "030173' opacity='1.00' d=' M 132.39 268.14 C 147.62 270.60 162.60 274.65 177.95 276.25 C 179.55 286.73 181.21 29"
DATA "7.20 182.61 307.71 C 167.55 304.72 152.41 301.91 137.19 299.86 L 136.45 299.79 C 135.54 289.18 133.72 278.69 132"
DATA ".39 268.14 Z' /><path fill='#030173' opacity='1.00' d=' M 300.55 300.13 C 339.58 307.18 378.33 315.91 417.42 322"
DATA ".56 C 419.38 331.74 421.27 340.97 422.47 350.29 C 410.34 348.78 397.99 349.47 385.94 347.49 C 385.82 345.03 384."
DATA "12 343.39 381.68 343.22 C 356.13 338.88 330.62 334.17 305.04 329.95 C 303.60 320.01 301.22 310.16 300.55 300.13 "
DATA "Z' /><path fill='#030173' opacity='1.00' d=' M 514.69 343.15 C 539.45 347.94 564.12 353.65 589.07 357.19 C 590.8"
DATA "2 364.34 591.96 371.62 593.48 378.82 C 576.52 377.27 559.90 373.13 543.07 370.60 C 535.18 369.59 527.41 366.68 5"
DATA "19.38 367.56 C 517.75 359.43 516.39 351.26 514.69 343.15 Z' /><path fill='#030173' opacity='1.00' d=' M 223.83 3"
DATA "77.87 C 255.15 379.59 286.51 380.50 317.83 382.09 C 319.90 396.34 322.36 410.54 324.73 424.74 C 326.39 440.00 32"
DATA "9.62 455.06 333.23 469.96 C 330.61 470.03 327.99 470.04 325.38 469.95 C 322.60 469.25 319.82 468.43 316.95 468.2"
DATA "3 C 290.30 466.42 263.64 464.66 237.00 462.75 C 232.57 434.48 226.98 406.33 223.83 377.87 Z' /><path fill='#0301"
DATA "73' opacity='1.00' d=' M 428.02 387.22 C 436.88 387.63 445.78 387.51 454.62 388.39 C 458.41 415.35 465.10 441.88"
DATA " 470.24 468.63 C 450.26 468.99 430.28 469.12 410.30 469.33 C 407.23 454.95 404.12 440.54 401.94 426.00 C 412.98 "
DATA "426.35 424.02 426.45 435.06 426.40 C 433.11 413.27 430.24 400.30 428.02 387.22 Z' /><path fill='#030173' opacity"
DATA "='1.00' d=' M 513.89 390.82 C 517.18 390.95 520.48 391.09 523.76 391.54 C 544.54 395.64 565.61 398.13 586.52 401"
DATA ".49 C 588.76 410.23 591.09 419.01 592.16 428.00 C 567.95 424.84 543.68 422.11 519.54 418.56 C 517.93 409.26 515."
DATA "50 400.12 513.89 390.82 Z' /><path fill='#030173' opacity='1.00' d=' M 631.81 395.53 C 636.51 395.69 641.22 395."
DATA "75 645.92 396.03 C 651.75 419.64 656.82 443.44 662.75 467.02 C 650.51 467.25 638.26 467.09 626.02 467.31 C 622.8"
DATA "6 453.78 619.52 440.27 616.95 426.62 C 624.36 426.58 631.56 429.00 639.00 428.50 C 636.94 417.43 633.51 406.66 6"
DATA "31.81 395.53 Z' /><path fill='#030173' opacity='1.00' d=' M 526.93 452.96 C 551.12 454.48 575.21 457.58 599.38 4"
DATA "59.56 C 602.24 469.83 604.86 480.25 606.17 490.84 C 593.53 489.71 580.84 489.18 568.17 488.37 C 566.81 481.54 56"
DATA "5.39 474.73 564.15 467.88 C 552.81 467.76 541.48 468.31 530.14 468.24 C 529.15 463.13 528.02 458.05 526.93 452.9"
DATA "6 Z' /><path fill='#030173' opacity='1.00' d=' M 164.54 491.13 C 179.09 491.81 193.63 492.45 208.18 493.17 C 220"
DATA ".62 574.19 232.20 655.34 244.88 736.31 C 364.76 716.81 484.55 696.79 604.42 677.24 C 597.17 638.73 589.27 600.34"
DATA " 581.85 561.85 C 503.33 567.41 424.89 574.31 346.38 579.86 C 343.09 557.68 338.91 535.64 335.49 513.47 C 403.82 "
DATA "511.01 472.15 508.27 540.49 506.20 C 546.07 508.39 552.09 508.49 558.00 508.33 C 578.43 509.70 598.90 509.83 619"
DATA ".33 511.32 C 624.96 539.15 630.91 566.92 636.22 594.82 C 654.16 593.42 672.03 591.20 689.93 589.34 C 698.55 623."
DATA "65 706.05 658.24 714.33 692.63 C 714.88 694.44 715.74 696.15 716.55 697.87 L 716.31 697.92 C 712.09 698.66 707.9"
DATA "1 699.66 703.70 700.44 C 687.57 703.45 671.37 706.23 655.43 710.15 C 506.40 738.72 357.65 768.80 208.66 797.55 C"
DATA " 208.15 793.52 207.66 789.50 207.13 785.49 C 196.62 713.31 186.29 641.13 175.69 568.97 C 172.05 543.84 168.25 51"
DATA "8.72 164.97 493.55 C 164.86 492.95 164.65 491.74 164.54 491.13 Z' /><path fill='#030173' opacity='1.00' d=' M 49"
DATA "1.14 609.06 C 493.10 608.85 495.06 608.66 497.03 608.49 C 499.31 623.04 502.81 637.37 504.76 651.98 C 457.05 658"
DATA ".09 409.45 665.07 361.75 671.24 C 359.06 655.39 356.39 639.54 353.85 623.66 C 399.57 618.48 445.38 613.96 491.14"
DATA " 609.06 Z' /></g><g id='#013f595d'><path fill='#013f59' opacity='0.36' d=' M 113.23 296.07 C 120.99 297.19 128.6"
DATA "4 299.02 136.45 299.79 L 137.19 299.86 C 145.80 363.69 155.30 427.40 164.54 491.13 C 164.65 491.74 164.86 492.95"
DATA " 164.97 493.55 C 158.20 489.46 149.72 492.31 142.23 491.00 C 133.01 425.96 123.23 360.99 113.23 296.07 Z' /></g>"
DATA "<g id='#00031421'><path fill='#000314' opacity='0.13' d=' M 26.27 404.22 C 49.11 407.31 71.67 412.76 94.36 417.0"
DATA "1 C 106.51 501.94 118.83 586.83 131.22 671.71 C 119.43 672.04 107.63 671.85 95.83 672.05 C 104.85 734.73 114.39 "
DATA "797.35 123.99 859.95 C 208.96 846.09 293.95 832.31 378.82 817.88 C 377.72 810.86 376.25 803.91 374.89 796.94 C 4"
DATA "23.61 787.37 472.34 777.86 521.05 768.20 C 522.88 776.78 524.63 785.38 527.09 793.81 C 539.03 791.74 551.02 789."
DATA "90 562.98 787.94 C 564.47 787.52 567.43 787.26 566.98 785.04 C 565.81 776.63 562.95 768.56 561.72 760.16 C 565.4"
DATA "2 759.54 569.11 758.83 572.78 758.02 C 575.64 774.80 580.61 791.17 583.86 807.90 C 576.28 809.90 568.52 811.06 5"
DATA "60.86 812.70 C 413.96 841.53 267.05 870.38 120.15 899.24 C 112.85 900.50 105.69 902.60 98.27 903.07 C 74.21 736."
DATA "80 50.05 570.54 26.27 404.22 Z' /></g><g id='#f87d03ff'><path fill='#f87d03' opacity='1.00' d=' M 770.80 465.98 "
DATA "C 790.94 465.84 811.07 465.46 831.20 465.56 C 843.81 521.71 857.58 577.56 870.74 633.57 C 851.28 636.51 831.94 6"
DATA "40.28 812.43 642.90 C 808.04 621.15 802.63 599.61 798.16 577.87 C 762.08 581.64 726.01 585.53 689.93 589.34 C 67"
DATA "2.03 591.20 654.16 593.42 636.22 594.82 C 630.91 566.92 624.96 539.15 619.33 511.32 C 616.67 496.61 613.42 482.0"
DATA "2 610.35 467.40 C 615.57 467.44 620.79 467.36 626.02 467.31 C 638.26 467.09 650.51 467.25 662.75 467.02 C 669.85"
DATA " 466.89 676.97 466.51 684.07 466.80 C 685.65 466.48 685.88 468.36 686.24 469.42 C 691.95 496.52 697.63 523.64 70"
DATA "3.57 550.70 C 731.75 548.79 759.90 546.24 788.09 544.48 C 782.87 518.20 776.45 492.17 770.80 465.98 Z' /></g><g "
DATA "id='#febd04ff'><path fill='#febd04' opacity='1.00' d=' M 470.24 468.63 C 490.21 468.62 510.17 468.25 530.14 468."
DATA "24 C 541.48 468.31 552.81 467.76 564.15 467.88 C 565.39 474.73 566.81 481.54 568.17 488.37 C 569.21 493.87 570.2"
DATA "3 499.37 571.23 504.88 C 560.99 505.52 550.71 505.25 540.49 506.20 C 472.15 508.27 403.82 511.01 335.49 513.47 C"
DATA " 338.91 535.64 343.09 557.68 346.38 579.86 C 424.89 574.31 503.33 567.41 581.85 561.85 C 589.27 600.34 597.17 63"
DATA "8.73 604.42 677.24 C 484.55 696.79 364.76 716.81 244.88 736.31 C 232.20 655.34 220.62 574.19 208.18 493.17 C 207"
DATA ".16 485.84 205.92 478.53 205.02 471.18 C 245.13 470.59 285.26 470.57 325.38 469.95 C 327.99 470.04 330.61 470.03"
DATA " 333.23 469.96 C 358.91 469.64 384.61 469.57 410.30 469.33 C 430.28 469.12 450.26 468.99 470.24 468.63 M 491.14 "
DATA "609.06 C 445.38 613.96 399.57 618.48 353.85 623.66 C 356.39 639.54 359.06 655.39 361.75 671.24 C 409.45 665.07 4"
DATA "57.05 658.09 504.76 651.98 C 502.81 637.37 499.31 623.04 497.03 608.49 C 495.06 608.66 493.10 608.85 491.14 609."
DATA "06 Z' /></g><g id='#5d470f6b'><path fill='#5d470f' opacity='0.42' d=' M 152.15 569.36 C 159.99 569.07 167.85 569"
DATA ".55 175.69 568.97 C 186.29 641.13 196.62 713.31 207.13 785.49 C 199.88 787.27 192.48 788.35 185.06 789.13 C 180."
DATA "23 753.69 174.39 718.40 169.26 683.00 C 163.99 645.06 158.55 607.12 152.15 569.36 Z' /><path fill='#5d470f' opac"
DATA "ity='0.42' d=' M 655.43 710.15 C 671.37 706.23 687.57 703.45 703.70 700.44 C 703.71 701.32 703.73 703.08 703.74 "
DATA "703.95 C 692.18 705.88 680.61 707.76 669.06 709.73 C 664.56 710.47 659.89 711.72 655.43 710.15 Z'/></g></svg>"
DATA ""


More examples


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link