Mercurial > MadButterfly
changeset 283:7d106e4ef66d
Fix the compilation error of the inkscape
author | wycc@wycc-desktop |
---|---|
date | Sat, 31 Jan 2009 13:01:07 +0800 |
parents | 61aebecbb994 (current diff) 790f61272936 (diff) |
children | 046a02a93fd9 |
files | examples/dynamic/Makefile.am inkscape/Makefile |
diffstat | 45 files changed, 5227 insertions(+), 210 deletions(-) [+] |
line wrap: on
line diff
--- a/Doxyfile Sat Jan 31 12:54:13 2009 +0800 +++ b/Doxyfile Sat Jan 31 13:01:07 2009 +0800 @@ -534,7 +534,7 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = src include dox +INPUT = src tools include dox README.h COPYING.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
--- a/Doxyfile-sf Sat Jan 31 12:54:13 2009 +0800 +++ b/Doxyfile-sf Sat Jan 31 13:01:07 2009 +0800 @@ -534,7 +534,7 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = src include dox +INPUT = src tools include dox README.h COPYING.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
--- a/Makefile.am Sat Jan 31 12:54:13 2009 +0800 +++ b/Makefile.am Sat Jan 31 13:01:07 2009 +0800 @@ -1,4 +1,4 @@ -SUBDIRS = src include tools examples +SUBDIRS = src include tools examples inkscape pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libmbfly.pc -EXTRA_DIST = libmbfly.pc.in mb Doxyfile README.h +EXTRA_DIST = libmbfly.pc.in Doxyfile README.h
--- a/configure.ac Sat Jan 31 12:54:13 2009 +0800 +++ b/configure.ac Sat Jan 31 13:01:07 2009 +0800 @@ -13,7 +13,8 @@ AC_PROG_LIBTOOL # Checks for libraries. -PKG_CHECK_MODULES([cairo], [cairo >= 1.6], , AC_MSG_ERROR([cairo >= 1.6 not found])) +PKG_CHECK_MODULES([cairo], [cairo >= 0.22], , AC_MSG_ERROR([cairo >= 0.22 not found])) +PKG_CHECK_MODULES([pangocairo], [pangocairo >= 0.22], , AC_MSG_ERROR([pangocairo >= 0.22 not found])) # Checks for header files. AC_PATH_X @@ -44,5 +45,6 @@ examples/dynamic/Makefile src/Makefile include/Makefile + inkscape/Makefile tools/Makefile]) AC_OUTPUT
--- a/examples/calculator/Makefile.am Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/calculator/Makefile.am Sat Jan 31 13:01:07 2009 +0800 @@ -5,8 +5,8 @@ calc_SOURCES = main.c nodist_calc_SOURCES = calculator_scr.c calculator_scr.h -calc_CPPFLAGS = @cairo_CFLAGS@ $(INCLUDES) -calc_LDFLAGS = @cairo_LIBS@ +calc_CPPFLAGS = @pangocairo_CFLAGS@ $(INCLUDES) +calc_LDFLAGS = @pangocairo_LIBS@ calc_LDADD = $(top_builddir)/src/libmbfly.la BUILT_SOURCES = calculator_scr.c calculator_scr.h calculator_scr.mb CLEANFILES = calculator_scr.c calculator_scr.h calculator_scr.mb
--- a/examples/calculator/calculator_scr.svg Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/calculator/calculator_scr.svg Sat Jan 31 13:01:07 2009 +0800 @@ -509,9 +509,9 @@ style="font-size:28px;font-style:normal;font-weight:normal;fill:#008000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="36.939316" y="61.546173" - id="screen_text_u"><tspan + id="screen_text"><tspan sodipodi:role="line" - id="screen_text" + id="screen_text_u" x="36.939316" y="61.546173">0</tspan></text> <text @@ -519,7 +519,7 @@ style="font-size:14px;font-style:normal;font-weight:normal;fill:#008000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans Mono" x="71.767807" y="78.100266" - id="text2238"><tspan + id="2222"><tspan sodipodi:role="line" id="saved_text" x="71.767807"
--- a/examples/calculator/main.c Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/calculator/main.c Sat Jan 31 13:01:07 2009 +0800 @@ -66,8 +66,8 @@ rdman = X_MB_rdman(calc_data->rt); sprintf(buf, "%d%s", num, suffix); - sh_text_set_text(calc_data->code->screen_text, buf); - rdman_shape_changed(rdman, calc_data->code->screen_text); + sh_text_set_text(calc_data->code->screen_text_u, buf); + rdman_shape_changed(rdman, calc_data->code->screen_text_u); if(op == 'n') sprintf(buf, "None"); @@ -144,7 +144,7 @@ switch(evt->type) { case EVT_MOUSE_BUT_PRESS: - compute(calc_data, (coord_t *)evt->cur_tgt); + compute(calc_data, (coord_t *)evt->cur_tgt->obj); break; } }
--- a/examples/drag/Makefile.am Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/drag/Makefile.am Sat Jan 31 13:01:07 2009 +0800 @@ -5,8 +5,8 @@ ex1_SOURCES = main.c nodist_ex1_SOURCES = menu.c menu.h -ex1_CPPFLAGS = @cairo_CFLAGS@ -I$(top_srcdir) -ex1_LDFLAGS = @cairo_LIBS@ +ex1_CPPFLAGS = @pangocairo_CFLAGS@ -I$(top_srcdir) +ex1_LDFLAGS = @pangocairo_LIBS@ ex1_LDADD = $(top_builddir)/src/libmbfly.la BUILT_SOURCES = menu.c menu.h menu.mb CLEANFILES = menu.c menu.h menu.mb
--- a/examples/dynamic/Makefile.am Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/dynamic/Makefile.am Sat Jan 31 13:01:07 2009 +0800 @@ -14,15 +14,15 @@ dynamic_SOURCES = main.c mbapp.c mbapp.h mbbutton.c mbbutton.h nodist_dynamic_SOURCES = -CPPFLAGS = @cairo_CFLAGS@ $(INCLUDES) -dynamic_LDFLAGS = @cairo_LIBS@ +CPPFLAGS = @pangocairo_CFLAGS@ $(INCLUDES) +dynamic_LDFLAGS = @pangocairo_LIBS@ dynamic_LDADD = $(top_builddir)/src/libmbfly.la BUILT_SOURCES = CLEANFILES = menu.c menu.h menu.mb button.c button.h button.mb hello_SOURCES = hello.c mbapp.c mbapp.h -hello_LDFLAGS = @cairo_LIBS@ +hello_LDFLAGS = @pangocairo_LIBS@ hello_LDADD = $(top_builddir)/src/libmbfly.la
--- a/examples/dynamic/button.svg Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/dynamic/button.svg Sat Jan 31 13:01:07 2009 +0800 @@ -198,6 +198,20 @@ sodipodi:role="line">Click Me</tspan></text> </g> </g> + <text + xml:space="preserve" + style="font-size:24px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="160" + y="77.14286" + id="text2405"><tspan + sodipodi:role="line" + id="tspan2407" + x="160" + y="77.14286">s<tspan + style="font-size:32" + id="tspan2409">ssss<tspan + style="font-size:40" + id="tspan2411">sssss</tspan></tspan></tspan></text> </g> <g inkscape:groupmode="layer"
--- a/examples/dynamic/main.c Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/dynamic/main.c Sat Jan 31 13:01:07 2009 +0800 @@ -126,6 +126,11 @@ mb_button_add_onClick(b, test,NULL); } +void draw_text() +{ + +} + int main(int argc, char * const argv[]) { subject_t *subject; mb_obj_t *button; @@ -137,6 +142,7 @@ else myApp = MBApp_Init("scene"); data.currentscene=0; + draw_text(); MBApp_setData(myApp,&data); MyApp_InitContent(); get_now(&tmo);
--- a/examples/svg2code_ex/Makefile.am Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/svg2code_ex/Makefile.am Sat Jan 31 13:01:07 2009 +0800 @@ -1,12 +1,12 @@ include $(top_srcdir)/config.mk noinst_PROGRAMS = ex1 -EXTRA_DIST = svg2code_ex.svg +EXTRA_DIST = svg2code_ex.svg dsc_3241.png ex1_SOURCES = main.c nodist_ex1_SOURCES = svg2code_ex.c svg2code_ex.h -ex1_CPPFLAGS = @cairo_CFLAGS@ -I$(top_srcdir) -ex1_LDFLAGS = @cairo_LIBS@ +ex1_CPPFLAGS = @pangocairo_CFLAGS@ -I$(top_srcdir) +ex1_LDFLAGS = @pangocairo_LIBS@ ex1_LDADD = $(top_builddir)/src/libmbfly.la BUILT_SOURCES = svg2code_ex.c svg2code_ex.h svg2code_ex.mb CLEANFILES = svg2code_ex.c svg2code_ex.h svg2code_ex.mb
--- a/examples/svg2code_ex/svg2code_ex.svg Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/svg2code_ex/svg2code_ex.svg Sat Jan 31 13:01:07 2009 +0800 @@ -329,7 +329,7 @@ height="600px" showgrid="true" inkscape:window-width="822" - inkscape:window-height="695" + inkscape:window-height="721" inkscape:window-x="130" inkscape:window-y="120" /> <metadata @@ -415,6 +415,7 @@ </g> <g id="file_menu" + display="none" style="display:none"> <rect y="41.991447" @@ -442,9 +443,10 @@ id="tspan3136" sodipodi:role="line">test</tspan><tspan id="tspan3138" - y="106.36016" + y="118.32115" x="52.16227" - sodipodi:role="line">test</tspan></text> + sodipodi:role="line" + style="font-size:28px">test</tspan></text> </g> <path sodipodi:type="arc" @@ -457,7 +459,15 @@ d="M 723.62808,516.79651 A 98.944588,37.994728 0 1 1 549.36227,542.22385" sodipodi:start="5.5779634" sodipodi:end="9.4037459" - sodipodi:open="true" - transform="translate(0,-17.414248)" /> + sodipodi:open="true"/> + <image + y="87.316605" + x="605.409" + id="image2497" + height="130.90765" + width="100" + sodipodi:absref="/usr/home/thinker/progm/MadButterfly/examples/svg2code_ex/dsc_3241.png" + xlink:href="dsc_3241.png" /> + transform="translate(0,-17.414248)" /> </g> </svg>
--- a/examples/tank/Makefile.am Sat Jan 31 12:54:13 2009 +0800 +++ b/examples/tank/Makefile.am Sat Jan 31 13:01:07 2009 +0800 @@ -1,14 +1,14 @@ include $(top_srcdir)/config.mk noinst_PROGRAMS = tank -EXTRA_DIST = calculator_scr.svg +#EXTRA_DIST = svg_sources = brick.c bullet.c bush.c mud.c rock.c \ tank1.c tank2.c tank_en.c bang.c tank_SOURCES = tank_main.c nodist_tank_SOURCES = svgs.h \ $(svg_sources) $(svg_sources:.c=.h) $(svg_sources:.c=.mb) -tank_CPPFLAGS = @cairo_CFLAGS@ -tank_LDFLAGS = @cairo_LIBS@ +tank_CPPFLAGS = @pangocairo_CFLAGS@ +tank_LDFLAGS = @pangocairo_LIBS@ tank_LDADD = $(top_builddir)/src/libmbfly.la BUILT_SOURCES = svgs.h \ $(svg_sources) $(svg_sources:.c=.h) $(svg_sources:.c=.mb) @@ -23,7 +23,7 @@ $(svg_sources:.c=.mb): %.mb: $(srcdir)/%.svg $(top_srcdir)/tools/svg2code.py $? $@ - + svgs.h: $(svg_sources:.c=.h) echo "#ifndef __SVGS_H_" > $@ echo "#define __SVGS_H_" >> $@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/img/image_n_ldr.eps Sat Jan 31 13:01:07 2009 +0800 @@ -0,0 +1,3162 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: /usr/home/thinker/progm/MadButterfly/img/image_n_ldr.dia +%%Creator: Dia v0.96.1 +%%CreationDate: Sat Jan 24 15:22:20 2009 +%%For: thinker +%%Orientation: Portrait +%%Magnification: 1.0000 +%%BoundingBox: 0 0 887 248 +%%BeginSetup +%%EndSetup +%%EndComments +%%BeginProlog +[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright +/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one +/two /three /four /five /six /seven /eight /nine /colon /semicolon +/less /equal /greater /question /at /A /B /C /D /E +/F /G /H /I /J /K /L /M /N /O +/P /Q /R /S /T /U /V /W /X /Y +/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c +/d /e /f /g /h /i /j /k /l /m +/n /o /p /q /r /s /t /u /v /w +/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef +/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright +/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior +/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf +/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla +/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde +/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex +/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring +/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis +/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave +/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def +/cp {closepath} bind def +/c {curveto} bind def +/f {fill} bind def +/a {arc} bind def +/ef {eofill} bind def +/ex {exch} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth pop} bind def +/tr {translate} bind def + +/ellipsedict 8 dict def +ellipsedict /mtrx matrix put +/ellipse +{ ellipsedict begin + /endangle exch def + /startangle exch def + /yrad exch def + /xrad exch def + /y exch def + /x exch def /savematrix mtrx currentmatrix def + x y tr xrad yrad sc + 0 0 1 startangle endangle arc + savematrix setmatrix + end +} def + +/mergeprocs { +dup length +3 -1 roll +dup +length +dup +5 1 roll +3 -1 roll +add +array cvx +dup +3 -1 roll +0 exch +putinterval +dup +4 2 roll +putinterval +} bind def +/dpi_x 300 def +/dpi_y 300 def +/conicto { + /to_y exch def + /to_x exch def + /conic_cntrl_y exch def + /conic_cntrl_x exch def + currentpoint + /p0_y exch def + /p0_x exch def + /p1_x p0_x conic_cntrl_x p0_x sub 2 3 div mul add def + /p1_y p0_y conic_cntrl_y p0_y sub 2 3 div mul add def + /p2_x p1_x to_x p0_x sub 1 3 div mul add def + /p2_y p1_y to_y p0_y sub 1 3 div mul add def + p1_x p1_y p2_x p2_y to_x to_y curveto +} bind def +/start_ol { gsave 1.1 dpi_x div dup scale} bind def +/end_ol { closepath fill grestore } bind def +28.346000 -28.346000 scale +2.030000 -14.767128 translate +%%EndProlog + + +0.100000 slw +[] 0 sd +1.000000 1.000000 1.000000 srgb +n 14.300000 6.100000 m 14.300000 7.500000 l 22.500000 7.500000 l 22.500000 6.100000 l f +0.000000 0.000000 0.000000 srgb +n 14.300000 6.100000 m 14.300000 7.500000 l 22.500000 7.500000 l 22.500000 6.100000 l cp s +gsave 15.703750 7.100000 translate 0.035278 -0.035278 scale +start_ol +3219 2489 moveto +3400 2774 3649 2923 conicto +3898 3072 4196 3072 conicto +4710 3072 4979 2744 conicto +5248 2417 5248 1792 conicto +5248 0 lineto +4288 0 lineto +4288 1534 lineto +4291 1568 4292 1605 conicto +4293 1642 4293 1710 conicto +4293 2023 4200 2163 conicto +4107 2304 3900 2304 conicto +3628 2304 3480 2083 conicto +3333 1863 3328 1445 conicto +3328 0 lineto +2368 0 lineto +2368 1534 lineto +2368 2023 2283 2163 conicto +2198 2304 1980 2304 conicto +1706 2304 1557 2082 conicto +1408 1860 1408 1448 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2560 lineto +1584 2815 1811 2943 conicto +2039 3072 2314 3072 conicto +2622 3072 2859 2918 conicto +3096 2765 3219 2489 conicto +end_ol grestore +gsave 16.463038 7.100000 translate 0.035278 -0.035278 scale +start_ol +2019 640 moveto +2314 640 2469 861 conicto +2624 1083 2624 1504 conicto +2624 1925 2469 2146 conicto +2314 2368 2019 2368 conicto +1724 2368 1566 2145 conicto +1408 1923 1408 1504 conicto +1408 1085 1566 862 conicto +1724 640 2019 640 conicto +1408 2560 moveto +1604 2823 1843 2947 conicto +2082 3072 2393 3072 conicto +2942 3072 3295 2633 conicto +3648 2195 3648 1504 conicto +3648 813 3295 374 conicto +2942 -64 2393 -64 conicto +2082 -64 1843 60 conicto +1604 185 1408 448 conicto +1408 0 lineto +448 0 lineto +448 4160 lineto +1408 4160 lineto +1408 2560 lineto +end_ol grestore +gsave 16.985044 7.100000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 17.349698 7.100000 translate 0.035278 -0.035278 scale +start_ol +448 3008 moveto +1408 3008 lineto +1408 0 lineto +448 0 lineto +448 3008 lineto +448 4160 moveto +1408 4160 lineto +1408 3392 lineto +448 3392 lineto +448 4160 lineto +end_ol grestore +gsave 17.599465 7.100000 translate 0.035278 -0.035278 scale +start_ol +3219 2489 moveto +3400 2774 3649 2923 conicto +3898 3072 4196 3072 conicto +4710 3072 4979 2744 conicto +5248 2417 5248 1792 conicto +5248 0 lineto +4288 0 lineto +4288 1534 lineto +4291 1568 4292 1605 conicto +4293 1642 4293 1710 conicto +4293 2023 4200 2163 conicto +4107 2304 3900 2304 conicto +3628 2304 3480 2083 conicto +3333 1863 3328 1445 conicto +3328 0 lineto +2368 0 lineto +2368 1534 lineto +2368 2023 2283 2163 conicto +2198 2304 1980 2304 conicto +1706 2304 1557 2082 conicto +1408 1860 1408 1448 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2560 lineto +1584 2815 1811 2943 conicto +2039 3072 2314 3072 conicto +2622 3072 2859 2918 conicto +3096 2765 3219 2489 conicto +end_ol grestore +gsave 18.358753 7.100000 translate 0.035278 -0.035278 scale +start_ol +2496 512 moveto +2299 248 2062 124 conicto +1826 0 1514 0 conicto +969 0 612 433 conicto +256 867 256 1537 conicto +256 2211 612 2641 conicto +969 3072 1514 3072 conicto +1826 3072 2062 2948 conicto +2299 2825 2496 2560 conicto +2496 3008 lineto +3456 3008 lineto +3456 305 lineto +3456 -435 3005 -825 conicto +2554 -1216 1698 -1216 conicto +1420 -1216 1161 -1168 conicto +902 -1121 640 -1024 conicto +640 -256 lineto +887 -417 1124 -496 conicto +1361 -576 1601 -576 conicto +2064 -576 2280 -362 conicto +2496 -149 2496 305 conicto +2496 512 lineto +1887 2368 moveto +1600 2368 1440 2150 conicto +1280 1933 1280 1535 conicto +1280 1126 1435 915 conicto +1590 704 1887 704 conicto +2176 704 2336 921 conicto +2496 1139 2496 1535 conicto +2496 1933 2336 2150 conicto +2176 2368 1887 2368 conicto +end_ol grestore +gsave 18.880759 7.100000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 19.245413 7.100000 translate 0.035278 -0.035278 scale +start_ol +448 4160 moveto +1408 4160 lineto +1408 0 lineto +448 0 lineto +448 4160 lineto +end_ol grestore +gsave 19.495180 7.100000 translate 0.035278 -0.035278 scale +start_ol +2496 2560 moveto +2496 4160 lineto +3456 4160 lineto +3456 0 lineto +2496 0 lineto +2496 448 lineto +2299 183 2062 59 conicto +1826 -64 1514 -64 conicto +964 -64 610 374 conicto +256 813 256 1504 conicto +256 2195 610 2633 conicto +964 3072 1514 3072 conicto +1823 3072 2061 2947 conicto +2299 2823 2496 2560 conicto +1887 640 moveto +2184 640 2340 861 conicto +2496 1083 2496 1504 conicto +2496 1925 2340 2146 conicto +2184 2368 1887 2368 conicto +1592 2368 1436 2146 conicto +1280 1925 1280 1504 conicto +1280 1083 1436 861 conicto +1592 640 1887 640 conicto +end_ol grestore +gsave 20.017186 7.100000 translate 0.035278 -0.035278 scale +start_ol +2688 2176 moveto +2561 2241 2435 2272 conicto +2310 2304 2183 2304 conicto +1810 2304 1609 2064 conicto +1408 1825 1408 1378 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2496 lineto +1594 2796 1836 2934 conicto +2078 3072 2415 3072 conicto +2464 3072 2520 3068 conicto +2577 3065 2685 3053 conicto +2688 2176 lineto +end_ol grestore +gsave 20.376846 7.100000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 20.741499 7.100000 translate 0.035278 -0.035278 scale +start_ol +1536 3840 moveto +1536 3008 lineto +2560 3008 lineto +2560 2304 lineto +1536 2304 lineto +1536 1054 lineto +1536 849 1618 776 conicto +1700 704 1944 704 conicto +2432 704 lineto +2432 0 lineto +1618 0 lineto +1050 0 813 240 conicto +576 480 576 1054 conicto +576 2304 lineto +128 2304 lineto +128 3008 lineto +576 3008 lineto +576 3840 lineto +1536 3840 lineto +end_ol grestore +1.000000 1.000000 1.000000 srgb +n 14.300000 7.500000 m 14.300000 8.500000 l 22.500000 8.500000 l 22.500000 7.500000 l f +0.000000 0.000000 0.000000 srgb +n 14.300000 7.500000 m 14.300000 8.500000 l 22.500000 8.500000 l 22.500000 7.500000 l cp s +gsave 14.450000 8.142500 translate 0.035278 -0.035278 scale +start_ol +1536 2560 moveto +1536 1600 lineto +2496 1600 lineto +2496 1216 lineto +1536 1216 lineto +1536 256 lineto +1152 256 lineto +1152 1216 lineto +192 1216 lineto +192 1600 lineto +1152 1600 lineto +1152 2560 lineto +1536 2560 lineto +end_ol grestore +gsave 14.799672 8.142500 translate 0.035278 -0.035278 scale +start_ol +1344 850 moveto +1344 587 1440 453 conicto +1536 320 1723 320 conicto +2176 320 lineto +2176 0 lineto +1685 0 lineto +1339 0 1149 222 conicto +960 444 960 850 conicto +960 3008 lineto +192 3008 lineto +192 3328 lineto +1344 3328 lineto +1344 850 lineto +end_ol grestore +gsave 15.149343 8.142500 translate 0.035278 -0.035278 scale +start_ol +1343 2176 moveto +1060 2176 914 1934 conicto +768 1692 768 1216 conicto +768 743 914 499 conicto +1060 256 1343 256 conicto +1628 256 1774 499 conicto +1920 743 1920 1216 conicto +1920 1692 1774 1934 conicto +1628 2176 1343 2176 conicto +1343 2496 moveto +1841 2496 2104 2167 conicto +2368 1839 2368 1216 conicto +2368 591 2105 263 conicto +1843 -64 1343 -64 conicto +845 -64 582 263 conicto +320 591 320 1216 conicto +320 1839 582 2167 conicto +845 2496 1343 2496 conicto +end_ol grestore +gsave 15.499015 8.142500 translate 0.035278 -0.035278 scale +start_ol +1544 1216 moveto +1411 1216 lineto +1060 1216 882 1092 conicto +704 968 704 723 conicto +704 501 837 378 conicto +970 256 1206 256 conicto +1538 256 1728 487 conicto +1918 718 1920 1126 conicto +1920 1216 lineto +1544 1216 lineto +2304 1385 moveto +2304 0 lineto +1920 0 lineto +1920 346 lineto +1793 136 1599 36 conicto +1406 -64 1130 -64 conicto +760 -64 540 146 conicto +320 356 320 708 conicto +320 1114 589 1325 conicto +859 1536 1381 1536 conicto +1920 1536 lineto +1920 1599 lineto +1918 1902 1775 2039 conicto +1632 2176 1317 2176 conicto +1117 2176 911 2111 conicto +706 2046 512 1920 conicto +512 2304 lineto +729 2400 927 2448 conicto +1126 2496 1312 2496 conicto +1608 2496 1817 2406 conicto +2026 2317 2155 2137 conicto +2236 2028 2270 1867 conicto +2304 1706 2304 1385 conicto +end_ol grestore +gsave 15.848687 8.142500 translate 0.035278 -0.035278 scale +start_ol +1920 2145 moveto +1920 3328 lineto +2304 3328 lineto +2304 0 lineto +1920 0 lineto +1920 287 lineto +1816 116 1642 26 conicto +1469 -64 1243 -64 conicto +783 -64 519 279 conicto +256 622 256 1225 conicto +256 1819 521 2157 conicto +786 2496 1243 2496 conicto +1472 2496 1646 2406 conicto +1820 2316 1920 2145 conicto +704 1216 moveto +704 740 857 498 conicto +1010 256 1309 256 conicto +1608 256 1764 500 conicto +1920 745 1920 1216 conicto +1920 1689 1764 1932 conicto +1608 2176 1309 2176 conicto +1010 2176 857 1934 conicto +704 1692 704 1216 conicto +end_ol grestore +gsave 16.198358 8.142500 translate 0.035278 -0.035278 scale +start_ol +1856 3328 moveto +1598 2832 1471 2339 conicto +1344 1847 1344 1346 conicto +1344 848 1471 354 conicto +1598 -140 1856 -640 conicto +1546 -640 lineto +1218 -122 1057 368 conicto +896 859 896 1346 conicto +896 1831 1057 2323 conicto +1218 2815 1546 3328 conicto +1856 3328 lineto +end_ol grestore +gsave 16.548030 8.142500 translate 0.035278 -0.035278 scale +start_ol +832 3328 moveto +1142 3328 lineto +1470 2815 1631 2323 conicto +1792 1831 1792 1346 conicto +1792 857 1631 365 conicto +1470 -127 1142 -640 conicto +832 -640 lineto +1090 -135 1217 358 conicto +1344 852 1344 1346 conicto +1344 1842 1217 2336 conicto +1090 2830 832 3328 conicto +end_ol grestore +gsave 16.897702 8.142500 translate 0.035278 -0.035278 scale +start_ol +1024 2304 moveto +1536 2304 lineto +1536 1664 lineto +1024 1664 lineto +1024 2304 lineto +1024 640 moveto +1536 640 lineto +1536 0 lineto +1024 0 lineto +1024 640 lineto +end_ol grestore +gsave 17.247373 8.142500 translate 0.035278 -0.035278 scale +start_ol +end_ol grestore +gsave 17.597045 8.142500 translate 0.035278 -0.035278 scale +start_ol +1470 2202 moveto +1541 2352 1651 2424 conicto +1761 2496 1916 2496 conicto +2199 2496 2315 2270 conicto +2432 2045 2432 1422 conicto +2432 0 lineto +2048 0 lineto +2048 1405 lineto +2048 1924 1996 2050 conicto +1944 2176 1808 2176 conicto +1651 2176 1593 2041 conicto +1536 1907 1536 1405 conicto +1536 0 lineto +1152 0 lineto +1152 1405 lineto +1152 1931 1096 2053 conicto +1040 2176 895 2176 conicto +752 2176 696 2041 conicto +640 1907 640 1405 conicto +640 0 lineto +256 0 lineto +256 2432 lineto +640 2432 lineto +640 2238 lineto +708 2364 811 2430 conicto +914 2496 1045 2496 conicto +1202 2496 1307 2423 conicto +1412 2350 1470 2202 conicto +end_ol grestore +gsave 17.946717 8.142500 translate 0.035278 -0.035278 scale +start_ol +2048 1216 moveto +2048 1692 1895 1934 conicto +1742 2176 1443 2176 conicto +1142 2176 987 1932 conicto +832 1689 832 1216 conicto +832 745 987 500 conicto +1142 256 1443 256 conicto +1742 256 1895 498 conicto +2048 740 2048 1216 conicto +832 2145 moveto +932 2314 1107 2405 conicto +1283 2496 1513 2496 conicto +1971 2496 2233 2157 conicto +2496 1819 2496 1225 conicto +2496 622 2232 279 conicto +1969 -64 1509 -64 conicto +1283 -64 1109 26 conicto +936 116 832 287 conicto +832 0 lineto +448 0 lineto +448 3328 lineto +832 3328 lineto +832 2145 lineto +end_ol grestore +gsave 18.296388 8.142500 translate 0.035278 -0.035278 scale +start_ol +2240 -704 moveto +2240 -1024 lineto +0 -1024 lineto +0 -704 lineto +2240 -704 lineto +end_ol grestore +gsave 18.646060 8.142500 translate 0.035278 -0.035278 scale +start_ol +512 2432 moveto +1536 2432 lineto +1536 320 lineto +2304 320 lineto +2304 0 lineto +384 0 lineto +384 320 lineto +1152 320 lineto +1152 2112 lineto +512 2112 lineto +512 2432 lineto +1152 3328 moveto +1536 3328 lineto +1536 2816 lineto +1152 2816 lineto +1152 3328 lineto +end_ol grestore +gsave 18.995732 8.142500 translate 0.035278 -0.035278 scale +start_ol +1470 2202 moveto +1541 2352 1651 2424 conicto +1761 2496 1916 2496 conicto +2199 2496 2315 2270 conicto +2432 2045 2432 1422 conicto +2432 0 lineto +2048 0 lineto +2048 1405 lineto +2048 1924 1996 2050 conicto +1944 2176 1808 2176 conicto +1651 2176 1593 2041 conicto +1536 1907 1536 1405 conicto +1536 0 lineto +1152 0 lineto +1152 1405 lineto +1152 1931 1096 2053 conicto +1040 2176 895 2176 conicto +752 2176 696 2041 conicto +640 1907 640 1405 conicto +640 0 lineto +256 0 lineto +256 2432 lineto +640 2432 lineto +640 2238 lineto +708 2364 811 2430 conicto +914 2496 1045 2496 conicto +1202 2496 1307 2423 conicto +1412 2350 1470 2202 conicto +end_ol grestore +gsave 19.345404 8.142500 translate 0.035278 -0.035278 scale +start_ol +1920 1250 moveto +1920 1704 1768 1940 conicto +1617 2176 1327 2176 conicto +1023 2176 863 1940 conicto +704 1704 704 1250 conicto +704 796 864 558 conicto +1025 320 1331 320 conicto +1617 320 1768 559 conicto +1920 798 1920 1250 conicto +2304 167 moveto +2304 -356 2035 -626 conicto +1767 -896 1246 -896 conicto +1074 -896 886 -863 conicto +699 -831 512 -768 conicto +512 -384 lineto +738 -482 923 -529 conicto +1108 -576 1262 -576 conicto +1606 -576 1763 -411 conicto +1920 -247 1920 111 conicto +1920 128 lineto +1920 392 lineto +1820 194 1648 97 conicto +1476 0 1229 0 conicto +786 0 521 339 conicto +256 679 256 1247 conicto +256 1817 521 2156 conicto +786 2496 1229 2496 conicto +1474 2496 1644 2407 conicto +1814 2318 1920 2132 conicto +1920 2432 lineto +2304 2432 lineto +2304 167 lineto +end_ol grestore +gsave 19.695075 8.142500 translate 0.035278 -0.035278 scale +start_ol +2240 -704 moveto +2240 -1024 lineto +0 -1024 lineto +0 -704 lineto +2240 -704 lineto +end_ol grestore +gsave 20.044747 8.142500 translate 0.035278 -0.035278 scale +start_ol +1920 2145 moveto +1920 3328 lineto +2304 3328 lineto +2304 0 lineto +1920 0 lineto +1920 287 lineto +1816 116 1642 26 conicto +1469 -64 1243 -64 conicto +783 -64 519 279 conicto +256 622 256 1225 conicto +256 1819 521 2157 conicto +786 2496 1243 2496 conicto +1472 2496 1646 2406 conicto +1820 2316 1920 2145 conicto +704 1216 moveto +704 740 857 498 conicto +1010 256 1309 256 conicto +1608 256 1764 500 conicto +1920 745 1920 1216 conicto +1920 1689 1764 1932 conicto +1608 2176 1309 2176 conicto +1010 2176 857 1934 conicto +704 1692 704 1216 conicto +end_ol grestore +gsave 20.394419 8.142500 translate 0.035278 -0.035278 scale +start_ol +1544 1216 moveto +1411 1216 lineto +1060 1216 882 1092 conicto +704 968 704 723 conicto +704 501 837 378 conicto +970 256 1206 256 conicto +1538 256 1728 487 conicto +1918 718 1920 1126 conicto +1920 1216 lineto +1544 1216 lineto +2304 1385 moveto +2304 0 lineto +1920 0 lineto +1920 346 lineto +1793 136 1599 36 conicto +1406 -64 1130 -64 conicto +760 -64 540 146 conicto +320 356 320 708 conicto +320 1114 589 1325 conicto +859 1536 1381 1536 conicto +1920 1536 lineto +1920 1599 lineto +1918 1902 1775 2039 conicto +1632 2176 1317 2176 conicto +1117 2176 911 2111 conicto +706 2046 512 1920 conicto +512 2304 lineto +729 2400 927 2448 conicto +1126 2496 1312 2496 conicto +1608 2496 1817 2406 conicto +2026 2317 2155 2137 conicto +2236 2028 2270 1867 conicto +2304 1706 2304 1385 conicto +end_ol grestore +gsave 20.744090 8.142500 translate 0.035278 -0.035278 scale +start_ol +1280 3136 moveto +1280 2432 lineto +2176 2432 lineto +2176 2112 lineto +1280 2112 lineto +1280 799 lineto +1280 531 1380 425 conicto +1481 320 1732 320 conicto +2176 320 lineto +2176 0 lineto +1694 0 lineto +1256 0 1076 179 conicto +896 359 896 799 conicto +896 2112 lineto +256 2112 lineto +256 2432 lineto +896 2432 lineto +896 3136 lineto +1280 3136 lineto +end_ol grestore +gsave 21.093762 8.142500 translate 0.035278 -0.035278 scale +start_ol +1544 1216 moveto +1411 1216 lineto +1060 1216 882 1092 conicto +704 968 704 723 conicto +704 501 837 378 conicto +970 256 1206 256 conicto +1538 256 1728 487 conicto +1918 718 1920 1126 conicto +1920 1216 lineto +1544 1216 lineto +2304 1385 moveto +2304 0 lineto +1920 0 lineto +1920 346 lineto +1793 136 1599 36 conicto +1406 -64 1130 -64 conicto +760 -64 540 146 conicto +320 356 320 708 conicto +320 1114 589 1325 conicto +859 1536 1381 1536 conicto +1920 1536 lineto +1920 1599 lineto +1918 1902 1775 2039 conicto +1632 2176 1317 2176 conicto +1117 2176 911 2111 conicto +706 2046 512 1920 conicto +512 2304 lineto +729 2400 927 2448 conicto +1126 2496 1312 2496 conicto +1608 2496 1817 2406 conicto +2026 2317 2155 2137 conicto +2236 2028 2270 1867 conicto +2304 1706 2304 1385 conicto +end_ol grestore +gsave 21.443434 8.142500 translate 0.035278 -0.035278 scale +start_ol +2240 -704 moveto +2240 -1024 lineto +0 -1024 lineto +0 -704 lineto +2240 -704 lineto +end_ol grestore +gsave 21.793105 8.142500 translate 0.035278 -0.035278 scale +start_ol +1280 3136 moveto +1280 2432 lineto +2176 2432 lineto +2176 2112 lineto +1280 2112 lineto +1280 799 lineto +1280 531 1380 425 conicto +1481 320 1732 320 conicto +2176 320 lineto +2176 0 lineto +1694 0 lineto +1256 0 1076 179 conicto +896 359 896 799 conicto +896 2112 lineto +256 2112 lineto +256 2432 lineto +896 2432 lineto +896 3136 lineto +1280 3136 lineto +end_ol grestore +0.100000 slw +[] 0 sd +1.000000 1.000000 1.000000 srgb +n -1.980000 7.220000 m -1.980000 8.620000 l 9.020000 8.620000 l 9.020000 7.220000 l f +0.000000 0.000000 0.000000 srgb +n -1.980000 7.220000 m -1.980000 8.620000 l 9.020000 8.620000 l 9.020000 7.220000 l cp s +gsave 0.641250 8.220000 translate 0.035278 -0.035278 scale +start_ol +2688 2176 moveto +2561 2241 2435 2272 conicto +2310 2304 2183 2304 conicto +1810 2304 1609 2064 conicto +1408 1825 1408 1378 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2496 lineto +1594 2796 1836 2934 conicto +2078 3072 2415 3072 conicto +2464 3072 2520 3068 conicto +2577 3065 2685 3053 conicto +2688 2176 lineto +end_ol grestore +gsave 1.000910 8.220000 translate 0.035278 -0.035278 scale +start_ol +3456 1482 moveto +3456 1216 lineto +1216 1216 lineto +1251 896 1461 736 conicto +1671 576 2048 576 conicto +2353 576 2672 671 conicto +2991 767 3328 960 conicto +3328 192 lineto +2988 65 2648 0 conicto +2309 -64 1970 -64 conicto +1157 -64 706 348 conicto +256 760 256 1504 conicto +256 2235 696 2653 conicto +1137 3072 1909 3072 conicto +2612 3072 3034 2639 conicto +3456 2206 3456 1482 conicto +2496 1792 moveto +2496 2080 2333 2256 conicto +2171 2432 1909 2432 conicto +1625 2432 1448 2267 conicto +1271 2102 1227 1792 conicto +2496 1792 lineto +end_ol grestore +gsave 1.495441 8.220000 translate 0.035278 -0.035278 scale +start_ol +2496 2560 moveto +2496 4160 lineto +3456 4160 lineto +3456 0 lineto +2496 0 lineto +2496 448 lineto +2299 183 2062 59 conicto +1826 -64 1514 -64 conicto +964 -64 610 374 conicto +256 813 256 1504 conicto +256 2195 610 2633 conicto +964 3072 1514 3072 conicto +1823 3072 2061 2947 conicto +2299 2823 2496 2560 conicto +1887 640 moveto +2184 640 2340 861 conicto +2496 1083 2496 1504 conicto +2496 1925 2340 2146 conicto +2184 2368 1887 2368 conicto +1592 2368 1436 2146 conicto +1280 1925 1280 1504 conicto +1280 1083 1436 861 conicto +1592 640 1887 640 conicto +end_ol grestore +gsave 2.017447 8.220000 translate 0.035278 -0.035278 scale +start_ol +2688 2176 moveto +2561 2241 2435 2272 conicto +2310 2304 2183 2304 conicto +1810 2304 1609 2064 conicto +1408 1825 1408 1378 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2496 lineto +1594 2796 1836 2934 conicto +2078 3072 2415 3072 conicto +2464 3072 2520 3068 conicto +2577 3065 2685 3053 conicto +2688 2176 lineto +end_ol grestore +gsave 2.377107 8.220000 translate 0.035278 -0.035278 scale +start_ol +1847 1344 moveto +1533 1344 1374 1245 conicto +1216 1146 1216 953 conicto +1216 776 1343 676 conicto +1471 576 1698 576 conicto +1981 576 2174 764 conicto +2368 953 2368 1237 conicto +2368 1344 lineto +1847 1344 lineto +3328 1709 moveto +3328 0 lineto +2368 0 lineto +2368 448 lineto +2171 180 1925 58 conicto +1679 -64 1326 -64 conicto +850 -64 553 206 conicto +256 476 256 907 conicto +256 1431 623 1675 conicto +991 1920 1777 1920 conicto +2368 1920 lineto +2368 1992 lineto +2368 2220 2183 2326 conicto +1999 2432 1608 2432 conicto +1291 2432 1018 2368 conicto +746 2304 512 2176 conicto +512 2880 lineto +826 2974 1143 3023 conicto +1460 3072 1777 3072 conicto +2599 3072 2963 2751 conicto +3328 2431 3328 1709 conicto +end_ol grestore +gsave 2.869141 8.220000 translate 0.035278 -0.035278 scale +start_ol +192 3008 moveto +1122 3008 lineto +1624 935 lineto +2129 3008 lineto +2927 3008 lineto +3430 956 lineto +3934 3008 lineto +4864 3008 lineto +4076 0 lineto +3032 0 lineto +2527 2068 lineto +2024 0 lineto +980 0 lineto +192 3008 lineto +end_ol grestore +gsave 3.543506 8.220000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 3.908160 8.220000 translate 0.035278 -0.035278 scale +start_ol +3219 2489 moveto +3400 2774 3649 2923 conicto +3898 3072 4196 3072 conicto +4710 3072 4979 2744 conicto +5248 2417 5248 1792 conicto +5248 0 lineto +4288 0 lineto +4288 1534 lineto +4291 1568 4292 1605 conicto +4293 1642 4293 1710 conicto +4293 2023 4200 2163 conicto +4107 2304 3900 2304 conicto +3628 2304 3480 2083 conicto +3333 1863 3328 1445 conicto +3328 0 lineto +2368 0 lineto +2368 1534 lineto +2368 2023 2283 2163 conicto +2198 2304 1980 2304 conicto +1706 2304 1557 2082 conicto +1408 1860 1408 1448 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2560 lineto +1584 2815 1811 2943 conicto +2039 3072 2314 3072 conicto +2622 3072 2859 2918 conicto +3096 2765 3219 2489 conicto +end_ol grestore +gsave 4.667448 8.220000 translate 0.035278 -0.035278 scale +start_ol +1847 1344 moveto +1533 1344 1374 1245 conicto +1216 1146 1216 953 conicto +1216 776 1343 676 conicto +1471 576 1698 576 conicto +1981 576 2174 764 conicto +2368 953 2368 1237 conicto +2368 1344 lineto +1847 1344 lineto +3328 1709 moveto +3328 0 lineto +2368 0 lineto +2368 448 lineto +2171 180 1925 58 conicto +1679 -64 1326 -64 conicto +850 -64 553 206 conicto +256 476 256 907 conicto +256 1431 623 1675 conicto +991 1920 1777 1920 conicto +2368 1920 lineto +2368 1992 lineto +2368 2220 2183 2326 conicto +1999 2432 1608 2432 conicto +1291 2432 1018 2368 conicto +746 2304 512 2176 conicto +512 2880 lineto +826 2974 1143 3023 conicto +1460 3072 1777 3072 conicto +2599 3072 2963 2751 conicto +3328 2431 3328 1709 conicto +end_ol grestore +gsave 5.159482 8.220000 translate 0.035278 -0.035278 scale +start_ol +3456 1792 moveto +3456 0 lineto +2496 0 lineto +2496 292 lineto +2496 1371 lineto +2496 1752 2478 1896 conicto +2461 2041 2419 2110 conicto +2363 2202 2267 2253 conicto +2171 2304 2048 2304 conicto +1749 2304 1578 2077 conicto +1408 1850 1408 1448 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2560 lineto +1624 2823 1866 2947 conicto +2109 3072 2403 3072 conicto +2920 3072 3188 2744 conicto +3456 2417 3456 1792 conicto +end_ol grestore +gsave 5.678991 8.220000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 6.043645 8.220000 translate 0.035278 -0.035278 scale +start_ol +1536 3840 moveto +1536 3008 lineto +2560 3008 lineto +2560 2304 lineto +1536 2304 lineto +1536 1054 lineto +1536 849 1618 776 conicto +1700 704 1944 704 conicto +2432 704 lineto +2432 0 lineto +1618 0 lineto +1050 0 813 240 conicto +576 480 576 1054 conicto +576 2304 lineto +128 2304 lineto +128 3008 lineto +576 3008 lineto +576 3840 lineto +1536 3840 lineto +end_ol grestore +1.000000 1.000000 1.000000 srgb +n -1.980000 8.620000 m -1.980000 9.620000 l 9.020000 9.620000 l 9.020000 8.620000 l f +0.000000 0.000000 0.000000 srgb +n -1.980000 8.620000 m -1.980000 9.620000 l 9.020000 9.620000 l 9.020000 8.620000 l cp s +gsave -1.830000 9.262500 translate 0.035278 -0.035278 scale +start_ol +1536 2560 moveto +1536 1600 lineto +2496 1600 lineto +2496 1216 lineto +1536 1216 lineto +1536 256 lineto +1152 256 lineto +1152 1216 lineto +192 1216 lineto +192 1600 lineto +1152 1600 lineto +1152 2560 lineto +1536 2560 lineto +end_ol grestore +gsave -1.480328 9.262500 translate 0.035278 -0.035278 scale +start_ol +2496 1984 moveto +2366 2051 2231 2081 conicto +2096 2112 1935 2112 conicto +1554 2112 1353 1888 conicto +1152 1665 1152 1243 conicto +1152 0 lineto +768 0 lineto +768 2432 lineto +1152 2432 lineto +1152 2001 lineto +1254 2240 1465 2368 conicto +1676 2496 1965 2496 conicto +2116 2496 2246 2465 conicto +2377 2434 2496 2368 conicto +2496 1984 lineto +end_ol grestore +gsave -1.130657 9.262500 translate 0.035278 -0.035278 scale +start_ol +1920 2145 moveto +1920 3328 lineto +2304 3328 lineto +2304 0 lineto +1920 0 lineto +1920 287 lineto +1816 116 1642 26 conicto +1469 -64 1243 -64 conicto +783 -64 519 279 conicto +256 622 256 1225 conicto +256 1819 521 2157 conicto +786 2496 1243 2496 conicto +1472 2496 1646 2406 conicto +1820 2316 1920 2145 conicto +704 1216 moveto +704 740 857 498 conicto +1010 256 1309 256 conicto +1608 256 1764 500 conicto +1920 745 1920 1216 conicto +1920 1689 1764 1932 conicto +1608 2176 1309 2176 conicto +1010 2176 857 1934 conicto +704 1692 704 1216 conicto +end_ol grestore +gsave -0.780985 9.262500 translate 0.035278 -0.035278 scale +start_ol +1470 2202 moveto +1541 2352 1651 2424 conicto +1761 2496 1916 2496 conicto +2199 2496 2315 2270 conicto +2432 2045 2432 1422 conicto +2432 0 lineto +2048 0 lineto +2048 1405 lineto +2048 1924 1996 2050 conicto +1944 2176 1808 2176 conicto +1651 2176 1593 2041 conicto +1536 1907 1536 1405 conicto +1536 0 lineto +1152 0 lineto +1152 1405 lineto +1152 1931 1096 2053 conicto +1040 2176 895 2176 conicto +752 2176 696 2041 conicto +640 1907 640 1405 conicto +640 0 lineto +256 0 lineto +256 2432 lineto +640 2432 lineto +640 2238 lineto +708 2364 811 2430 conicto +914 2496 1045 2496 conicto +1202 2496 1307 2423 conicto +1412 2350 1470 2202 conicto +end_ol grestore +gsave -0.431313 9.262500 translate 0.035278 -0.035278 scale +start_ol +1544 1216 moveto +1411 1216 lineto +1060 1216 882 1092 conicto +704 968 704 723 conicto +704 501 837 378 conicto +970 256 1206 256 conicto +1538 256 1728 487 conicto +1918 718 1920 1126 conicto +1920 1216 lineto +1544 1216 lineto +2304 1385 moveto +2304 0 lineto +1920 0 lineto +1920 346 lineto +1793 136 1599 36 conicto +1406 -64 1130 -64 conicto +760 -64 540 146 conicto +320 356 320 708 conicto +320 1114 589 1325 conicto +859 1536 1381 1536 conicto +1920 1536 lineto +1920 1599 lineto +1918 1902 1775 2039 conicto +1632 2176 1317 2176 conicto +1117 2176 911 2111 conicto +706 2046 512 1920 conicto +512 2304 lineto +729 2400 927 2448 conicto +1126 2496 1312 2496 conicto +1608 2496 1817 2406 conicto +2026 2317 2155 2137 conicto +2236 2028 2270 1867 conicto +2304 1706 2304 1385 conicto +end_ol grestore +gsave -0.081642 9.262500 translate 0.035278 -0.035278 scale +start_ol +2304 1530 moveto +2304 0 lineto +1920 0 lineto +1920 1530 lineto +1920 1863 1801 2019 conicto +1683 2176 1431 2176 conicto +1143 2176 987 1974 conicto +832 1773 832 1396 conicto +832 0 lineto +448 0 lineto +448 2432 lineto +832 2432 lineto +832 2099 lineto +939 2294 1123 2395 conicto +1307 2496 1559 2496 conicto +1934 2496 2119 2256 conicto +2304 2016 2304 1530 conicto +end_ol grestore +gsave 0.268030 9.262500 translate 0.035278 -0.035278 scale +start_ol +2240 -704 moveto +2240 -1024 lineto +0 -1024 lineto +0 -704 lineto +2240 -704 lineto +end_ol grestore +gsave 0.617702 9.262500 translate 0.035278 -0.035278 scale +start_ol +512 2432 moveto +1536 2432 lineto +1536 320 lineto +2304 320 lineto +2304 0 lineto +384 0 lineto +384 320 lineto +1152 320 lineto +1152 2112 lineto +512 2112 lineto +512 2432 lineto +1152 3328 moveto +1536 3328 lineto +1536 2816 lineto +1152 2816 lineto +1152 3328 lineto +end_ol grestore +gsave 0.967373 9.262500 translate 0.035278 -0.035278 scale +start_ol +1470 2202 moveto +1541 2352 1651 2424 conicto +1761 2496 1916 2496 conicto +2199 2496 2315 2270 conicto +2432 2045 2432 1422 conicto +2432 0 lineto +2048 0 lineto +2048 1405 lineto +2048 1924 1996 2050 conicto +1944 2176 1808 2176 conicto +1651 2176 1593 2041 conicto +1536 1907 1536 1405 conicto +1536 0 lineto +1152 0 lineto +1152 1405 lineto +1152 1931 1096 2053 conicto +1040 2176 895 2176 conicto +752 2176 696 2041 conicto +640 1907 640 1405 conicto +640 0 lineto +256 0 lineto +256 2432 lineto +640 2432 lineto +640 2238 lineto +708 2364 811 2430 conicto +914 2496 1045 2496 conicto +1202 2496 1307 2423 conicto +1412 2350 1470 2202 conicto +end_ol grestore +gsave 1.317045 9.262500 translate 0.035278 -0.035278 scale +start_ol +1920 1250 moveto +1920 1704 1768 1940 conicto +1617 2176 1327 2176 conicto +1023 2176 863 1940 conicto +704 1704 704 1250 conicto +704 796 864 558 conicto +1025 320 1331 320 conicto +1617 320 1768 559 conicto +1920 798 1920 1250 conicto +2304 167 moveto +2304 -356 2035 -626 conicto +1767 -896 1246 -896 conicto +1074 -896 886 -863 conicto +699 -831 512 -768 conicto +512 -384 lineto +738 -482 923 -529 conicto +1108 -576 1262 -576 conicto +1606 -576 1763 -411 conicto +1920 -247 1920 111 conicto +1920 128 lineto +1920 392 lineto +1820 194 1648 97 conicto +1476 0 1229 0 conicto +786 0 521 339 conicto +256 679 256 1247 conicto +256 1817 521 2156 conicto +786 2496 1229 2496 conicto +1474 2496 1644 2407 conicto +1814 2318 1920 2132 conicto +1920 2432 lineto +2304 2432 lineto +2304 167 lineto +end_ol grestore +gsave 1.666717 9.262500 translate 0.035278 -0.035278 scale +start_ol +2240 -704 moveto +2240 -1024 lineto +0 -1024 lineto +0 -704 lineto +2240 -704 lineto +end_ol grestore +gsave 2.016388 9.262500 translate 0.035278 -0.035278 scale +start_ol +1344 850 moveto +1344 587 1440 453 conicto +1536 320 1723 320 conicto +2176 320 lineto +2176 0 lineto +1685 0 lineto +1339 0 1149 222 conicto +960 444 960 850 conicto +960 3008 lineto +192 3008 lineto +192 3328 lineto +1344 3328 lineto +1344 850 lineto +end_ol grestore +gsave 2.366060 9.262500 translate 0.035278 -0.035278 scale +start_ol +1920 2145 moveto +1920 3328 lineto +2304 3328 lineto +2304 0 lineto +1920 0 lineto +1920 287 lineto +1816 116 1642 26 conicto +1469 -64 1243 -64 conicto +783 -64 519 279 conicto +256 622 256 1225 conicto +256 1819 521 2157 conicto +786 2496 1243 2496 conicto +1472 2496 1646 2406 conicto +1820 2316 1920 2145 conicto +704 1216 moveto +704 740 857 498 conicto +1010 256 1309 256 conicto +1608 256 1764 500 conicto +1920 745 1920 1216 conicto +1920 1689 1764 1932 conicto +1608 2176 1309 2176 conicto +1010 2176 857 1934 conicto +704 1692 704 1216 conicto +end_ol grestore +gsave 2.715732 9.262500 translate 0.035278 -0.035278 scale +start_ol +2496 1984 moveto +2366 2051 2231 2081 conicto +2096 2112 1935 2112 conicto +1554 2112 1353 1888 conicto +1152 1665 1152 1243 conicto +1152 0 lineto +768 0 lineto +768 2432 lineto +1152 2432 lineto +1152 2001 lineto +1254 2240 1465 2368 conicto +1676 2496 1965 2496 conicto +2116 2496 2246 2465 conicto +2377 2434 2496 2368 conicto +2496 1984 lineto +end_ol grestore +gsave 3.065404 9.262500 translate 0.035278 -0.035278 scale +start_ol +1856 3328 moveto +1598 2832 1471 2339 conicto +1344 1847 1344 1346 conicto +1344 848 1471 354 conicto +1598 -140 1856 -640 conicto +1546 -640 lineto +1218 -122 1057 368 conicto +896 859 896 1346 conicto +896 1831 1057 2323 conicto +1218 2815 1546 3328 conicto +1856 3328 lineto +end_ol grestore +gsave 3.415075 9.262500 translate 0.035278 -0.035278 scale +start_ol +832 3328 moveto +1142 3328 lineto +1470 2815 1631 2323 conicto +1792 1831 1792 1346 conicto +1792 857 1631 365 conicto +1470 -127 1142 -640 conicto +832 -640 lineto +1090 -135 1217 358 conicto +1344 852 1344 1346 conicto +1344 1842 1217 2336 conicto +1090 2830 832 3328 conicto +end_ol grestore +gsave 3.764747 9.262500 translate 0.035278 -0.035278 scale +start_ol +1024 2304 moveto +1536 2304 lineto +1536 1664 lineto +1024 1664 lineto +1024 2304 lineto +1024 640 moveto +1536 640 lineto +1536 0 lineto +1024 0 lineto +1024 640 lineto +end_ol grestore +gsave 4.114419 9.262500 translate 0.035278 -0.035278 scale +start_ol +end_ol grestore +gsave 4.464090 9.262500 translate 0.035278 -0.035278 scale +start_ol +1470 2202 moveto +1541 2352 1651 2424 conicto +1761 2496 1916 2496 conicto +2199 2496 2315 2270 conicto +2432 2045 2432 1422 conicto +2432 0 lineto +2048 0 lineto +2048 1405 lineto +2048 1924 1996 2050 conicto +1944 2176 1808 2176 conicto +1651 2176 1593 2041 conicto +1536 1907 1536 1405 conicto +1536 0 lineto +1152 0 lineto +1152 1405 lineto +1152 1931 1096 2053 conicto +1040 2176 895 2176 conicto +752 2176 696 2041 conicto +640 1907 640 1405 conicto +640 0 lineto +256 0 lineto +256 2432 lineto +640 2432 lineto +640 2238 lineto +708 2364 811 2430 conicto +914 2496 1045 2496 conicto +1202 2496 1307 2423 conicto +1412 2350 1470 2202 conicto +end_ol grestore +gsave 4.813762 9.262500 translate 0.035278 -0.035278 scale +start_ol +2048 1216 moveto +2048 1692 1895 1934 conicto +1742 2176 1443 2176 conicto +1142 2176 987 1932 conicto +832 1689 832 1216 conicto +832 745 987 500 conicto +1142 256 1443 256 conicto +1742 256 1895 498 conicto +2048 740 2048 1216 conicto +832 2145 moveto +932 2314 1107 2405 conicto +1283 2496 1513 2496 conicto +1971 2496 2233 2157 conicto +2496 1819 2496 1225 conicto +2496 622 2232 279 conicto +1969 -64 1509 -64 conicto +1283 -64 1109 26 conicto +936 116 832 287 conicto +832 0 lineto +448 0 lineto +448 3328 lineto +832 3328 lineto +832 2145 lineto +end_ol grestore +gsave 5.163434 9.262500 translate 0.035278 -0.035278 scale +start_ol +2240 -704 moveto +2240 -1024 lineto +0 -1024 lineto +0 -704 lineto +2240 -704 lineto +end_ol grestore +gsave 5.513105 9.262500 translate 0.035278 -0.035278 scale +start_ol +512 2432 moveto +1536 2432 lineto +1536 320 lineto +2304 320 lineto +2304 0 lineto +384 0 lineto +384 320 lineto +1152 320 lineto +1152 2112 lineto +512 2112 lineto +512 2432 lineto +1152 3328 moveto +1536 3328 lineto +1536 2816 lineto +1152 2816 lineto +1152 3328 lineto +end_ol grestore +gsave 5.862777 9.262500 translate 0.035278 -0.035278 scale +start_ol +1470 2202 moveto +1541 2352 1651 2424 conicto +1761 2496 1916 2496 conicto +2199 2496 2315 2270 conicto +2432 2045 2432 1422 conicto +2432 0 lineto +2048 0 lineto +2048 1405 lineto +2048 1924 1996 2050 conicto +1944 2176 1808 2176 conicto +1651 2176 1593 2041 conicto +1536 1907 1536 1405 conicto +1536 0 lineto +1152 0 lineto +1152 1405 lineto +1152 1931 1096 2053 conicto +1040 2176 895 2176 conicto +752 2176 696 2041 conicto +640 1907 640 1405 conicto +640 0 lineto +256 0 lineto +256 2432 lineto +640 2432 lineto +640 2238 lineto +708 2364 811 2430 conicto +914 2496 1045 2496 conicto +1202 2496 1307 2423 conicto +1412 2350 1470 2202 conicto +end_ol grestore +gsave 6.212449 9.262500 translate 0.035278 -0.035278 scale +start_ol +1920 1250 moveto +1920 1704 1768 1940 conicto +1617 2176 1327 2176 conicto +1023 2176 863 1940 conicto +704 1704 704 1250 conicto +704 796 864 558 conicto +1025 320 1331 320 conicto +1617 320 1768 559 conicto +1920 798 1920 1250 conicto +2304 167 moveto +2304 -356 2035 -626 conicto +1767 -896 1246 -896 conicto +1074 -896 886 -863 conicto +699 -831 512 -768 conicto +512 -384 lineto +738 -482 923 -529 conicto +1108 -576 1262 -576 conicto +1606 -576 1763 -411 conicto +1920 -247 1920 111 conicto +1920 128 lineto +1920 392 lineto +1820 194 1648 97 conicto +1476 0 1229 0 conicto +786 0 521 339 conicto +256 679 256 1247 conicto +256 1817 521 2156 conicto +786 2496 1229 2496 conicto +1474 2496 1644 2407 conicto +1814 2318 1920 2132 conicto +1920 2432 lineto +2304 2432 lineto +2304 167 lineto +end_ol grestore +gsave 6.562120 9.262500 translate 0.035278 -0.035278 scale +start_ol +2240 -704 moveto +2240 -1024 lineto +0 -1024 lineto +0 -704 lineto +2240 -704 lineto +end_ol grestore +gsave 6.911792 9.262500 translate 0.035278 -0.035278 scale +start_ol +1344 850 moveto +1344 587 1440 453 conicto +1536 320 1723 320 conicto +2176 320 lineto +2176 0 lineto +1685 0 lineto +1339 0 1149 222 conicto +960 444 960 850 conicto +960 3008 lineto +192 3008 lineto +192 3328 lineto +1344 3328 lineto +1344 850 lineto +end_ol grestore +gsave 7.261464 9.262500 translate 0.035278 -0.035278 scale +start_ol +1920 2145 moveto +1920 3328 lineto +2304 3328 lineto +2304 0 lineto +1920 0 lineto +1920 287 lineto +1816 116 1642 26 conicto +1469 -64 1243 -64 conicto +783 -64 519 279 conicto +256 622 256 1225 conicto +256 1819 521 2157 conicto +786 2496 1243 2496 conicto +1472 2496 1646 2406 conicto +1820 2316 1920 2145 conicto +704 1216 moveto +704 740 857 498 conicto +1010 256 1309 256 conicto +1608 256 1764 500 conicto +1920 745 1920 1216 conicto +1920 1689 1764 1932 conicto +1608 2176 1309 2176 conicto +1010 2176 857 1934 conicto +704 1692 704 1216 conicto +end_ol grestore +gsave 7.611135 9.262500 translate 0.035278 -0.035278 scale +start_ol +2496 1984 moveto +2366 2051 2231 2081 conicto +2096 2112 1935 2112 conicto +1554 2112 1353 1888 conicto +1152 1665 1152 1243 conicto +1152 0 lineto +768 0 lineto +768 2432 lineto +1152 2432 lineto +1152 2001 lineto +1254 2240 1465 2368 conicto +1676 2496 1965 2496 conicto +2116 2496 2246 2465 conicto +2377 2434 2496 2368 conicto +2496 1984 lineto +end_ol grestore +gsave 7.960807 9.262500 translate 0.035278 -0.035278 scale +start_ol +2240 -704 moveto +2240 -1024 lineto +0 -1024 lineto +0 -704 lineto +2240 -704 lineto +end_ol grestore +gsave 8.310479 9.262500 translate 0.035278 -0.035278 scale +start_ol +1280 3136 moveto +1280 2432 lineto +2176 2432 lineto +2176 2112 lineto +1280 2112 lineto +1280 799 lineto +1280 531 1380 425 conicto +1481 320 1732 320 conicto +2176 320 lineto +2176 0 lineto +1694 0 lineto +1256 0 1076 179 conicto +896 359 896 799 conicto +896 2112 lineto +256 2112 lineto +256 2432 lineto +896 2432 lineto +896 3136 lineto +1280 3136 lineto +end_ol grestore +0.100000 slw +[] 0 sd +1.000000 1.000000 1.000000 srgb +n 22.590000 9.440000 m 22.590000 10.840000 l 29.207500 10.840000 l 29.207500 9.440000 l f +0.000000 0.000000 0.000000 srgb +n 22.590000 9.440000 m 22.590000 10.840000 l 29.207500 10.840000 l 29.207500 9.440000 l cp s +gsave 22.840000 10.440000 translate 0.035278 -0.035278 scale +start_ol +3219 2489 moveto +3400 2774 3649 2923 conicto +3898 3072 4196 3072 conicto +4710 3072 4979 2744 conicto +5248 2417 5248 1792 conicto +5248 0 lineto +4288 0 lineto +4288 1534 lineto +4291 1568 4292 1605 conicto +4293 1642 4293 1710 conicto +4293 2023 4200 2163 conicto +4107 2304 3900 2304 conicto +3628 2304 3480 2083 conicto +3333 1863 3328 1445 conicto +3328 0 lineto +2368 0 lineto +2368 1534 lineto +2368 2023 2283 2163 conicto +2198 2304 1980 2304 conicto +1706 2304 1557 2082 conicto +1408 1860 1408 1448 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2560 lineto +1584 2815 1811 2943 conicto +2039 3072 2314 3072 conicto +2622 3072 2859 2918 conicto +3096 2765 3219 2489 conicto +end_ol grestore +gsave 23.599288 10.440000 translate 0.035278 -0.035278 scale +start_ol +2019 640 moveto +2314 640 2469 861 conicto +2624 1083 2624 1504 conicto +2624 1925 2469 2146 conicto +2314 2368 2019 2368 conicto +1724 2368 1566 2145 conicto +1408 1923 1408 1504 conicto +1408 1085 1566 862 conicto +1724 640 2019 640 conicto +1408 2560 moveto +1604 2823 1843 2947 conicto +2082 3072 2393 3072 conicto +2942 3072 3295 2633 conicto +3648 2195 3648 1504 conicto +3648 813 3295 374 conicto +2942 -64 2393 -64 conicto +2082 -64 1843 60 conicto +1604 185 1408 448 conicto +1408 0 lineto +448 0 lineto +448 4160 lineto +1408 4160 lineto +1408 2560 lineto +end_ol grestore +gsave 24.121294 10.440000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 24.485948 10.440000 translate 0.035278 -0.035278 scale +start_ol +448 3008 moveto +1408 3008 lineto +1408 0 lineto +448 0 lineto +448 3008 lineto +448 4160 moveto +1408 4160 lineto +1408 3392 lineto +448 3392 lineto +448 4160 lineto +end_ol grestore +gsave 24.735715 10.440000 translate 0.035278 -0.035278 scale +start_ol +3219 2489 moveto +3400 2774 3649 2923 conicto +3898 3072 4196 3072 conicto +4710 3072 4979 2744 conicto +5248 2417 5248 1792 conicto +5248 0 lineto +4288 0 lineto +4288 1534 lineto +4291 1568 4292 1605 conicto +4293 1642 4293 1710 conicto +4293 2023 4200 2163 conicto +4107 2304 3900 2304 conicto +3628 2304 3480 2083 conicto +3333 1863 3328 1445 conicto +3328 0 lineto +2368 0 lineto +2368 1534 lineto +2368 2023 2283 2163 conicto +2198 2304 1980 2304 conicto +1706 2304 1557 2082 conicto +1408 1860 1408 1448 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2560 lineto +1584 2815 1811 2943 conicto +2039 3072 2314 3072 conicto +2622 3072 2859 2918 conicto +3096 2765 3219 2489 conicto +end_ol grestore +gsave 25.495003 10.440000 translate 0.035278 -0.035278 scale +start_ol +2496 512 moveto +2299 248 2062 124 conicto +1826 0 1514 0 conicto +969 0 612 433 conicto +256 867 256 1537 conicto +256 2211 612 2641 conicto +969 3072 1514 3072 conicto +1826 3072 2062 2948 conicto +2299 2825 2496 2560 conicto +2496 3008 lineto +3456 3008 lineto +3456 305 lineto +3456 -435 3005 -825 conicto +2554 -1216 1698 -1216 conicto +1420 -1216 1161 -1168 conicto +902 -1121 640 -1024 conicto +640 -256 lineto +887 -417 1124 -496 conicto +1361 -576 1601 -576 conicto +2064 -576 2280 -362 conicto +2496 -149 2496 305 conicto +2496 512 lineto +1887 2368 moveto +1600 2368 1440 2150 conicto +1280 1933 1280 1535 conicto +1280 1126 1435 915 conicto +1590 704 1887 704 conicto +2176 704 2336 921 conicto +2496 1139 2496 1535 conicto +2496 1933 2336 2150 conicto +2176 2368 1887 2368 conicto +end_ol grestore +gsave 26.017009 10.440000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 26.381663 10.440000 translate 0.035278 -0.035278 scale +start_ol +2496 2560 moveto +2496 4160 lineto +3456 4160 lineto +3456 0 lineto +2496 0 lineto +2496 448 lineto +2299 183 2062 59 conicto +1826 -64 1514 -64 conicto +964 -64 610 374 conicto +256 813 256 1504 conicto +256 2195 610 2633 conicto +964 3072 1514 3072 conicto +1823 3072 2061 2947 conicto +2299 2823 2496 2560 conicto +1887 640 moveto +2184 640 2340 861 conicto +2496 1083 2496 1504 conicto +2496 1925 2340 2146 conicto +2184 2368 1887 2368 conicto +1592 2368 1436 2146 conicto +1280 1925 1280 1504 conicto +1280 1083 1436 861 conicto +1592 640 1887 640 conicto +end_ol grestore +gsave 26.903669 10.440000 translate 0.035278 -0.035278 scale +start_ol +1847 1344 moveto +1533 1344 1374 1245 conicto +1216 1146 1216 953 conicto +1216 776 1343 676 conicto +1471 576 1698 576 conicto +1981 576 2174 764 conicto +2368 953 2368 1237 conicto +2368 1344 lineto +1847 1344 lineto +3328 1709 moveto +3328 0 lineto +2368 0 lineto +2368 448 lineto +2171 180 1925 58 conicto +1679 -64 1326 -64 conicto +850 -64 553 206 conicto +256 476 256 907 conicto +256 1431 623 1675 conicto +991 1920 1777 1920 conicto +2368 1920 lineto +2368 1992 lineto +2368 2220 2183 2326 conicto +1999 2432 1608 2432 conicto +1291 2432 1018 2368 conicto +746 2304 512 2176 conicto +512 2880 lineto +826 2974 1143 3023 conicto +1460 3072 1777 3072 conicto +2599 3072 2963 2751 conicto +3328 2431 3328 1709 conicto +end_ol grestore +gsave 27.395703 10.440000 translate 0.035278 -0.035278 scale +start_ol +1536 3840 moveto +1536 3008 lineto +2560 3008 lineto +2560 2304 lineto +1536 2304 lineto +1536 1054 lineto +1536 849 1618 776 conicto +1700 704 1944 704 conicto +2432 704 lineto +2432 0 lineto +1618 0 lineto +1050 0 813 240 conicto +576 480 576 1054 conicto +576 2304 lineto +128 2304 lineto +128 3008 lineto +576 3008 lineto +576 3840 lineto +1536 3840 lineto +end_ol grestore +gsave 27.745375 10.440000 translate 0.035278 -0.035278 scale +start_ol +1847 1344 moveto +1533 1344 1374 1245 conicto +1216 1146 1216 953 conicto +1216 776 1343 676 conicto +1471 576 1698 576 conicto +1981 576 2174 764 conicto +2368 953 2368 1237 conicto +2368 1344 lineto +1847 1344 lineto +3328 1709 moveto +3328 0 lineto +2368 0 lineto +2368 448 lineto +2171 180 1925 58 conicto +1679 -64 1326 -64 conicto +850 -64 553 206 conicto +256 476 256 907 conicto +256 1431 623 1675 conicto +991 1920 1777 1920 conicto +2368 1920 lineto +2368 1992 lineto +2368 2220 2183 2326 conicto +1999 2432 1608 2432 conicto +1291 2432 1018 2368 conicto +746 2304 512 2176 conicto +512 2880 lineto +826 2974 1143 3023 conicto +1460 3072 1777 3072 conicto +2599 3072 2963 2751 conicto +3328 2431 3328 1709 conicto +end_ol grestore +gsave 28.237409 10.440000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 28.602063 10.440000 translate 0.035278 -0.035278 scale +start_ol +1536 3840 moveto +1536 3008 lineto +2560 3008 lineto +2560 2304 lineto +1536 2304 lineto +1536 1054 lineto +1536 849 1618 776 conicto +1700 704 1944 704 conicto +2432 704 lineto +2432 0 lineto +1618 0 lineto +1050 0 813 240 conicto +576 480 576 1054 conicto +576 2304 lineto +128 2304 lineto +128 3008 lineto +576 3008 lineto +576 3840 lineto +1536 3840 lineto +end_ol grestore +0.100000 slw +[] 0 sd +1.000000 1.000000 1.000000 srgb +n 22.720000 12.970000 m 22.720000 14.370000 l 27.775000 14.370000 l 27.775000 12.970000 l f +0.000000 0.000000 0.000000 srgb +n 22.720000 12.970000 m 22.720000 14.370000 l 27.775000 14.370000 l 27.775000 12.970000 l cp s +gsave 22.970000 13.970000 translate 0.035278 -0.035278 scale +start_ol +2816 2880 moveto +2816 2176 lineto +2510 2304 2225 2368 conicto +1940 2432 1687 2432 conicto +1416 2432 1284 2363 conicto +1152 2295 1152 2154 conicto +1152 2039 1252 1977 conicto +1352 1915 1611 1886 conicto +1779 1862 lineto +2506 1769 2757 1556 conicto +3008 1344 3008 890 conicto +3008 414 2653 175 conicto +2298 -64 1593 -64 conicto +1294 -64 975 -16 conicto +656 32 320 128 conicto +320 832 lineto +611 704 917 640 conicto +1223 576 1538 576 conicto +1824 576 1968 651 conicto +2112 726 2112 873 conicto +2112 997 2014 1057 conicto +1917 1118 1627 1152 conicto +1459 1173 lineto +792 1254 524 1471 conicto +256 1689 256 2132 conicto +256 2610 588 2841 conicto +920 3072 1605 3072 conicto +1875 3072 2171 3025 conicto +2468 2979 2816 2880 conicto +end_ol grestore +gsave 23.404586 13.970000 translate 0.035278 -0.035278 scale +start_ol +3456 1792 moveto +3456 0 lineto +2496 0 lineto +2496 292 lineto +2496 1366 lineto +2496 1752 2478 1896 conicto +2461 2041 2419 2110 conicto +2363 2202 2267 2253 conicto +2171 2304 2048 2304 conicto +1749 2304 1578 2077 conicto +1408 1850 1408 1448 conicto +1408 0 lineto +448 0 lineto +448 4160 lineto +1408 4160 lineto +1408 2560 lineto +1624 2823 1866 2947 conicto +2109 3072 2403 3072 conicto +2920 3072 3188 2744 conicto +3456 2417 3456 1792 conicto +end_ol grestore +gsave 23.924096 13.970000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 24.288749 13.970000 translate 0.035278 -0.035278 scale +start_ol +448 3008 moveto +1408 3008 lineto +1408 0 lineto +448 0 lineto +448 3008 lineto +448 4160 moveto +1408 4160 lineto +1408 3392 lineto +448 3392 lineto +448 4160 lineto +end_ol grestore +gsave 24.538516 13.970000 translate 0.035278 -0.035278 scale +start_ol +3219 2489 moveto +3400 2774 3649 2923 conicto +3898 3072 4196 3072 conicto +4710 3072 4979 2744 conicto +5248 2417 5248 1792 conicto +5248 0 lineto +4288 0 lineto +4288 1534 lineto +4291 1568 4292 1605 conicto +4293 1642 4293 1710 conicto +4293 2023 4200 2163 conicto +4107 2304 3900 2304 conicto +3628 2304 3480 2083 conicto +3333 1863 3328 1445 conicto +3328 0 lineto +2368 0 lineto +2368 1534 lineto +2368 2023 2283 2163 conicto +2198 2304 1980 2304 conicto +1706 2304 1557 2082 conicto +1408 1860 1408 1448 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2560 lineto +1584 2815 1811 2943 conicto +2039 3072 2314 3072 conicto +2622 3072 2859 2918 conicto +3096 2765 3219 2489 conicto +end_ol grestore +gsave 25.297804 13.970000 translate 0.035278 -0.035278 scale +start_ol +1847 1344 moveto +1533 1344 1374 1245 conicto +1216 1146 1216 953 conicto +1216 776 1343 676 conicto +1471 576 1698 576 conicto +1981 576 2174 764 conicto +2368 953 2368 1237 conicto +2368 1344 lineto +1847 1344 lineto +3328 1709 moveto +3328 0 lineto +2368 0 lineto +2368 448 lineto +2171 180 1925 58 conicto +1679 -64 1326 -64 conicto +850 -64 553 206 conicto +256 476 256 907 conicto +256 1431 623 1675 conicto +991 1920 1777 1920 conicto +2368 1920 lineto +2368 1992 lineto +2368 2220 2183 2326 conicto +1999 2432 1608 2432 conicto +1291 2432 1018 2368 conicto +746 2304 512 2176 conicto +512 2880 lineto +826 2974 1143 3023 conicto +1460 3072 1777 3072 conicto +2599 3072 2963 2751 conicto +3328 2431 3328 1709 conicto +end_ol grestore +gsave 25.789838 13.970000 translate 0.035278 -0.035278 scale +start_ol +2496 512 moveto +2299 248 2062 124 conicto +1826 0 1514 0 conicto +969 0 612 433 conicto +256 867 256 1537 conicto +256 2211 612 2641 conicto +969 3072 1514 3072 conicto +1826 3072 2062 2948 conicto +2299 2825 2496 2560 conicto +2496 3008 lineto +3456 3008 lineto +3456 305 lineto +3456 -435 3005 -825 conicto +2554 -1216 1698 -1216 conicto +1420 -1216 1161 -1168 conicto +902 -1121 640 -1024 conicto +640 -256 lineto +887 -417 1124 -496 conicto +1361 -576 1601 -576 conicto +2064 -576 2280 -362 conicto +2496 -149 2496 305 conicto +2496 512 lineto +1887 2368 moveto +1600 2368 1440 2150 conicto +1280 1933 1280 1535 conicto +1280 1126 1435 915 conicto +1590 704 1887 704 conicto +2176 704 2336 921 conicto +2496 1139 2496 1535 conicto +2496 1933 2336 2150 conicto +2176 2368 1887 2368 conicto +end_ol grestore +gsave 26.311845 13.970000 translate 0.035278 -0.035278 scale +start_ol +3456 1482 moveto +3456 1216 lineto +1216 1216 lineto +1251 896 1461 736 conicto +1671 576 2048 576 conicto +2353 576 2672 671 conicto +2991 767 3328 960 conicto +3328 192 lineto +2988 65 2648 0 conicto +2309 -64 1970 -64 conicto +1157 -64 706 348 conicto +256 760 256 1504 conicto +256 2235 696 2653 conicto +1137 3072 1909 3072 conicto +2612 3072 3034 2639 conicto +3456 2206 3456 1482 conicto +2496 1792 moveto +2496 2080 2333 2256 conicto +2171 2432 1909 2432 conicto +1625 2432 1448 2267 conicto +1271 2102 1227 1792 conicto +2496 1792 lineto +end_ol grestore +gsave 26.806376 13.970000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 27.171029 13.970000 translate 0.035278 -0.035278 scale +start_ol +1536 3840 moveto +1536 3008 lineto +2560 3008 lineto +2560 2304 lineto +1536 2304 lineto +1536 1054 lineto +1536 849 1618 776 conicto +1700 704 1944 704 conicto +2432 704 lineto +2432 0 lineto +1618 0 lineto +1050 0 813 240 conicto +576 480 576 1054 conicto +576 2304 lineto +128 2304 lineto +128 3008 lineto +576 3008 lineto +576 3840 lineto +1536 3840 lineto +end_ol grestore +0.100000 slw +[] 0 sd +1.000000 1.000000 1.000000 srgb +n 8.290000 12.890000 m 8.290000 14.290000 l 14.485000 14.290000 l 14.485000 12.890000 l f +0.000000 0.000000 0.000000 srgb +n 8.290000 12.890000 m 8.290000 14.290000 l 14.485000 14.290000 l 14.485000 12.890000 l cp s +gsave 8.540000 13.890000 translate 0.035278 -0.035278 scale +start_ol +448 1213 moveto +448 3008 lineto +1408 3008 lineto +1408 2714 lineto +1408 2475 1405 2114 conicto +1403 1754 1403 1633 conicto +1403 1279 1421 1122 conicto +1440 966 1486 896 conicto +1544 804 1639 754 conicto +1734 704 1856 704 conicto +2155 704 2325 929 conicto +2496 1155 2496 1557 conicto +2496 3008 lineto +3456 3008 lineto +3456 0 lineto +2496 0 lineto +2496 448 lineto +2280 185 2038 60 conicto +1797 -64 1507 -64 conicto +989 -64 718 263 conicto +448 590 448 1213 conicto +end_ol grestore +gsave 9.059509 13.890000 translate 0.035278 -0.035278 scale +start_ol +2816 2880 moveto +2816 2176 lineto +2510 2304 2225 2368 conicto +1940 2432 1687 2432 conicto +1416 2432 1284 2363 conicto +1152 2295 1152 2154 conicto +1152 2039 1252 1977 conicto +1352 1915 1611 1886 conicto +1779 1862 lineto +2506 1769 2757 1556 conicto +3008 1344 3008 890 conicto +3008 414 2653 175 conicto +2298 -64 1593 -64 conicto +1294 -64 975 -16 conicto +656 32 320 128 conicto +320 832 lineto +611 704 917 640 conicto +1223 576 1538 576 conicto +1824 576 1968 651 conicto +2112 726 2112 873 conicto +2112 997 2014 1057 conicto +1917 1118 1627 1152 conicto +1459 1173 lineto +792 1254 524 1471 conicto +256 1689 256 2132 conicto +256 2610 588 2841 conicto +920 3072 1605 3072 conicto +1875 3072 2171 3025 conicto +2468 2979 2816 2880 conicto +end_ol grestore +gsave 9.494096 13.890000 translate 0.035278 -0.035278 scale +start_ol +3456 1482 moveto +3456 1216 lineto +1216 1216 lineto +1251 896 1461 736 conicto +1671 576 2048 576 conicto +2353 576 2672 671 conicto +2991 767 3328 960 conicto +3328 192 lineto +2988 65 2648 0 conicto +2309 -64 1970 -64 conicto +1157 -64 706 348 conicto +256 760 256 1504 conicto +256 2235 696 2653 conicto +1137 3072 1909 3072 conicto +2612 3072 3034 2639 conicto +3456 2206 3456 1482 conicto +2496 1792 moveto +2496 2080 2333 2256 conicto +2171 2432 1909 2432 conicto +1625 2432 1448 2267 conicto +1271 2102 1227 1792 conicto +2496 1792 lineto +end_ol grestore +gsave 9.988627 13.890000 translate 0.035278 -0.035278 scale +start_ol +2688 2176 moveto +2561 2241 2435 2272 conicto +2310 2304 2183 2304 conicto +1810 2304 1609 2064 conicto +1408 1825 1408 1378 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2496 lineto +1594 2796 1836 2934 conicto +2078 3072 2415 3072 conicto +2464 3072 2520 3068 conicto +2577 3065 2685 3053 conicto +2688 2176 lineto +end_ol grestore +gsave 10.348287 13.890000 translate 0.035278 -0.035278 scale +start_ol +2752 -768 moveto +2752 -1280 lineto +0 -1280 lineto +0 -768 lineto +2752 -768 lineto +end_ol grestore +gsave 10.712940 13.890000 translate 0.035278 -0.035278 scale +start_ol +1408 448 moveto +1408 -1152 lineto +448 -1152 lineto +448 3008 lineto +1408 3008 lineto +1408 2560 lineto +1604 2823 1843 2947 conicto +2082 3072 2393 3072 conicto +2942 3072 3295 2633 conicto +3648 2195 3648 1504 conicto +3648 813 3295 374 conicto +2942 -64 2393 -64 conicto +2082 -64 1843 60 conicto +1604 185 1408 448 conicto +2019 2368 moveto +1724 2368 1566 2145 conicto +1408 1923 1408 1504 conicto +1408 1085 1566 862 conicto +1724 640 2019 640 conicto +2314 640 2469 861 conicto +2624 1083 2624 1504 conicto +2624 1925 2469 2146 conicto +2314 2368 2019 2368 conicto +end_ol grestore +gsave 11.234947 13.890000 translate 0.035278 -0.035278 scale +start_ol +2688 2176 moveto +2561 2241 2435 2272 conicto +2310 2304 2183 2304 conicto +1810 2304 1609 2064 conicto +1408 1825 1408 1378 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2496 lineto +1594 2796 1836 2934 conicto +2078 3072 2415 3072 conicto +2464 3072 2520 3068 conicto +2577 3065 2685 3053 conicto +2688 2176 lineto +end_ol grestore +gsave 11.594606 13.890000 translate 0.035278 -0.035278 scale +start_ol +1924 2368 moveto +1610 2368 1445 2145 conicto +1280 1923 1280 1504 conicto +1280 1085 1445 862 conicto +1610 640 1924 640 conicto +2233 640 2396 862 conicto +2560 1085 2560 1504 conicto +2560 1923 2396 2145 conicto +2233 2368 1924 2368 conicto +1924 3072 moveto +2705 3072 3144 2656 conicto +3584 2240 3584 1504 conicto +3584 768 3144 352 conicto +2705 -64 1924 -64 conicto +1140 -64 698 352 conicto +256 768 256 1504 conicto +256 2240 698 2656 conicto +1140 3072 1924 3072 conicto +end_ol grestore +gsave 12.096637 13.890000 translate 0.035278 -0.035278 scale +start_ol +2496 512 moveto +2299 248 2062 124 conicto +1826 0 1514 0 conicto +969 0 612 433 conicto +256 867 256 1537 conicto +256 2211 612 2641 conicto +969 3072 1514 3072 conicto +1826 3072 2062 2948 conicto +2299 2825 2496 2560 conicto +2496 3008 lineto +3456 3008 lineto +3456 305 lineto +3456 -435 3005 -825 conicto +2554 -1216 1698 -1216 conicto +1420 -1216 1161 -1168 conicto +902 -1121 640 -1024 conicto +640 -256 lineto +887 -417 1124 -496 conicto +1361 -576 1601 -576 conicto +2064 -576 2280 -362 conicto +2496 -149 2496 305 conicto +2496 512 lineto +1887 2368 moveto +1600 2368 1440 2150 conicto +1280 1933 1280 1535 conicto +1280 1126 1435 915 conicto +1590 704 1887 704 conicto +2176 704 2336 921 conicto +2496 1139 2496 1535 conicto +2496 1933 2336 2150 conicto +2176 2368 1887 2368 conicto +end_ol grestore +gsave 12.618643 13.890000 translate 0.035278 -0.035278 scale +start_ol +2688 2176 moveto +2561 2241 2435 2272 conicto +2310 2304 2183 2304 conicto +1810 2304 1609 2064 conicto +1408 1825 1408 1378 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2496 lineto +1594 2796 1836 2934 conicto +2078 3072 2415 3072 conicto +2464 3072 2520 3068 conicto +2577 3065 2685 3053 conicto +2688 2176 lineto +end_ol grestore +gsave 12.978303 13.890000 translate 0.035278 -0.035278 scale +start_ol +1847 1344 moveto +1533 1344 1374 1245 conicto +1216 1146 1216 953 conicto +1216 776 1343 676 conicto +1471 576 1698 576 conicto +1981 576 2174 764 conicto +2368 953 2368 1237 conicto +2368 1344 lineto +1847 1344 lineto +3328 1709 moveto +3328 0 lineto +2368 0 lineto +2368 448 lineto +2171 180 1925 58 conicto +1679 -64 1326 -64 conicto +850 -64 553 206 conicto +256 476 256 907 conicto +256 1431 623 1675 conicto +991 1920 1777 1920 conicto +2368 1920 lineto +2368 1992 lineto +2368 2220 2183 2326 conicto +1999 2432 1608 2432 conicto +1291 2432 1018 2368 conicto +746 2304 512 2176 conicto +512 2880 lineto +826 2974 1143 3023 conicto +1460 3072 1777 3072 conicto +2599 3072 2963 2751 conicto +3328 2431 3328 1709 conicto +end_ol grestore +gsave 13.470337 13.890000 translate 0.035278 -0.035278 scale +start_ol +3219 2489 moveto +3400 2774 3649 2923 conicto +3898 3072 4196 3072 conicto +4710 3072 4979 2744 conicto +5248 2417 5248 1792 conicto +5248 0 lineto +4288 0 lineto +4288 1534 lineto +4291 1568 4292 1605 conicto +4293 1642 4293 1710 conicto +4293 2023 4200 2163 conicto +4107 2304 3900 2304 conicto +3628 2304 3480 2083 conicto +3333 1863 3328 1445 conicto +3328 0 lineto +2368 0 lineto +2368 1534 lineto +2368 2023 2283 2163 conicto +2198 2304 1980 2304 conicto +1706 2304 1557 2082 conicto +1408 1860 1408 1448 conicto +1408 0 lineto +448 0 lineto +448 3008 lineto +1408 3008 lineto +1408 2560 lineto +1584 2815 1811 2943 conicto +2039 3072 2314 3072 conicto +2622 3072 2859 2918 conicto +3096 2765 3219 2489 conicto +end_ol grestore +0.100000 slw +0 slc +[] 0 sd +[0.400000] 0 sd +n 10.596618 12.096762 m 9.020000 9.120000 l s +0 slj +n 10.375692 12.213774 m 10.971056 12.803725 l 10.817544 11.979750 l ef +0.100000 slw +[0.080000] 0 sd +[0.200000] 0 sd +0 slc +n 14.300000 8.500000 m 10.170000 11.000000 l s +0.100000 slw +0 slc +[0.080000] 0 sd +[0.400000] 0 sd +n 13.106038 12.342605 m 18.400000 8.500000 l s +0 slj +n 12.959184 12.140284 m 12.458610 12.812538 l 13.252892 12.544926 l ef +0.100000 slw +0 slc +[] 0 sd +n 21.822451 13.650231 m 14.534847 13.608167 l s +0 slj +n 21.821008 13.900226 m 22.622437 13.654848 l 21.823894 13.400235 l ef +gsave 16.687562 14.367128 translate 0.035278 -0.035278 scale +start_ol +3200 2167 moveto +985 1374 lineto +3200 585 lineto +3200 192 lineto +448 1197 lineto +448 1555 lineto +3200 2560 lineto +3200 2167 lineto +end_ol grestore +gsave 17.174602 14.367128 translate 0.035278 -0.035278 scale +start_ol +3200 2167 moveto +985 1374 lineto +3200 585 lineto +3200 192 lineto +448 1197 lineto +448 1555 lineto +3200 2560 lineto +3200 2167 lineto +end_ol grestore +gsave 17.661642 14.367128 translate 0.035278 -0.035278 scale +start_ol +2176 2368 moveto +2176 1984 lineto +2010 2080 1843 2128 conicto +1676 2176 1506 2176 conicto +1125 2176 914 1924 conicto +704 1672 704 1216 conicto +704 760 914 508 conicto +1125 256 1506 256 conicto +1676 256 1843 304 conicto +2010 352 2176 448 conicto +2176 64 lineto +2009 0 1830 -32 conicto +1652 -64 1450 -64 conicto +902 -64 579 282 conicto +256 628 256 1216 conicto +256 1812 582 2154 conicto +908 2496 1476 2496 conicto +1660 2496 1835 2464 conicto +2011 2432 2176 2368 conicto +end_ol grestore +gsave 17.981342 14.367128 translate 0.035278 -0.035278 scale +start_ol +1792 2112 moveto +1725 2145 1645 2160 conicto +1566 2176 1470 2176 conicto +1131 2176 949 1944 conicto +768 1712 768 1277 conicto +768 0 lineto +384 0 lineto +384 2432 lineto +768 2432 lineto +768 2048 lineto +894 2275 1096 2385 conicto +1298 2496 1588 2496 conicto +1629 2496 1679 2496 conicto +1729 2496 1790 2496 conicto +1792 2112 lineto +end_ol grestore +gsave 18.208627 14.367128 translate 0.035278 -0.035278 scale +start_ol +2496 1352 moveto +2496 1152 lineto +704 1152 lineto +730 714 950 485 conicto +1171 256 1565 256 conicto +1793 256 2007 320 conicto +2221 384 2432 512 conicto +2432 128 lineto +2215 34 1988 -15 conicto +1761 -64 1527 -64 conicto +941 -64 598 275 conicto +256 615 256 1194 conicto +256 1793 576 2144 conicto +897 2496 1441 2496 conicto +1928 2496 2212 2188 conicto +2496 1881 2496 1352 conicto +2112 1472 moveto +2108 1793 1932 1984 conicto +1757 2176 1468 2176 conicto +1140 2176 943 1991 conicto +747 1806 717 1470 conicto +2112 1472 lineto +end_ol grestore +gsave 18.565790 14.367128 translate 0.035278 -0.035278 scale +start_ol +1515 1216 moveto +1021 1216 830 1104 conicto +640 992 640 723 conicto +640 508 783 382 conicto +926 256 1171 256 conicto +1510 256 1715 494 conicto +1920 733 1920 1129 conicto +1920 1216 lineto +1515 1216 lineto +2304 1385 moveto +2304 0 lineto +1920 0 lineto +1920 384 lineto +1782 154 1577 45 conicto +1372 -64 1075 -64 conicto +699 -64 477 146 conicto +256 356 256 708 conicto +256 1119 530 1327 conicto +805 1536 1349 1536 conicto +1920 1536 lineto +1920 1578 lineto +1920 1864 1739 2020 conicto +1558 2176 1232 2176 conicto +1024 2176 827 2128 conicto +630 2080 448 1984 conicto +448 2368 lineto +665 2432 869 2464 conicto +1073 2496 1266 2496 conicto +1788 2496 2046 2220 conicto +2304 1945 2304 1385 conicto +end_ol grestore +gsave 18.922952 14.367128 translate 0.035278 -0.035278 scale +start_ol +768 3136 moveto +768 2432 lineto +1600 2432 lineto +1600 2112 lineto +768 2112 lineto +768 788 lineto +768 490 850 405 conicto +933 320 1185 320 conicto +1600 320 lineto +1600 0 lineto +1185 0 lineto +730 0 557 170 conicto +384 340 384 788 conicto +384 2112 lineto +64 2112 lineto +64 2432 lineto +384 2432 lineto +384 3136 lineto +768 3136 lineto +end_ol grestore +gsave 19.150238 14.367128 translate 0.035278 -0.035278 scale +start_ol +2496 1352 moveto +2496 1152 lineto +704 1152 lineto +730 714 950 485 conicto +1171 256 1565 256 conicto +1793 256 2007 320 conicto +2221 384 2432 512 conicto +2432 128 lineto +2215 34 1988 -15 conicto +1761 -64 1527 -64 conicto +941 -64 598 275 conicto +256 615 256 1194 conicto +256 1793 576 2144 conicto +897 2496 1441 2496 conicto +1928 2496 2212 2188 conicto +2496 1881 2496 1352 conicto +2112 1472 moveto +2108 1793 1932 1984 conicto +1757 2176 1468 2176 conicto +1140 2176 943 1991 conicto +747 1806 717 1470 conicto +2112 1472 lineto +end_ol grestore +gsave 19.507400 14.367128 translate 0.035278 -0.035278 scale +start_ol +448 2167 moveto +448 2560 lineto +3200 1555 lineto +3200 1197 lineto +448 192 lineto +448 585 lineto +2659 1374 lineto +448 2167 lineto +end_ol grestore +gsave 19.994441 14.367128 translate 0.035278 -0.035278 scale +start_ol +448 2167 moveto +448 2560 lineto +3200 1555 lineto +3200 1197 lineto +448 192 lineto +448 585 lineto +2659 1374 lineto +448 2167 lineto +end_ol grestore +0.100000 slw +[0.080000] 0 sd +[0.200000] 0 sd +0 slc +n 24.373446 10.890326 m 19.170000 13.450000 l s +0.100000 slw +[0.200000] 0 sd +[0.200000] 0 sd +0 slc +n 22.540211 10.143699 m 16.820000 10.150000 l s +gsave 18.520000 12.050000 translate 0.035278 -0.035278 scale +start_ol +3584 2444 moveto +1111 1566 lineto +3584 692 lineto +3584 256 lineto +512 1369 lineto +512 1767 lineto +3584 2880 lineto +3584 2444 lineto +end_ol grestore +gsave 19.069482 12.050000 translate 0.035278 -0.035278 scale +start_ol +3584 2444 moveto +1111 1566 lineto +3584 692 lineto +3584 256 lineto +512 1369 lineto +512 1767 lineto +3584 2880 lineto +3584 2444 lineto +end_ol grestore +gsave 19.618963 12.050000 translate 0.035278 -0.035278 scale +start_ol +1666 1408 moveto +1123 1408 913 1281 conicto +704 1155 704 849 conicto +704 606 861 463 conicto +1018 320 1289 320 conicto +1661 320 1886 588 conicto +2112 856 2112 1301 conicto +2112 1408 lineto +1666 1408 lineto +2560 1577 moveto +2560 0 lineto +2112 0 lineto +2112 384 lineto +1959 154 1730 45 conicto +1501 -64 1169 -64 conicto +750 -64 503 171 conicto +256 406 256 800 conicto +256 1261 564 1494 conicto +872 1728 1484 1728 conicto +2112 1728 lineto +2112 1770 lineto +2112 2056 1907 2212 conicto +1703 2368 1334 2368 conicto +1099 2368 876 2320 conicto +654 2272 448 2176 conicto +448 2560 lineto +695 2656 927 2704 conicto +1159 2752 1379 2752 conicto +1973 2752 2266 2460 conicto +2560 2169 2560 1577 conicto +end_ol grestore +gsave 20.021080 12.050000 translate 0.035278 -0.035278 scale +start_ol +2048 2304 moveto +1972 2337 1883 2352 conicto +1794 2368 1686 2368 conicto +1304 2368 1100 2117 conicto +896 1866 896 1397 conicto +896 0 lineto +448 0 lineto +448 2688 lineto +896 2688 lineto +896 2240 lineto +1038 2500 1265 2626 conicto +1493 2752 1818 2752 conicto +1865 2752 1921 2752 conicto +1977 2752 2046 2752 conicto +2048 2304 lineto +end_ol grestore +gsave 20.278338 12.050000 translate 0.035278 -0.035278 scale +start_ol +2240 1375 moveto +2240 1848 2038 2108 conicto +1836 2368 1471 2368 conicto +1108 2368 906 2108 conicto +704 1848 704 1375 conicto +704 904 906 644 conicto +1108 384 1471 384 conicto +1836 384 2038 644 conicto +2240 904 2240 1375 conicto +2688 347 moveto +2688 -347 2378 -685 conicto +2069 -1024 1430 -1024 conicto +1193 -1024 983 -992 conicto +774 -961 576 -896 conicto +576 -448 lineto +774 -546 966 -593 conicto +1159 -640 1359 -640 conicto +1801 -640 2020 -415 conicto +2240 -190 2240 264 conicto +2240 448 lineto +2102 223 1885 111 conicto +1669 0 1368 0 conicto +868 0 562 376 conicto +256 753 256 1375 conicto +256 1999 562 2375 conicto +868 2752 1368 2752 conicto +1669 2752 1885 2640 conicto +2102 2529 2240 2304 conicto +2240 2688 lineto +2688 2688 lineto +2688 347 lineto +end_ol grestore +gsave 20.695446 12.050000 translate 0.035278 -0.035278 scale +start_ol +512 2444 moveto +512 2880 lineto +3584 1767 lineto +3584 1369 lineto +512 256 lineto +512 692 lineto +2980 1566 lineto +512 2444 lineto +end_ol grestore +gsave 21.244927 12.050000 translate 0.035278 -0.035278 scale +start_ol +512 2444 moveto +512 2880 lineto +3584 1767 lineto +3584 1369 lineto +512 256 lineto +512 692 lineto +2980 1566 lineto +512 2444 lineto +end_ol grestore +gsave 10.640000 8.780000 translate 0.035278 -0.035278 scale +start_ol +3584 2444 moveto +1111 1566 lineto +3584 692 lineto +3584 256 lineto +512 1369 lineto +512 1767 lineto +3584 2880 lineto +3584 2444 lineto +end_ol grestore +gsave 11.189482 8.780000 translate 0.035278 -0.035278 scale +start_ol +3584 2444 moveto +1111 1566 lineto +3584 692 lineto +3584 256 lineto +512 1369 lineto +512 1767 lineto +3584 2880 lineto +3584 2444 lineto +end_ol grestore +gsave 11.738963 8.780000 translate 0.035278 -0.035278 scale +start_ol +1666 1408 moveto +1123 1408 913 1281 conicto +704 1155 704 849 conicto +704 606 861 463 conicto +1018 320 1289 320 conicto +1661 320 1886 588 conicto +2112 856 2112 1301 conicto +2112 1408 lineto +1666 1408 lineto +2560 1577 moveto +2560 0 lineto +2112 0 lineto +2112 384 lineto +1959 154 1730 45 conicto +1501 -64 1169 -64 conicto +750 -64 503 171 conicto +256 406 256 800 conicto +256 1261 564 1494 conicto +872 1728 1484 1728 conicto +2112 1728 lineto +2112 1770 lineto +2112 2056 1907 2212 conicto +1703 2368 1334 2368 conicto +1099 2368 876 2320 conicto +654 2272 448 2176 conicto +448 2560 lineto +695 2656 927 2704 conicto +1159 2752 1379 2752 conicto +1973 2752 2266 2460 conicto +2560 2169 2560 1577 conicto +end_ol grestore +gsave 12.141080 8.780000 translate 0.035278 -0.035278 scale +start_ol +2048 2304 moveto +1972 2337 1883 2352 conicto +1794 2368 1686 2368 conicto +1304 2368 1100 2117 conicto +896 1866 896 1397 conicto +896 0 lineto +448 0 lineto +448 2688 lineto +896 2688 lineto +896 2240 lineto +1038 2500 1265 2626 conicto +1493 2752 1818 2752 conicto +1865 2752 1921 2752 conicto +1977 2752 2046 2752 conicto +2048 2304 lineto +end_ol grestore +gsave 12.398338 8.780000 translate 0.035278 -0.035278 scale +start_ol +2240 1375 moveto +2240 1848 2038 2108 conicto +1836 2368 1471 2368 conicto +1108 2368 906 2108 conicto +704 1848 704 1375 conicto +704 904 906 644 conicto +1108 384 1471 384 conicto +1836 384 2038 644 conicto +2240 904 2240 1375 conicto +2688 347 moveto +2688 -347 2378 -685 conicto +2069 -1024 1430 -1024 conicto +1193 -1024 983 -992 conicto +774 -961 576 -896 conicto +576 -448 lineto +774 -546 966 -593 conicto +1159 -640 1359 -640 conicto +1801 -640 2020 -415 conicto +2240 -190 2240 264 conicto +2240 448 lineto +2102 223 1885 111 conicto +1669 0 1368 0 conicto +868 0 562 376 conicto +256 753 256 1375 conicto +256 1999 562 2375 conicto +868 2752 1368 2752 conicto +1669 2752 1885 2640 conicto +2102 2529 2240 2304 conicto +2240 2688 lineto +2688 2688 lineto +2688 347 lineto +end_ol grestore +gsave 12.815446 8.780000 translate 0.035278 -0.035278 scale +start_ol +512 2444 moveto +512 2880 lineto +3584 1767 lineto +3584 1369 lineto +512 256 lineto +512 692 lineto +2980 1566 lineto +512 2444 lineto +end_ol grestore +gsave 13.364927 8.780000 translate 0.035278 -0.035278 scale +start_ol +512 2444 moveto +512 2880 lineto +3584 1767 lineto +3584 1369 lineto +512 256 lineto +512 692 lineto +2980 1566 lineto +512 2444 lineto +end_ol grestore +gsave 18.260000 9.800000 translate 0.035278 -0.035278 scale +start_ol +3584 2444 moveto +1111 1566 lineto +3584 692 lineto +3584 256 lineto +512 1369 lineto +512 1767 lineto +3584 2880 lineto +3584 2444 lineto +end_ol grestore +gsave 18.809482 9.800000 translate 0.035278 -0.035278 scale +start_ol +3584 2444 moveto +1111 1566 lineto +3584 692 lineto +3584 256 lineto +512 1369 lineto +512 1767 lineto +3584 2880 lineto +3584 2444 lineto +end_ol grestore +gsave 19.358963 9.800000 translate 0.035278 -0.035278 scale +start_ol +1666 1408 moveto +1123 1408 913 1281 conicto +704 1155 704 849 conicto +704 606 861 463 conicto +1018 320 1289 320 conicto +1661 320 1886 588 conicto +2112 856 2112 1301 conicto +2112 1408 lineto +1666 1408 lineto +2560 1577 moveto +2560 0 lineto +2112 0 lineto +2112 384 lineto +1959 154 1730 45 conicto +1501 -64 1169 -64 conicto +750 -64 503 171 conicto +256 406 256 800 conicto +256 1261 564 1494 conicto +872 1728 1484 1728 conicto +2112 1728 lineto +2112 1770 lineto +2112 2056 1907 2212 conicto +1703 2368 1334 2368 conicto +1099 2368 876 2320 conicto +654 2272 448 2176 conicto +448 2560 lineto +695 2656 927 2704 conicto +1159 2752 1379 2752 conicto +1973 2752 2266 2460 conicto +2560 2169 2560 1577 conicto +end_ol grestore +gsave 19.761080 9.800000 translate 0.035278 -0.035278 scale +start_ol +2048 2304 moveto +1972 2337 1883 2352 conicto +1794 2368 1686 2368 conicto +1304 2368 1100 2117 conicto +896 1866 896 1397 conicto +896 0 lineto +448 0 lineto +448 2688 lineto +896 2688 lineto +896 2240 lineto +1038 2500 1265 2626 conicto +1493 2752 1818 2752 conicto +1865 2752 1921 2752 conicto +1977 2752 2046 2752 conicto +2048 2304 lineto +end_ol grestore +gsave 20.018338 9.800000 translate 0.035278 -0.035278 scale +start_ol +2240 1375 moveto +2240 1848 2038 2108 conicto +1836 2368 1471 2368 conicto +1108 2368 906 2108 conicto +704 1848 704 1375 conicto +704 904 906 644 conicto +1108 384 1471 384 conicto +1836 384 2038 644 conicto +2240 904 2240 1375 conicto +2688 347 moveto +2688 -347 2378 -685 conicto +2069 -1024 1430 -1024 conicto +1193 -1024 983 -992 conicto +774 -961 576 -896 conicto +576 -448 lineto +774 -546 966 -593 conicto +1159 -640 1359 -640 conicto +1801 -640 2020 -415 conicto +2240 -190 2240 264 conicto +2240 448 lineto +2102 223 1885 111 conicto +1669 0 1368 0 conicto +868 0 562 376 conicto +256 753 256 1375 conicto +256 1999 562 2375 conicto +868 2752 1368 2752 conicto +1669 2752 1885 2640 conicto +2102 2529 2240 2304 conicto +2240 2688 lineto +2688 2688 lineto +2688 347 lineto +end_ol grestore +gsave 20.435446 9.800000 translate 0.035278 -0.035278 scale +start_ol +512 2444 moveto +512 2880 lineto +3584 1767 lineto +3584 1369 lineto +512 256 lineto +512 692 lineto +2980 1566 lineto +512 2444 lineto +end_ol grestore +gsave 20.984927 9.800000 translate 0.035278 -0.035278 scale +start_ol +512 2444 moveto +512 2880 lineto +3584 1767 lineto +3584 1369 lineto +512 256 lineto +512 692 lineto +2980 1566 lineto +512 2444 lineto +end_ol grestore +showpage
--- a/include/Makefile.am Sat Jan 31 12:54:13 2009 +0800 +++ b/include/Makefile.am Sat Jan 31 13:01:07 2009 +0800 @@ -9,4 +9,5 @@ mb_shapes.h \ mb_tools.h \ mb_prop.h \ - mb_X_supp.h + mb_X_supp.h \ + mb_so.h
--- a/include/mb_X_supp.h Sat Jan 31 12:54:13 2009 +0800 +++ b/include/mb_X_supp.h Sat Jan 31 13:01:07 2009 +0800 @@ -5,6 +5,7 @@ #include "mb_types.h" #include "mb_timer.h" #include "mb_redraw_man.h" +#include "mb_img_ldr.h" /*! \ingroup xkb * @{ @@ -30,5 +31,6 @@ extern redraw_man_t *X_MB_rdman(X_MB_runtime_t *xmb_rt); extern mb_tman_t *X_MB_tman(X_MB_runtime_t *xmb_rt); extern ob_factory_t *X_MB_ob_factory(X_MB_runtime_t *xmb_rt); +extern mb_img_ldr_t *X_MB_img_ldr(X_MB_runtime_t *xmb_rt); #endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/mb_img_ldr.h Sat Jan 31 13:01:07 2009 +0800 @@ -0,0 +1,58 @@ +#ifndef __MB_IMG_LDR_H_ +#define __MB_IMG_LDR_H_ + +typedef struct _mb_img_data mb_img_data_t; +typedef struct _mb_img_ldr mb_img_ldr_t; + +typedef enum _mb_img_fmt { + MB_IFMT_DUMMY, + MB_IFMT_ARGB32, + MB_IFMT_RGB24, + MB_IFMT_A8, + MB_IFMT_A1, + MB_IFMT_RGB16_565 +} mb_img_fmt_t; + +/*! \brief Encapsulate image. + * + * The format and content of an image is encapsulated by imag_data_t. + * We hope someday, we can create an abstract backend layer that + * can deal with image data. + */ +struct _mb_img_data { + /*! \brief Content of the image. */ + void *content; + int w, h; + int stride; /*!< \brief Number of bytes a row */ + mb_img_fmt_t fmt; + /*! \brief Release the image that was loaded by the loader. */ + void (*free)(mb_img_data_t *img); +}; +#define MB_IMG_DATA_FREE(img) (img)->free(img) + +/*! \brief Image loader. + * + * An image loader take a ID and find out the corresponding + * image from filesystem or somewhere. Image ID is a hierachical + * structured path. It is relative to the root of image database. + * Users of a loader do not need to know where the database is. + * The location can be configured when a loader been instantiated. + * But, it is invisible when loading images by an image loader. + */ +struct _mb_img_ldr { + /*! \brief Load a image with specified ID. */ + mb_img_data_t *(*load)(mb_img_ldr_t *ldr, const char *img_id); + /*! \brief Free the loader. */ + void (*free)(mb_img_ldr_t *ldr); +}; +#define MB_IMG_LDR_FREE(ldr) (ldr)->free(ldr) +#define MB_IMG_LDR_LOAD(ldr, img_id) (ldr)->load(ldr, img_id) + +/*! \brief Create a simple image loader. + * + * \param img_repository is a repository where images are loaded from. + * \return NULL for error. + */ +extern mb_img_ldr_t *simple_mb_img_ldr_new(const char *img_repository); + +#endif /* __MB_IMG_LDR_H_ */
--- a/include/mb_paint.h Sat Jan 31 12:54:13 2009 +0800 +++ b/include/mb_paint.h Sat Jan 31 13:01:07 2009 +0800 @@ -24,7 +24,8 @@ (_paint)->free = _free; \ STAILQ_INIT((_paint)->members); \ (_paint)->pnt_next = NULL; \ - } while(0) \ + } while(0) +#define paint_destroy(_paint) typedef struct _grad_stop { @@ -53,5 +54,12 @@ (stop)->a = _a; \ } while(0) +/*! \brief A paint that fill or stroke shape with an image. + */ +extern paint_t *rdman_paint_image_new(redraw_man_t *rdman, + mb_img_data_t *img); +/*! \brief Set a matrix to transform image. + */ +extern void paint_image_set_matrix(paint_t *paint, co_aix matrix[6]); #endif /* __PAINT_H_ */
--- a/include/mb_prop.h Sat Jan 31 12:54:13 2009 +0800 +++ b/include/mb_prop.h Sat Jan 31 13:01:07 2009 +0800 @@ -11,6 +11,10 @@ * to keep property values. Every property is identified by a ID; an * integer. Programmer can use a ID to set/get value to/from a property * store. The ID should be unique in a property store. + * + * \todo Add a free function pointer on entries to release resources when + * the store is destroy. (See: \ref mouse.c) + * * @{ */
--- a/include/mb_redraw_man.h Sat Jan 31 12:54:13 2009 +0800 +++ b/include/mb_redraw_man.h Sat Jan 31 13:01:07 2009 +0800 @@ -5,6 +5,7 @@ #include "mb_tools.h" #include "mb_types.h" #include "mb_observer.h" +#include "mb_img_ldr.h" typedef struct _redraw_man redraw_man_t; @@ -78,6 +79,13 @@ * graphic backend. * \see rdman_attach_backend() */ + mb_prop_store_t props; + mb_img_ldr_t *img_ldr; /*!< \brief Image Loader. + * This is initialized by backend. + */ + co_aix w, h; /*!< \brief Size of viewport + * This is initialized by backend. + */ }; extern int redraw_man_init(redraw_man_t *rdman, cairo_t *cr, @@ -173,8 +181,8 @@ co_aix x, co_aix y, int *in_stroke); extern int mb_obj_pos_is_in(redraw_man_t *rdman, mb_obj_t *obj, co_aix x, co_aix y, int *in_stroke); -extern int mb_objs_is_overlay(redraw_man_t *rdman, - mb_obj_t *obj1, mb_obj_t *obj2); +extern int mb_objs_are_overlay(redraw_man_t *rdman, + mb_obj_t *obj1, mb_obj_t *obj2); #define rdman_get_ob_factory(rdman) (&(rdman)->ob_factory) #define rdman_get_redraw_subject(rdman) ((rdman)->redraw) #define rdman_get_root(rdman) ((rdman)->root_coord) @@ -189,6 +197,10 @@ rdman_get_gen_geos(rdman)->num #define rdman_clear_shape_gl(rdman) \ DARRAY_CLEAN(rdman_get_gen_geos(rdman)) +#define rdman_prop_store(rdman) ((rdman)->props) +#define rdman_img_ldr(rdman) ((rdman)->img_ldr) +#define rdman_set_img_ldr(rdman, ldr) \ + do { (rdman)->img_ldr = ldr; } while(0) /*! \brief Attach backend to the redraw manager so that we can hide the backend from the users. * @@ -196,9 +208,10 @@ #define rdman_attach_backend(rdman,backend) (((rdman)->rt)=(backend)) /*! \brief Load sprite dymanicly from the shared object module. * - * The search path can be changed by sprite_set_search_path. The name can have a relative path in the front of it. - * This function will search the object in the current working directory and then search the system search path. - * + * The search path can be changed by sprite_set_search_path. The name + * can have a relative path in the front of it. + * This function will search the object in the current working directory + * and then search the system search path. */ mb_sprite_t *sprite_load(const char *name, redraw_man_t *rdman, coord_t *root);
--- a/include/mb_shapes.h Sat Jan 31 12:54:13 2009 +0800 +++ b/include/mb_shapes.h Sat Jan 31 13:01:07 2009 +0800 @@ -10,6 +10,8 @@ #include <cairo.h> #include "mb_types.h" #include "mb_redraw_man.h" +#include "mb_img_ldr.h" +#include <pango/pangocairo.h> /*! \page define_shape How to Define Shapes * @@ -23,12 +25,22 @@ * - assigned to \ref shape_t::free. * - *_transform() * - *_draw() + * - *_draw() is responsive to define shape. How the shape is filled + * or stroked is defined by paint. * - first member variable of a shape type must be a shape_t. * * Must modify * - event.c::draw_shape_path() * - redraw_man.c::clean_shape() * - redraw_man.c::draw_shape() + * + * \section shape_transform Shape Transform + * + * All shape types must have a shape transform function. It is invoked by + * redraw_man.c::clean_shape(). It's task is to update \ref geo_t of the + * shape object. In most situtation, it call geo_from_positions() to + * update geo_t. + * */ /*! \defgroup shapes Shapes @@ -50,12 +62,97 @@ extern shape_t *rdman_shape_text_new(redraw_man_t *rdman, const char *txt, co_aix x, co_aix y, co_aix font_size, - cairo_font_face_t *face); + cairo_font_face_t *face,PangoAttrList *attrs); extern void sh_text_set_text(shape_t *shape, const char *txt); extern void sh_text_transform(shape_t *shape); extern void sh_text_draw(shape_t *shape, cairo_t *cr); /* @} */ +/*! \defgroup mb_text_t Shape of Text + * @{ + */ +#define TEXTSTYLE_BOLD 1 +#define TEXTSTYLE_ITALIC 2 +#define TEXTSTYLE_UNDERLINE 4 +#define TEXTSTYLE_COLOR 8 +#define TEXTSTYLE_FONT 0x10 +#define TEXTSTYLE_ALIGN 0x20 + +typedef struct { + int property; + unsigned int color; + unsigned int align; + char *font; +} mb_textstyle_t; + +typedef struct _textsegment { + int x; + int y; + mb_textstyle_t style; + int size; + char *buf; + struct _textsegment *next; +} mb_text_segment_t; + +#define MBTEXT_DIRTY 1 + +typedef struct { + int nseg; + mb_text_segment_t *segs; + int flag; + cairo_surface_t *surface; +} mb_text_t; + +extern void mb_textstyle_init(mb_textstyle_t *style); +extern void mb_textstyle_set_font(mb_textstyle_t *style, char *font); +static inline char *mb_textstyle_get_font(mb_textstyle_t *style) +{ + if (style->property & TEXTSTYLE_FONT) + return style->font; + else + return NULL; +} +extern void mb_textstyle_set_bold(mb_textstyle_t *style, int bold); +static inline int mb_textstyle_get_bold(mb_textstyle_t *style) +{ + return style->property & TEXTSTYLE_BOLD; +} +extern void mb_textstyle_set_italic(mb_textstyle_t *style, int italic); +static inline int mb_textstyle_get_italic(mb_textstyle_t *style) +{ + return style->property & TEXTSTYLE_ITALIC; +} +extern void mb_textstyle_set_underline(mb_textstyle_t *style, int underline); +static inline int mb_textstyle_get_undeline(mb_textstyle_t *style) +{ + return style->property & TEXTSTYLE_UNDERLINE; +} +extern void mb_textstyle_set_color(mb_textstyle_t *style, unsigned int color); +static inline unsigned int mb_textstyle_get_color(mb_textstyle_t *style) +{ + if (style->property & TEXTSTYLE_COLOR) + return style->color; + else + return 0; +} + +static inline int mb_textstyle_has_color(mb_textstyle_t *style) +{ + return style->property & TEXTSTYLE_COLOR; +} +extern void mb_textstyle_set_alignment(mb_textstyle_t *style, int alignment); +extern int mb_textstyle_get_alignment(mb_textstyle_t *style); + + + +extern void mb_text_set_style(mb_text_t *text, int begin,int end,mb_textstyle_t *style); +extern void mb_text_get_style(mb_text_t *text, int n,mb_textstyle_t *style); +extern void mb_text_set_text(mb_text_t *text, char *string,int begin,int end); +extern void mb_text_get_text(mb_text_t *text, int begin,int end, char *string); + + +/* @} */ + /*! \defgroup shape_rect Shape of Rectangle * @{ */ @@ -68,6 +165,19 @@ extern void sh_rect_set(shape_t *shape, co_aix x, co_aix y, co_aix w, co_aix h, co_aix rx, co_aix ry); /* @} */ + +/*! \defgroup shape_image Shape of Image + * @{ + */ +extern shape_t *rdman_shape_image_new(redraw_man_t *rdman, + mb_img_data_t *img_data, + co_aix x, co_aix y, + co_aix w, co_aix h); +extern void sh_image_transform(shape_t *shape); +extern void sh_image_draw(shape_t *shape, cairo_t *cr); +extern void sh_image_set_geometry(shape_t *shape, co_aix x, co_aix y, + co_aix w, co_aix h); +/* @} */ /* @} */ #endif /* __SHAPES_H_ */
--- a/include/mb_tools.h Sat Jan 31 12:54:13 2009 +0800 +++ b/include/mb_tools.h Sat Jan 31 13:01:07 2009 +0800 @@ -61,6 +61,10 @@ } \ } \ } while(0) +#define STAILQ_FOR_EACH(q, type, field, elm) \ + for((elm) = (q).head; \ + (elm) != NULL; \ + (elm) = (elm)->field) /*! \defgroup darray Dynamic Array * @@ -134,4 +138,7 @@ #define MEM2OBJ(var, type, mem) ((type *)((void *)var - OFFSET(type, mem))) #define OFF2TYPE(obj, off, type) (*(type *)((void *)(obj) + (off))) +#define MAX(a, b) ((a) > (b)? (a): (b)) +#define MIN(a, b) ((a) < (b)? (a): (b)) + #endif /* __TOOLS_H_ */
--- a/include/mb_types.h Sat Jan 31 12:54:13 2009 +0800 +++ b/include/mb_types.h Sat Jan 31 13:01:07 2009 +0800 @@ -40,7 +40,8 @@ MBO_SHAPES=0x1000, /*! \note Don't touch this. */ MBO_PATH, MBO_TEXT, - MBO_RECT + MBO_RECT, + MBO_IMAGE }; #define MBO_CLASS_MASK 0xf000 #define MBO_CLASS(x) (((mb_obj_t *)(x))->obj_type & MBO_CLASS_MASK) @@ -63,6 +64,9 @@ * Paints should be freed by users by calling rdman_paint_free() of * the paint. * + * To define a foo paint, it should define a rdman_paint_foo_new() + * function. It return a paint object. + * * \todo move member functions to a seperate structure and setup a * singleton for each paint type. */ @@ -108,6 +112,10 @@ extern int areas_are_overlay(area_t *r1, area_t *r2); extern void area_init(area_t *area, int n_pos, co_aix pos[][2]); +#define _in_range(a, s, w) ((a) >= (s) && (a) < ((s) + (w))) +#define area_pos_is_in(area, _x, _y) \ + (_in_range(_x, (area)->x, (area)->w) && \ + _in_range(_y, (area)->y, (area)->h)) extern void geo_init(geo_t *g); extern void geo_from_positions(geo_t *g, int n_pos, co_aix pos[][2]); extern void geo_mark_overlay(geo_t *g, int n_others, geo_t **others, @@ -115,10 +123,7 @@ #define geo_get_shape(g) ((g)->shape) #define geo_get_shape_safe(g) ((g)? (g)->shape: NULL) #define geo_set_shape(g, sh) do {(g)->shape = sh;} while(0) -#define _geo_is_in(a, s, w) ((a) >= (s) && (a) < ((s) + (w))) -#define geo_pos_is_in(g, _x, _y) \ - (_geo_is_in(_x, (g)->cur_area->x, (g)->cur_area->w) && \ - _geo_is_in(_y, (g)->cur_area->y, (g)->cur_area->h)) +#define geo_pos_is_in(g, _x, _y) area_pos_is_in((g)->cur_area, _x, _y) #define geo_get_area(g) ((g)->cur_area) #define geo_get_flags(g, mask) ((g)->flags & (mask)) #define geo_set_flags(g, mask) do {(g)->flags |= mask;} while(0) @@ -196,6 +201,7 @@ } while(0) #define coord_show(co) do { co->flags &= ~COF_HIDDEN; } while(0) #define coord_get_mouse_event(coord) ((coord)->mouse_event) +#define coord_get_aggr_matrix(coord) ((coord)->aggr_matrix) #define FOR_COORDS_POSTORDER(coord, cur) \ for((cur) = postorder_coord_subtree((coord), NULL); \ (cur) != NULL; \ @@ -269,6 +275,9 @@ #define sh_clear_flags(sh, mask) geo_clear_flags(sh_get_geo(sh), mask) #define sh_pos_is_in(sh, x, y) geo_pos_is_in(sh_get_geo(sh), x, y) #define sh_get_area(sh) geo_get_area(sh_get_geo(sh)) +#define sh_get_coord(sh) ((sh)->coord) +#define sh_get_fill(sh) ((sh)->fill) +#define sh_get_stroke(sh) ((sh)->stroke) /*! \brief A sprite is a set of graphics that being an object in animation.
--- a/inkscape/MB_Frame.py Sat Jan 31 12:54:13 2009 +0800 +++ b/inkscape/MB_Frame.py Sat Jan 31 13:01:07 2009 +0800 @@ -494,7 +494,7 @@ def effect(self): - self.OK = False + self.OK = True self.parseScene() self.showGrid() self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inkscape/Makefile Sat Jan 31 13:01:07 2009 +0800 @@ -0,0 +1,328 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# inkscape/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +pkgdatadir = $(datadir)/madbutterfly +pkglibdir = $(libdir)/madbutterfly +pkgincludedir = $(includedir)/madbutterfly +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +subdir = inkscape +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/wycc/devel/test/main/MadButterfly/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/wycc/devel/test/main/MadButterfly/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/wycc/devel/test/main/MadButterfly/missing --run autoconf +AUTOHEADER = ${SHELL} /home/wycc/devel/test/main/MadButterfly/missing --run autoheader +AUTOMAKE = ${SHELL} /home/wycc/devel/test/main/MadButterfly/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FGREP = /bin/grep -F +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = /usr/bin/ld +LDFLAGS = +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /home/wycc/devel/test/main/MadButterfly/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = madbutterfly +PACKAGE_BUGREPORT = http://www.assembla.com/spaces/MadButterfly +PACKAGE_NAME = MadButterfly +PACKAGE_STRING = MadButterfly 0.0 +PACKAGE_TARNAME = madbutterfly +PACKAGE_VERSION = 0.0 +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 0.0 +XMKMF = +abs_builddir = /home/wycc/devel/test/main/MadButterfly/inkscape +abs_srcdir = /home/wycc/devel/test/main/MadButterfly/inkscape +abs_top_builddir = /home/wycc/devel/test/main/MadButterfly +abs_top_srcdir = /home/wycc/devel/test/main/MadButterfly +ac_ct_CC = gcc +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +builddir = . +cairo_CFLAGS = -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 +cairo_LIBS = -lcairo +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/wycc/devel/test/main/MadButterfly/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +lt_ECHO = echo +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pangocairo_CFLAGS = -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 +pangocairo_LIBS = -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = .. +top_srcdir = .. +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign inkscape/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign inkscape/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT:
--- a/src/Makefile.am Sat Jan 31 12:54:13 2009 +0800 +++ b/src/Makefile.am Sat Jan 31 13:01:07 2009 +0800 @@ -8,11 +8,12 @@ observer.c paint.c redraw_man.c rotate.c shape_path.c \ shape_rect.c shape_text.c shift.c subtree_free.c timer.c \ timertool.c tools.c visibility.c X_supp.c prop.c sprite.c \ - mouse.c -libmbfly_la_CPPFLAGS = @cairo_CFLAGS@ -libmbfly_la_LDFLAGS = @cairo_LIBS@ + mouse.c shape_image.c img_ldr.c + +libmbfly_la_CPPFLAGS = @cairo_CFLAGS@ `pkg-config --cflags pangocairo` +libmbfly_la_LDFLAGS = @cairo_LIBS@ `pkg-config --libs pangocairo` X_main_SOURCES = X_main.c X_main_LDADD = $(top_builddir)/src/libmbfly.la -X_main_CPPFLAGS = @cairo_CFLAGS@ -I$(top_builddir)/src -X_main_LDFLAGS = @cairo_LIBS@ +X_main_CPPFLAGS = @pangocairo_CFLAGS@ -I$(top_builddir)/src +X_main_LDFLAGS = @pangocairo_LIBS@
--- a/src/Makefile.pmake Sat Jan 31 12:54:13 2009 +0800 +++ b/src/Makefile.pmake Sat Jan 31 13:01:07 2009 +0800 @@ -1,7 +1,8 @@ SRCS = coord.c geo.c shape_path.c shape_text.c shape_rect.c \ + shape_image.c \ redraw_man.c timer.c animate.c paint.c event.c observer.c \ X_supp.c timertool.c tools.c shift.c chgcolor.c \ - visibility.c rotate.c prop.c mouse.c + visibility.c rotate.c prop.c mouse.c img_ldr.c OBJS = ${SRCS:C/(.*)\.c/\1.o/g} TESTCASE_SRCS = ${SRCS:C/X_supp\.c//} TESTCASE_OBJS = ${TESTCASE_SRCS:C/(.*)\.c/testcase-\1.o/g}
--- a/src/X_main.c Sat Jan 31 12:54:13 2009 +0800 +++ b/src/X_main.c Sat Jan 31 13:01:07 2009 +0800 @@ -6,6 +6,7 @@ #include <X11/Xutil.h> #include <cairo.h> #include <cairo-xlib.h> +#include <pango/pangocairo.h> #include <string.h> #include "mb_shapes.h" @@ -138,6 +139,7 @@ mb_progm_t *progm; mb_word_t *word; mb_action_t *act; + PangoAttrList *attrs = pango_attr_list_new(); tmpsuf = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h); tmpcr = cairo_create(tmpsuf); @@ -155,7 +157,7 @@ face = cairo_get_font_face(tmpcr); text = rdman_shape_text_new(&rdman, "hello \xe6\xbc\xa2\xe5\xad\x97", - 10, h / 4, 36.0, face); + 10, h / 4, 36.0, face, attrs); text_fill = rdman_paint_radial_new(&rdman, 100, h / 4, 70); grad_stop_init(text_stops, 0, 0.2, 0.9, 0.2, 1); grad_stop_init(text_stops + 1, 1, 0.9, 0.2, 0.2, 0.1);
--- a/src/X_supp.c Sat Jan 31 12:54:13 2009 +0800 +++ b/src/X_supp.c Sat Jan 31 13:01:07 2009 +0800 @@ -35,6 +35,7 @@ cairo_t *cr, *backend_cr; redraw_man_t *rdman; mb_tman_t *tman; + mb_img_ldr_t *img_ldr; int w, h; X_kb_info_t kbinfo; @@ -419,6 +420,8 @@ */ static int X_MB_init(const char *display_name, int w, int h, X_MB_runtime_t *xmb_rt) { + mb_img_ldr_t *img_ldr; + memset(xmb_rt, 0, sizeof(X_MB_runtime_t)); xmb_rt->w = w; @@ -446,9 +449,15 @@ // to get the xmb_rt->tman for the animation. We should relocate the tman // to the redraw_man_t instead. xmb_rt->rdman->rt = xmb_rt; + xmb_rt->rdman->w = w; + xmb_rt->rdman->h = h; xmb_rt->tman = mb_tman_new(); + img_ldr = simple_mb_img_ldr_new("./"); + xmb_rt->img_ldr = img_ldr; + rdman_set_img_ldr(xmb_rt->rdman, img_ldr); + #ifndef ONLY_MOUSE_MOVE_RAW xmb_rt->last = NULL; #endif @@ -467,6 +476,9 @@ if(xmb_rt->tman) mb_tman_free(xmb_rt->tman); + if(xmb_rt->img_ldr) + MB_IMG_LDR_FREE(xmb_rt->img_ldr); + if(xmb_rt->cr) cairo_destroy(xmb_rt->cr); if(xmb_rt->backend_cr) @@ -521,3 +533,11 @@ factory = rdman_get_ob_factory(xmb_rt->rdman); return factory; } + +mb_img_ldr_t *X_MB_img_ldr(X_MB_runtime_t *xmb_rt) { + X_MB_runtime_t *img_ldr; + + img_ldr = xmb_rt->img_ldr; + + return img_ldr; +}
--- a/src/event.c Sat Jan 31 12:54:13 2009 +0800 +++ b/src/event.c Sat Jan 31 13:01:07 2009 +0800 @@ -21,52 +21,116 @@ #ifdef UNITTEST /* ============================================================ */ +#include <string.h> +#include "mb_tools.h" + +typedef float co_aix; typedef struct shape shape_t; +typedef struct cairo_surface cairo_surface_t; +typedef struct coord coord_t; typedef struct cairo cairo_t; struct cairo { - shape_t *drawed; + STAILQ(shape_t) drawed; + STAILQ(shape_t) clip_pathes; + cairo_surface_t *tgt; }; -#define cairo_in_fill(cr, x, y) 0 -#define cairo_in_stroke(cr, x, y) 0 -#define cairo_new_path(cr) -#define cairo_get_target(cr) NULL -#define cairo_create(target) NULL -#define cairo_destroy(cr) -#define cairo_clip(cr) -#define cairo_fill(cr) -#define cairo_image_surface_get_data(cr) NULL -#define cairo_image_surface_get_stride(cr) 1 struct cairo_surface { + cairo_t *cr; + int w, h; + unsigned char *data; }; -typedef struct cairo_surface cairo_surface_t; -#define cairo_image_surface_get_width(surface) 0 -#define cairo_image_surface_get_height(surface) 0 -#define cairo_image_surface_create(surface, w, h) NULL -#define cairo_surface_destroy(surface) + +#define cairo_new_path(cr) do { STAILQ_CLEAN((cr)->drawed); } while(0) +#define cairo_get_target(cr) (cr)->tgt +static +cairo_t *cairo_create(cairo_surface_t *target) { + cairo_t *cr; + + cr = (cairo_t *)malloc(sizeof(cairo_t)); + STAILQ_INIT(cr->drawed); + STAILQ_INIT(cr->clip_pathes); + cr->tgt = target; + target->cr = cr; + return cr; +} +#define cairo_destroy(cr) do { free(cr); } while(0) +#define cairo_clip(cr) \ + do { \ + memcpy(&(cr)->clip_pathes, \ + &(cr)->drawed, \ + sizeof((cr)->drawed)); \ + STAILQ_CLEAN((cr)->drawed); \ + } while(0) +#define cairo_fill(cr) -typedef float co_aix; +#define cairo_image_surface_get_width(surface) (surface)->w +#define cairo_image_surface_get_height(surface) (surface)->h +static +cairo_surface_t *cairo_image_surface_create(int format, int w, int h) { + cairo_surface_t *surf; + + surf = (cairo_surface_t *)malloc(sizeof(cairo_surface_t)); + surf->w = w; + surf->h = h; + surf->data = (unsigned char *)malloc(h); + memset(surf->data, 0, h); + + return surf; +} +#define cairo_surface_destroy(surface) \ + do { free((surface)->data); free(surface); } while(0) +#define cairo_image_surface_get_stride(surface) 1 +#define CAIRO_FORMAT_A1 1 + typedef struct _area area_t; struct _area { co_aix x, y; co_aix w, h; }; -#define range_overlay(as, aw, bs, bw) \ - (((bs) - (as)) <= (aw) || ((as) - (bs)) <= (bw)) +#define area_set(area, _x, _y, _w, _h) \ + do { \ + (area)->x = (_x); \ + (area)->y = (_y); \ + (area)->w = (_w); \ + (area)->h = (_h); \ + } while(0) +#define _in_range(a, s, w) ((a) >= (s) && (a) < ((s) + (w))) +#define _range_overlay(as, aw, bs, bw) \ + (_in_range(as, bs, bw) || _in_range(bs, as, aw)) #define areas_are_overlay(a1, a2) \ - (range_overlay((a1)->x, (a1)->w, \ - (a2)->x, (a2)->w) && \ - range_overlay((a1)->y, (a1)->h, \ - (a2)->y, (a2)->h)) + (_range_overlay((a1)->x, (a1)->w, \ + (a2)->x, (a2)->w) && \ + _range_overlay((a1)->y, (a1)->h, \ + (a2)->y, (a2)->h)) +#define area_pos_is_in(area, _x, _y) \ + (_in_range(_x, (area)->x, (area)->w) && \ + _in_range(_y, (area)->y, (area)->h)) +#define _range_extent(a, s, w) \ + do { \ + if((a) < (s)) { \ + (w) += (s) - (a); \ + (s) = (a); \ + } else { \ + (w) = MAX(w, (a) - (s) + 1); \ + } \ + } while(0) + +static +void area_extent(area_t *area, co_aix x, co_aix y) { + _range_extent(x, area->x, area->w); + _range_extent(y, area->y, area->h); +} struct mb_obj { int obj_type; }; typedef struct mb_obj mb_obj_t; +#define MB_OBJ_INIT(obj, type) do { (obj)->obj_type = type; } while(0) #define GEF_OV_DRAW 0x1 #define GEF_HIDDEN 0x2 @@ -74,7 +138,10 @@ struct shape { mb_obj_t obj; + coord_t *coord; area_t area; + shape_t *all_next; + shape_t *drawed_next; void *fill, *stroke; struct shape *sibling; @@ -106,75 +173,165 @@ #define sh_clear_flags(shape, mask) do { (shape)->flags &= ~(mask); } while(0) #define sh_get_area(shape) (&(shape)->area) -typedef struct coord coord_t; struct coord { mb_obj_t obj; area_t area; int flags; coord_t *parent; - coord_t *children; + STAILQ(coord_t) children; coord_t *sibling; - shape_t *shapes; + STAILQ(shape_t) shapes; }; #define COF_SKIP 0x1 #define coord_get_area(coord) (&(coord)->area) #define FOR_COORD_SHAPES(coord, shape) \ - for(shape = (coord)->shapes; \ - shape != NULL; \ - shape = (shape)->sibling) + for((shape) = STAILQ_HEAD((coord)->shapes); \ + (shape) != NULL; \ + (shape) = STAILQ_NEXT(shape_t, sibling, shape)) #define FOR_COORDS_PREORDER(root, last) \ - for(last = root; \ - last != NULL; \ - last = preorder_coord_subtree(root, last)) + for((last) = (root); \ + (last) != NULL; \ + (last) = preorder_coord_subtree(root, last)) +#define FOR_COORD_CHILDREN(parent, child) \ + for((child) = STAILQ_HEAD((parent)->children); \ + (child) != NULL; \ + (child) = STAILQ_NEXT(coord_t, sibling, child)) + +static +void _areas_merge(area_t *area1, area_t *area2) { + co_aix lu_x, lu_y; + co_aix rb_x, rb_y; + + lu_x = area2->x; + lu_y = area2->y; + rb_x = lu_x + area2->w - 1; + rb_y = lu_y + area2->h - 1; + area_extent(area1, lu_x, lu_y); + area_extent(area1, rb_x, rb_y); +} + +static +void coord_update_area(coord_t *coord) { + area_t *area; + shape_t *shape; + coord_t *child; + area_t *cur_area; + + area = coord_get_area(coord); + + shape = STAILQ_HEAD(coord->shapes); + if(shape != NULL) { + cur_area = sh_get_area(shape); + } else { + child = STAILQ_HEAD(coord->children); + if(child == NULL) + return; + cur_area = coord_get_area(child); + } + memcpy(area, cur_area, sizeof(area_t)); + + FOR_COORD_SHAPES(coord, shape) { + cur_area = sh_get_area(shape); + _areas_merge(area, cur_area); + } + + FOR_COORD_CHILDREN(coord, child) { + cur_area = coord_get_area(child); + _areas_merge(area, cur_area); + } +} + +static +void coord_update_area_ancestors(coord_t *coord) { + coord_t *cur; + + for(cur = coord; cur != NULL; cur = cur->parent) { + coord_update_area(cur); + } +} static coord_t *preorder_coord_subtree(coord_t *root, coord_t *last) { - if(last->children) - return last->children; - while(last->sibling == NULL) + if(STAILQ_HEAD(last->children) && !(last->flags & COF_SKIP)) + return STAILQ_HEAD(last->children); + if(last == root) + return NULL; + while(STAILQ_NEXT(coord_t, sibling, last) == NULL) { + if(last == root) + return NULL; last = last->parent; - return last->sibling; + } + return STAILQ_NEXT(coord_t, sibling, last); +} + +static +void preorder_coord_skip_subtree(coord_t *coord) { + coord->flags &= ~COF_SKIP; } static coord_t *postorder_coord_subtree(coord_t *root, coord_t *last) { coord_t *cur; - + if(last != NULL) { - if(last->sibling == NULL) { + if(STAILQ_NEXT(coord_t, sibling, last) == NULL) { + if(cur == root) + return NULL; cur = last->parent; return cur; } - cur = last->sibling; + cur = STAILQ_NEXT(coord_t, sibling, last); } - cur = last; - while(cur->children) { - cur = cur->children; + cur = root; + while(STAILQ_HEAD(cur->children)) { + cur = STAILQ_HEAD(cur->children); } return cur; } -#define sh_path_draw(path, cr) -#define sh_text_draw(path, cr) -#define sh_rect_draw(path, cr) +static +void shape_draw(shape_t *sh, cairo_t *cr) { + STAILQ_INS_TAIL(cr->drawed, shape_t, drawed_next, sh); +} + +#define sh_path_draw(path, cr) shape_draw((shape_t *)path, cr) +#define sh_text_draw(text, cr) shape_draw((shape_t *)text, cr) +#define sh_rect_draw(rect, cr) shape_draw((shape_t *)rect, cr) +static +void sh_update_area(shape_t *sh) { + int i; + co_aix x, y; + area_t *area = &sh->area; + + if(sh->num_points == 0) { + area_set(area, 0, 0, 0, 0); + return; + } + + area_set(area, sh->points[0][0], sh->points[0][1], 1, 1); + for(i = 1; i < sh->num_points; i++) { + x = sh->points[i][0]; + y = sh->points[i][1]; + area_extent(area, x, y); + } +} struct redraw_man { cairo_t *cr; + coord_t *root_coord; int shape_gl_sz; shape_t *shape_gl[32]; + STAILQ(shape_t) all_shapes; }; typedef struct redraw_man redraw_man_t; #define rdman_get_cr(rdman) ((rdman)->cr) -#define rdman_get_gen_geos(rdman) (&(rdman)->gen_geos) #define rdman_force_clean(rdman) OK -#define rdman_geos(rdman, geo) NULL -#define rdman_clear_shape_gl(rdman) \ - do {(rdman)->shape_gl_sz = 0; } while(0) +#define rdman_clear_shape_gl(rdman) do {(rdman)->shape_gl_sz = 0; } while(0) static int rdman_add_shape_gl(redraw_man_t *rdman, shape_t *shape) { (rdman)->shape_gl[(rdman)->shape_gl_sz++] = shape; return OK; @@ -182,9 +339,162 @@ #define rdman_get_shape_gl(rdman, idx) \ (rdman)->shape_gl[idx] #define rdman_shape_gl_len(rdman) (rdman)->shape_gl_sz -static shape_t *rdman_shapes(redraw_man_t *rdman, shape_t *last_shape); +static shape_t *rdman_shapes(redraw_man_t *rdman, shape_t *last_shape) { + if(last_shape == NULL) + return STAILQ_HEAD(rdman->all_shapes); + + return STAILQ_NEXT(shape_t, all_next, last_shape); +} +#define redraw_man_init(rdman, cr, backend) \ + do { \ + memset(rdman, 0, sizeof(redraw_man_t)); \ + (rdman)->cr = cr; \ + (rdman)->root_coord = rdman_coord_new_noparent(rdman); \ + } while(0) +#define redraw_man_destroy(rdman) \ + do { \ + free(rdman); \ + } while(0) +#define rdman_get_root(rdman) ((rdman)->root_coord) + +static coord_t *rdman_coord_new_noparent(redraw_man_t *rdman); + +static +redraw_man_t *redraw_man_new(cairo_t *cr, cairo_t *backend) { + redraw_man_t *rdman; + + rdman = O_ALLOC(redraw_man_t); + redraw_man_init(rdman, cr, backend); + return rdman; +} +#define redraw_man_free(rdman) \ + do { \ + redraw_man_destroy(rdman); \ + free(rdman); \ + } while(0) + +static +int cairo_in_fill(cairo_t *cr, int x, int y) { + shape_t *shape; + int i; + + for(shape = STAILQ_HEAD(cr->drawed); + shape != NULL; + shape = STAILQ_NEXT(shape_t, drawed_next, shape)) { + for(i = 0; i < shape->num_points; i++) + if(shape->points[i][0] == x && + shape->points[i][1] == y) + return 1; + } + return 0; +} + +#define cairo_in_stroke cairo_in_fill + +static +void rdman_coord_init_noparent(redraw_man_t *rdman, coord_t *co) { + memset(co, 0, sizeof(coord_t)); + MB_OBJ_INIT(&co->obj, MBO_COORD); + STAILQ_INIT(co->children); + STAILQ_INIT(co->shapes); +} + +static +void rdman_coord_init(redraw_man_t *rdman, coord_t *co, coord_t *parent) { + rdman_coord_init_noparent(rdman, co); + STAILQ_INS_TAIL(parent->children, coord_t, sibling, co); + co->parent = parent; +} + +static +coord_t *rdman_coord_new(redraw_man_t *rdman, coord_t *parent) { + coord_t *coord; + + coord = O_ALLOC(coord_t); + rdman_coord_init(rdman, coord, parent); + + return coord; +} +coord_t *rdman_coord_new_noparent(redraw_man_t *rdman) { + coord_t *coord; + coord = O_ALLOC(coord_t); + rdman_coord_init_noparent(rdman, coord); + + return coord; +} + +static +void rdman_coord_free(redraw_man_t *rdman, coord_t *coord) { + free(coord); +} + +static +shape_t *rdman_shape_new(redraw_man_t *rdman) { + shape_t *shape; + + shape = O_ALLOC(shape_t); + memset(shape, 0, sizeof(shape_t)); + MB_OBJ_INIT(&shape->obj, MBO_PATH); + STAILQ_INS(rdman->all_shapes, shape_t, all_next, shape); + + return shape; +} + +static +void rdman_shape_free(redraw_man_t *rdman, shape_t *shape) { + STAILQ_REMOVE(rdman->all_shapes, shape_t, all_next, shape); + free(shape); +} + +#define shape_add_point(shape, x, y) \ + do { \ + (shape)->points[(shape)->num_points][0] = x; \ + (shape)->points[(shape)->num_points][1] = y; \ + (shape)->num_points++; \ + sh_update_area(shape); \ + if((shape)->coord) \ + coord_update_area_ancestors((shape)->coord); \ + } while(0) + +static +int rdman_add_shape(redraw_man_t *rdman, shape_t *shape, + coord_t *parent) { + STAILQ_INS_TAIL(parent->shapes, shape_t, sibling, shape); + shape->coord = parent; + + return OK; +} + +static +void *cairo_image_surface_get_data(cairo_surface_t *surf) { + cairo_t *cr; + shape_t *shape1, *shape2; + co_aix x1, y1, x2, y2; + int i, j; + + cr = surf->cr; + + STAILQ_FOR_EACH(cr->drawed, shape_t, sibling, shape1) { + for(i = 0; i < shape1->num_points; i++) { + x1 = shape1->points[i][0]; + y1 = shape1->points[i][1]; + STAILQ_FOR_EACH(cr->clip_pathes, shape_t, sibling, shape2) { + for(j = 0; j < shape2->num_points; j++) { + x2 = shape2->points[j][0]; + y2 = shape2->points[j][1]; + if(x1 == x2 && y1 == y2) { + surf->data[0] = 1; + return surf->data; + } + } + } + } + } + surf->data[0] = 0; + return surf->data; +} /* ============================================================ */ #endif /* UNITTEST */ @@ -224,6 +534,9 @@ case MBO_RECT: sh_rect_draw(shape, cr); break; + case MBO_IMAGE: + sh_image_draw(shape, cr); + break; } } @@ -303,6 +616,7 @@ co_aix x, co_aix y, int *in_stroke) { coord_t *cur_coord, *root; shape_t *shape; + area_t *area; int r; if(IS_MBO_SHAPES(obj)) { @@ -311,9 +625,12 @@ return r; } root = (coord_t *)obj; - for(cur_coord = postorder_coord_subtree(root, NULL); - cur_coord != NULL; - cur_coord = postorder_coord_subtree(root, cur_coord)) { + FOR_COORDS_PREORDER(root, cur_coord) { + area = coord_get_area(cur_coord); + if(!area_pos_is_in(area, x, y)) { + preorder_coord_skip_subtree(cur_coord); + continue; + } FOR_COORD_SHAPES(cur_coord, shape) { r = _shape_pos_is_in(shape, x, y, in_stroke, rdman_get_cr(rdman)); if(r) @@ -410,6 +727,7 @@ } else { coord = (coord_t *)obj; area = coord_get_area(coord); + shape = NULL; } if(IS_MBO_SHAPES(others_root)) { @@ -529,39 +847,266 @@ static redraw_man_t *_fake_rdman(void) { redraw_man_t *rdman; - cairo_surface_t *surface; + cairo_t *cr, *backend; + cairo_surface_t *surf; - rdman = (redraw_man_t *)malloc(sizeof(redraw_man_t)); - surface = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); - rdman->cr = cairo_create(surface); - DARRAY_INIT(&rdman->gen_geos); + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + backend = cairo_create(surf); + rdman = redraw_man_new(cr, backend); + return rdman; } static void _free_fake_rdman(redraw_man_t *rdman) { + cairo_surface_destroy(rdman->cr->tgt); cairo_destroy(rdman->cr); - DARRAY_DESTROY(&rdman->gen_geos); free(rdman); } static void test_mb_obj_pos_is_in(void) { redraw_man_t *rdman; - mb_obj_t *obj; + shape_t *shape; + coord_t *root, *child_coord; + int in_stroke = 0; + int r; rdman = _fake_rdman(); CU_ASSERT(rdman != NULL); + root = rdman_get_root(rdman); + + child_coord = rdman_coord_new(rdman, root); + CU_ASSERT(child_coord != NULL); + + shape = rdman_shape_new(rdman); + CU_ASSERT(shape != NULL); + + rdman_add_shape(rdman, shape, child_coord); + + shape_add_point(shape, 3, 12); + + shape->fill = shape; + shape->stroke = shape; + + r = mb_obj_pos_is_in(rdman, (mb_obj_t *)shape, 3, 12, &in_stroke); + CU_ASSERT(r == TRUE); + + r = mb_obj_pos_is_in(rdman, (mb_obj_t *)shape, 3, 13, &in_stroke); + CU_ASSERT(r == FALSE); + + r = mb_obj_pos_is_in(rdman, (mb_obj_t *)root, 3, 12, &in_stroke); + CU_ASSERT(r == TRUE); + + r = mb_obj_pos_is_in(rdman, (mb_obj_t *)root, 4, 12, &in_stroke); + CU_ASSERT(r == FALSE); + + rdman_shape_free(rdman, shape); _free_fake_rdman(rdman); } static void test_is_obj_objs_overlay(void) { + redraw_man_t *rdman; + coord_t *root, *coord1, *coord2; + shape_t *shape1, *shape2, *shape3; + cairo_t *cr; + cairo_surface_t *surf; + int r; + + rdman = _fake_rdman(); + CU_ASSERT(rdman != NULL); + + root = rdman_get_root(rdman); + + coord1 = rdman_coord_new(rdman, root); + shape1 = rdman_shape_new(rdman); + rdman_add_shape(rdman, shape1, coord1); + + coord2 = rdman_coord_new(rdman, root); + shape2 = rdman_shape_new(rdman); + rdman_add_shape(rdman, shape2, coord2); + + shape3 = rdman_shape_new(rdman); + rdman_add_shape(rdman, shape3, coord2); + + shape_add_point(shape1, 3, 2); + shape_add_point(shape2, 5, 5); + shape_add_point(shape3, 4, 3); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)coord1, (mb_obj_t *)coord2, cr); + CU_ASSERT(!r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(coord2, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)shape1, (mb_obj_t *)coord2, cr); + CU_ASSERT(!r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(coord2, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)coord1, (mb_obj_t *)shape2, cr); + CU_ASSERT(!r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(shape2, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)shape1, (mb_obj_t *)shape2, cr); + CU_ASSERT(!r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(shape2, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)shape1, (mb_obj_t *)shape3, cr); + CU_ASSERT(!r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(shape3, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)coord1, (mb_obj_t *)shape3, cr); + CU_ASSERT(!r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(shape3, GEF_OV_DRAW); + + shape_add_point(shape1, 5, 5); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)coord1, (mb_obj_t *)coord2, cr); + CU_ASSERT(r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(coord2, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)shape1, (mb_obj_t *)coord2, cr); + CU_ASSERT(r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(coord2, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)coord1, (mb_obj_t *)shape2, cr); + CU_ASSERT(r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(shape2, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)shape1, (mb_obj_t *)shape2, cr); + CU_ASSERT(r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(shape2, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)shape1, (mb_obj_t *)shape3, cr); + CU_ASSERT(!r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(shape3, GEF_OV_DRAW); + + surf = cairo_image_surface_create(CAIRO_FORMAT_A1, 100, 100); + cr = cairo_create(surf); + r = _is_obj_objs_overlay((mb_obj_t *)coord1, (mb_obj_t *)shape3, cr); + CU_ASSERT(r); + cairo_destroy(cr); + cairo_surface_destroy(surf); + sh_clear_flags(shape3, GEF_OV_DRAW); + + rdman_shape_free(rdman, shape1); + rdman_shape_free(rdman, shape2); + rdman_shape_free(rdman, shape3); + rdman_coord_free(rdman, coord1); + rdman_coord_free(rdman, coord2); + _free_fake_rdman(rdman); } static void test_mb_objs_are_overlay(void) { + redraw_man_t *rdman; + coord_t *root, *coord1, *coord2; + shape_t *shape1, *shape2, *shape3; + int r; + + rdman = _fake_rdman(); + + root = rdman_get_root(rdman); + + coord1 = rdman_coord_new(rdman, root); + shape1 = rdman_shape_new(rdman); + rdman_add_shape(rdman, shape1, coord1); + + coord2 = rdman_coord_new(rdman, root); + shape2 = rdman_shape_new(rdman); + rdman_add_shape(rdman, shape2, coord2); + + shape3 = rdman_shape_new(rdman); + rdman_add_shape(rdman, shape3, coord2); + + shape_add_point(shape1, 3, 2); + shape_add_point(shape2, 5, 5); + shape_add_point(shape3, 4, 3); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)coord1, (mb_obj_t *)coord2); + CU_ASSERT(!r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)shape1, (mb_obj_t *)coord2); + CU_ASSERT(!r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)shape1, (mb_obj_t *)shape2); + CU_ASSERT(!r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)coord1, (mb_obj_t *)shape2); + CU_ASSERT(!r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)shape1, (mb_obj_t *)shape3); + CU_ASSERT(!r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)coord1, (mb_obj_t *)shape3); + CU_ASSERT(!r); + + shape_add_point(shape1, 5, 5); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)coord1, (mb_obj_t *)coord2); + CU_ASSERT(r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)shape1, (mb_obj_t *)coord2); + CU_ASSERT(r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)shape1, (mb_obj_t *)shape2); + CU_ASSERT(r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)coord1, (mb_obj_t *)shape2); + CU_ASSERT(r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)shape1, (mb_obj_t *)shape3); + CU_ASSERT(!r); + + r = mb_objs_are_overlay(rdman, (mb_obj_t *)coord1, (mb_obj_t *)shape3); + CU_ASSERT(!r); + + _free_fake_rdman(rdman); } CU_pSuite get_event_suite(void) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/img_ldr.c Sat Jan 31 13:01:07 2009 +0800 @@ -0,0 +1,125 @@ +#include <stdio.h> +#include <string.h> +#include <cairo.h> +#include "mb_tools.h" +#include "mb_img_ldr.h" + +/*! \brief Simple image loader. + * + */ +struct _simple_mb_img_ldr { + mb_img_ldr_t ldr; + const char *repo; /*!< \brief The directory of repository. */ +}; +typedef struct _simple_mb_img_ldr simple_mb_img_ldr_t; + +struct _simple_mb_img_data { + mb_img_data_t img; + cairo_surface_t *surf; +}; +typedef struct _simple_mb_img_data simple_mb_img_data_t; + +static void simple_mb_img_ldr_img_free(mb_img_data_t *img); + +static +mb_img_data_t *simple_mb_img_ldr_load(mb_img_ldr_t *ldr, const char *img_id) { + simple_mb_img_ldr_t *sldr = (simple_mb_img_ldr_t *)ldr; + simple_mb_img_data_t *img; + cairo_surface_t *surf; + char *fname; + cairo_format_t fmt; + int sz; + + sz = strlen(sldr->repo); + sz += strlen(img_id); + fname = (char *)malloc(sz + 2); + strcpy(fname, sldr->repo); + strcat(fname, img_id); + + surf = cairo_image_surface_create_from_png(fname); + if(surf == NULL) + return NULL; + + img = O_ALLOC(simple_mb_img_data_t); + if(img == NULL) { + cairo_surface_destroy(surf); + return NULL; + } + img->img.content = cairo_image_surface_get_data(surf); + img->img.w = cairo_image_surface_get_width(surf); + img->img.h = cairo_image_surface_get_height(surf); + img->img.stride = cairo_image_surface_get_stride(surf); + fmt = cairo_image_surface_get_format(surf); + switch(fmt) { + case CAIRO_FORMAT_ARGB32: + img->img.fmt = MB_IFMT_ARGB32; + break; + + case CAIRO_FORMAT_RGB24: + img->img.fmt = MB_IFMT_RGB24; + break; + + case CAIRO_FORMAT_A8: + img->img.fmt = MB_IFMT_A8; + break; + + case CAIRO_FORMAT_A1: + img->img.fmt = MB_IFMT_A1; + break; + + default: + cairo_surface_destroy(surf); + free(img); + return NULL; + } + img->img.free = simple_mb_img_ldr_img_free; + img->surf = surf; + + return (mb_img_data_t *)img; +} + +static +void simple_mb_img_ldr_img_free(mb_img_data_t *img) { + simple_mb_img_data_t *simg = (simple_mb_img_data_t *)img; + cairo_surface_destroy((cairo_surface_t *)simg->surf); + free(img); +} + +static +void simple_mb_img_ldr_free(mb_img_ldr_t *ldr) { + simple_mb_img_ldr_t *defldr = (simple_mb_img_ldr_t *)ldr; + + free((void *)defldr->repo); +} + +mb_img_ldr_t *simple_mb_img_ldr_new(const char *img_repository) { + simple_mb_img_ldr_t *ldr; + int sz; + + if(img_repository == NULL) + return NULL; + + ldr = O_ALLOC(simple_mb_img_ldr_t); + if(ldr == NULL) + return NULL; + + /* + * Copy and formalize path of image repository. + */ + sz = strlen(img_repository); + ldr->repo = (const char *)malloc(sz + 2); + if(ldr->repo == NULL) { + free(ldr); + return NULL; + } + strcpy((char *)ldr->repo, img_repository); + if(img_repository[sz - 1] != '/') { + ((char *)ldr->repo)[sz] = '/'; + ((char *)ldr->repo)[sz + 1] = 0; + } + + ldr->ldr.load = simple_mb_img_ldr_load; + ldr->ldr.free = simple_mb_img_ldr_free; + + return (mb_img_ldr_t *)ldr; +}
--- a/src/paint.c Sat Jan 31 12:54:13 2009 +0800 +++ b/src/paint.c Sat Jan 31 13:01:07 2009 +0800 @@ -23,6 +23,7 @@ static void paint_color_free(redraw_man_t *rdman, paint_t *paint) { shnode_list_free(rdman, paint->members); + paint_destroy(paint); elmpool_elm_free(rdman->paint_color_pool, paint); } @@ -108,6 +109,7 @@ if(linear->ptn) cairo_pattern_destroy(linear->ptn); + paint_destroy(paint); free(paint); } @@ -198,6 +200,7 @@ if(radial->ptn) cairo_pattern_destroy(radial->ptn); + paint_destroy(paint); free(paint); } @@ -241,3 +244,108 @@ return old_stops; } + +/*! \brief Using an image as a paint. + * + * This type of paints fill/stroke shapes with an image. + */ +typedef struct _paint_image { + paint_t paint; + mb_img_data_t *img; + cairo_surface_t *surf; + cairo_pattern_t *ptn; +} paint_image_t; + +static +void paint_image_prepare(paint_t *paint, cairo_t *cr) { + paint_image_t *paint_img = (paint_image_t *)paint; + mb_img_data_t *img_data; + + img_data = paint_img->img; + cairo_set_source(cr, paint_img->ptn); +} + +static +void paint_image_free(redraw_man_t *rdman, paint_t *paint) { + paint_image_t *paint_img = (paint_image_t *)paint; + mb_img_data_t *img_data; + + cairo_surface_destroy(paint_img->surf); + img_data = paint_img->img; + MB_IMG_DATA_FREE(img_data); + paint_destroy(&paint_img->paint); + free(paint); +} + +/*! \brief Create an image painter. + * + * Create a painter that fill/stroke shapes with an image. + */ +paint_t *rdman_paint_image_new(redraw_man_t *rdman, + mb_img_data_t *img) { + paint_image_t *paint; + int fmt; + + switch(img->fmt) { + case MB_IFMT_ARGB32: + fmt = CAIRO_FORMAT_ARGB32; + break; + case MB_IFMT_RGB24: + fmt = CAIRO_FORMAT_RGB24; + break; + case MB_IFMT_A8: + fmt = CAIRO_FORMAT_A8; + break; + case MB_IFMT_A1: + fmt = CAIRO_FORMAT_A1; + break; + default: + return NULL; + } + + paint = O_ALLOC(paint_image_t); + if(paint == NULL) + return NULL; + + paint_init(&paint->paint, paint_image_prepare, paint_image_free); + paint->img = img; + paint->surf = cairo_image_surface_create_for_data(img->content, + fmt, + img->w, + img->h, + img->stride); + if(paint->surf == NULL) { + paint_destroy(&paint->paint); + free(paint); + return NULL; + } + + paint->ptn = cairo_pattern_create_for_surface(paint->surf); + if(paint->ptn == NULL) { + paint_destroy(&paint->paint); + cairo_surface_destroy(paint->surf); + free(paint); + return NULL; + } + + return (paint_t *)paint; +} + +/*! \brief Setting transformation from user space to image space. + * + * This transformation matrix maps points drawed in user space to + * corresponding points in image space. It is used to resample + * the image to generate pixels of result image. + */ +void paint_image_set_matrix(paint_t *paint, co_aix matrix[6]) { + paint_image_t *img_paint = (paint_image_t *)paint; + cairo_matrix_t cmatrix; + + cmatrix.xx = matrix[0]; + cmatrix.xy = matrix[1]; + cmatrix.x0 = matrix[2]; + cmatrix.yx = matrix[3]; + cmatrix.yy = matrix[4]; + cmatrix.y0 = matrix[5]; + cairo_pattern_set_matrix(img_paint->ptn, &cmatrix); +}
--- a/src/prop.c Sat Jan 31 12:54:13 2009 +0800 +++ b/src/prop.c Sat Jan 31 13:01:07 2009 +0800 @@ -24,7 +24,7 @@ if(last == NULL) return; - for(entry = STAILQ_NEXT(mb_prop_entry_t, next, entry); + for(entry = STAILQ_NEXT(mb_prop_entry_t, next, last); entry != NULL; entry = STAILQ_NEXT(mb_prop_entry_t, next, entry)) { STAILQ_REMOVE(prop_store->entries, mb_prop_entry_t, next, last);
--- a/src/redraw_man.c Sat Jan 31 12:54:13 2009 +0800 +++ b/src/redraw_man.c Sat Jan 31 13:01:07 2009 +0800 @@ -316,6 +316,7 @@ subject_add_observer(rdman->root_coord->mouse_event, mouse_event_root_dummy, NULL); + mb_prop_store_init(&rdman->props, rdman->pent_pool); return OK; err: @@ -341,6 +342,8 @@ shape_t *shape, *saved_shape; geo_t *member; + mb_prop_store_destroy(&rdman->props); + free_free_objs(rdman); free_objs_destroy(rdman); @@ -474,6 +477,7 @@ elmpool_elm_free(rdman->geo_pool, geo); } STAILQ_REMOVE(rdman->shapes, shape_t, sh_next, shape); + mb_prop_store_destroy(&shape->obj.props); shape->free(shape); if(rdman->last_mouse_over == (mb_obj_t *)shape) @@ -638,6 +642,7 @@ RM_CHILD(parent, coord); subject_free(coord->mouse_event); + mb_prop_store_destroy(&coord->obj.props); elmpool_elm_free(rdman->coord_pool, coord); rdman->n_coords--; @@ -791,6 +796,9 @@ case MBO_RECT: sh_rect_transform(shape); break; + case MBO_IMAGE: + sh_image_transform(shape); + break; #ifdef UNITTEST default: sh_dummy_transform(shape); @@ -991,6 +999,9 @@ case MBO_RECT: sh_rect_draw(shape, cr); break; + case MBO_IMAGE: + sh_image_draw(shape, cr); + break; #ifdef UNITTEST default: sh_dummy_fill(shape, cr); @@ -1017,13 +1028,22 @@ } #ifndef UNITTEST -static void clean_canvas(cairo_t *cr) { +static void clean_canvas(cairo_t *cr, co_aix w, co_aix h) { /*! \todo clean to background color. */ cairo_set_source_rgb(cr, 1, 1, 1); +#if 1 + /* For some unknown reasons, cairo_paint() can not erease + * painted graphic cleanly. So, cairo_fill() are used to + * replace it. + */ + cairo_rectangle(cr, 0, 0, w, h); + cairo_fill(cr); +#else cairo_paint(cr); +#endif } -static void clean_canvas_black(cairo_t *cr) { +static void clean_canvas_black(cairo_t *cr, co_aix w, co_aix h) { /*! \todo clean to background color. */ cairo_set_source_rgba(cr, 0, 0, 0, 0); cairo_paint(cr); @@ -1053,10 +1073,10 @@ cairo_paint(rdman->backend); } #else /* UNITTEST */ -static void clean_canvas(cairo_t *cr) { +static void clean_canvas(cairo_t *cr, co_aix w, co_aix h) { } -static void clean_canvas_black(cairo_t *cr) { +static void clean_canvas_black(cairo_t *cr, co_aix w, co_aix h) { } static void reset_clip(redraw_man_t *rdman) { @@ -1131,7 +1151,7 @@ if(dirty && coord->flags & COF_OWN_CANVAS) { update_canvas_2_parent(rdman, coord); - clean_canvas_black(coord->canvas); + clean_canvas_black(coord->canvas, rdman->w, rdman->h); } return dirty; @@ -1193,7 +1213,7 @@ /*! \brief Draw shapes in preorder of coord tree and support opacity * rules. */ - clean_canvas(rdman->cr); + clean_canvas(rdman->cr, rdman->w, rdman->h); draw_shapes_in_areas(rdman, n_dirty_areas, dirty_areas); copy_cr_2_backend(rdman, rdman->dirty_areas.num, rdman->dirty_areas.ds);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/shape_image.c Sat Jan 31 13:01:07 2009 +0800 @@ -0,0 +1,185 @@ +#include <stdio.h> +#include <string.h> +#include <cairo.h> +#include "mb_types.h" +#include "mb_shapes.h" +#include "mb_img_ldr.h" +#include "mb_tools.h" + +/*! \page sh_image_n_image_ldr Image and Image Loader + * + * Image (\ref sh_image_t) is a shape to show an image on the output + * device. Programmers manipulate object of an image shape to show it + * at specified position with specified size. To create a new instance + * of sh_iamge_t, an image should be specified. Programmers must have + * a way to load image from files. The solution proposed by MadButterfly + * is image loader (\ref mb_img_ldr_t). + * + * Image loader is a repository of image files, programmers give him an + * ID and get an image returned the loader. Image loader decodes image + * files specified IDs and return them in an internal representation. + * The internal representation of an array of pixels. Pixels are in + * order of columns (X-axis) and then row by row (Y-axis). An pixel + * can be 32bits, for ARGB, 24bits, for RGB, 8bits, for 8bits Alpha or + * 256-grey-levels, and 1bits, for bitmap. + * + * Every row is padded to round to byte boundary, a rounded row is a stride. + * Bytes a stride occupied is stride size. The internal rpresentation + * is a series of strides. The data returned by image loader is + * \ref mb_img_data_t type. mb_img_data_t::content is data in internal + * representation. + * + * \ref simple_mb_img_ldr_t is a simple implementation of image loader. + * It is a repository of image files in a directory and sub-directories. + * ID of an image is mapped to a file in the directory and sub-directories. + * ID it-self is a relative path relate to root directory of the repository. + * \ref simple_mb_img_ldr_t handle PNG files only, now. + * + * \section get_img_ldr Get an Image Loader for Program + * redraw_man_t::img_ldr is an image loader assigned by backend. + * X backend, now, create an instance of simple_mb_img_ldr_t and assigns + * the instance to redraw_man_t::img_ldr. Programmers should get + * image loader assigned for a rdman by calling rdman_img_ldr(). + * + * \image html image_n_ldr.png + * \image latex image_n_ldr.eps "Relationship of image and loader" width=10cm + */ + +#define ASSERT(x) +#define OK 0 +#define ERR -1 + +/*! \brief Image shape. + */ +typedef struct _sh_image { + shape_t shape; + + co_aix x, y; + co_aix w, h; + co_aix poses[4][2]; + + mb_img_data_t *img_data; + paint_t *paint; + redraw_man_t *rdman; +} sh_image_t; + +static void sh_image_free(shape_t *shape); + +/*! \brief Creae a new image shape. + * + * \param img_data is image data whose owner-ship is transfered. + */ +shape_t *rdman_shape_image_new(redraw_man_t *rdman, mb_img_data_t *img_data, + co_aix x, co_aix y, co_aix w, co_aix h) { + sh_image_t *img; + cairo_format_t fmt; + paint_t *paint; + + img = O_ALLOC(sh_image_t); + if(img == NULL) + return NULL; + + memset(img, 0, sizeof(sh_image_t)); + + img->shape.free = sh_image_free; + mb_obj_init((mb_obj_t *)img, MBO_IMAGE); + img->x = x; + img->y = y; + img->w = w; + img->h = h; + img->img_data = img_data; + + paint = rdman_paint_image_new(rdman, img_data); + rdman_paint_fill(rdman, paint, (shape_t *)img); + img->paint = paint; + img->rdman = rdman; + + return (shape_t *)img; +} + +void sh_image_free(shape_t *shape) { + sh_image_t *img = (sh_image_t *)shape; + + rdman_paint_free(img->rdman, img->paint); + mb_obj_destroy(shape); + MB_IMG_DATA_FREE(img->img_data); + free(img); +} + +void sh_image_transform(shape_t *shape) { + sh_image_t *img = (sh_image_t *)shape; + mb_img_data_t *img_data; + co_aix (*poses)[2]; + co_aix img_matrix[6]; + co_aix x_factor, y_factor; + cairo_matrix_t cmatrix; + int i; + + img_data = img->img_data; + + poses = img->poses; + poses[0][0] = img->x; + poses[0][1] = img->y; + poses[1][0] = img->x + img->w; + poses[1][1] = img->y; + poses[2][0] = img->x + img->w; + poses[2][1] = img->y + img->h; + poses[3][0] = img->x; + poses[3][1] = img->y + img->h; + for(i = 0; i < 4; i++) + coord_trans_pos(img->shape.coord, &poses[i][0], &poses[i][1]); + + /* Transformation from user space to image space */ + img_matrix[0] = (poses[1][0] - poses[0][0]) / img->w; + img_matrix[1] = (poses[1][1] - poses[0][1]) / img->w; + img_matrix[2] = -poses[0][0]; + img_matrix[3] = (poses[3][0] - poses[0][0]) / img->h; + img_matrix[4] = (poses[3][1] - poses[0][1]) / img->h; + img_matrix[5] = -poses[0][1]; + if(img->w != img_data->w || + img->h != img_data->h) { + /* Resize image */ + x_factor = img_data->w / img->w; + img_matrix[0] *= x_factor; + img_matrix[1] *= x_factor; + img_matrix[2] *= x_factor; + y_factor = img_data->h / img->h; + img_matrix[3] *= y_factor; + img_matrix[4] *= y_factor; + img_matrix[5] *= y_factor; + } + paint_image_set_matrix(sh_get_fill(shape), img_matrix); + + geo_from_positions(sh_get_geo(shape), 4, poses); +} + +/*! \brief Draw image for an image shape. + * + * \note Image is not rescaled for size of the shape. + */ +void sh_image_draw(shape_t *shape, cairo_t *cr) { + sh_image_t *img = (sh_image_t *)shape; + cairo_pattern_t *saved_source; + cairo_matrix_t matrix, saved_matrix; + co_aix *aggr; + + cairo_move_to(cr, img->poses[0][0], img->poses[0][1]); + cairo_line_to(cr, img->poses[1][0], img->poses[1][1]); + cairo_line_to(cr, img->poses[2][0], img->poses[2][1]); + cairo_line_to(cr, img->poses[3][0], img->poses[3][1]); + cairo_close_path(cr); +} + +/*! \brief Change geometry of an image. + * + * Set position and size of an image. + */ +void sh_image_set_geometry(shape_t *shape, co_aix x, co_aix y, + co_aix w, co_aix h) { + sh_image_t *img = (sh_image_t *)shape; + + img->x = x; + img->y = y; + img->w = w; + img->h = h; +}
--- a/src/shape_path.c Sat Jan 31 12:54:13 2009 +0800 +++ b/src/shape_path.c Sat Jan 31 13:01:07 2009 +0800 @@ -53,11 +53,16 @@ #include <math.h> /*! \brief Calculate center of the ellipse of an arc. * + * Origin of our coordination is left-top corner, and y-axis are grown + * to down-side. + * + * Space of the arc is transformed to space that correspondent + * ellipse containing the arc is mapped into an unit circle. * - ux0 = x0 / rx * - uy0 = y0 / ry * - ux = x / rx - * - uy = y / rx - * ux0, uy0, ux, yu are got by transforming (x0, y0) and (x, y) into points + * - uy = y / ry + * ux0, uy0, ux, uy are got by transforming (x0, y0) and (x, y) into points * on the unit circle. The center of unit circle are (ucx, ucy): * - umx = (ux0 + ux) / 2 * - umy = (uy0 + uy) / 2 @@ -68,7 +73,9 @@ * * - udx * udcx + udy * udcy = 0 * - * - udl2 = udx ** 2 + udy ** 2; + * - udl2 = udx ** 2 + udy ** 2 + * + * For drawing small arc in clockwise * - udx * udcy - udy * udcx = sqrt((1 - udl2) * udl2) * * - udcy = -udcx * udx / udy @@ -118,9 +125,11 @@ udl2 = udx2 + udy2; if(udy != 0) { + /* center is at left-side of arc */ udcx = -sqrtf((1 - udl2) * udl2) / (udy + udx2 / udy); udcy = -udcx * udx / udy; } else { + /* center is at down-side of arc */ udcx = 0; udcy = sqrtf((1 - udl2) * udl2) / udx; } @@ -779,10 +788,10 @@ poses = (co_aix (*)[2])(path->dev_data + path->cmd_len); geo_from_positions(path->shape.geo, arg_len / 2, poses); area = shape->geo->cur_area; - area->x -= shape->stroke_width/2 + 1; - area->y -= shape->stroke_width/2 + 1; - area->w += shape->stroke_width + 2; - area->h += shape->stroke_width + 2; + area->x -= shape->stroke_width / 2 + 0.5; + area->y -= shape->stroke_width / 2 + 0.5; + area->w += shape->stroke_width + 1; + area->h += shape->stroke_width + 1; } }
--- a/src/shape_rect.c Sat Jan 31 12:54:13 2009 +0800 +++ b/src/shape_rect.c Sat Jan 31 13:01:07 2009 +0800 @@ -122,10 +122,10 @@ if(shape->stroke) { area = shape->geo->cur_area; width = shape->stroke_width; - area->x -= width / 2 + 1; - area->y -= width / 2 + 1; - area->w += width + 2; - area->h += width + 2; + area->x -= width / 2 + 0.5; + area->y -= width / 2 + 0.5; + area->w += width + 1; + area->h += width + 1; } }
--- a/src/shape_text.c Sat Jan 31 12:54:13 2009 +0800 +++ b/src/shape_text.c Sat Jan 31 13:01:07 2009 +0800 @@ -3,6 +3,7 @@ #include <string.h> #include <math.h> #include <cairo.h> +#include <pango/pangocairo.h> #include "mb_types.h" #include "mb_shapes.h" @@ -20,6 +21,8 @@ cairo_font_face_t *face; cairo_scaled_font_t *scaled_font; int flags; + PangoLayout *layout; + PangoAttrList *attrs; } sh_text_t; #define TXF_SCALE_DIRTY 0x1 @@ -32,15 +35,17 @@ cairo_font_face_destroy(text->face); } +static void sh_text_P_generate_layout(sh_text_t *text,cairo_t *cr); shape_t *rdman_shape_text_new(redraw_man_t *rdman, const char *txt, co_aix x, co_aix y, - co_aix font_size, cairo_font_face_t *face) { + co_aix font_size, cairo_font_face_t *face,PangoAttrList *attrs) { sh_text_t *text; text = (sh_text_t *)malloc(sizeof(sh_text_t)); if(text == NULL) return NULL; + memset(text, 0, sizeof(sh_text_t)); mb_obj_init(text, MBO_TEXT); text->data = strdup(txt); @@ -56,6 +61,9 @@ text->flags |= TXF_SCALE_DIRTY; text->shape.free = sh_text_free; + text->layout = NULL; + text->attrs = attrs; + sh_text_P_generate_layout(text, rdman->cr); rdman_shape_man(rdman, (shape_t *)text); @@ -71,39 +79,14 @@ text->data = buf; } -static int get_extents(sh_text_t *text, cairo_text_extents_t *extents) { +static int get_extents(sh_text_t *text, PangoRectangle *extents) { cairo_matrix_t fmatrix; cairo_matrix_t ctm; cairo_scaled_font_t *new_scaled; cairo_font_options_t *fopt; - if((text->flags & TXF_SCALE_DIRTY) || - text->scaled_font == NULL) { - fopt = cairo_font_options_create(); - if(fopt == NULL) - return ERR; - memset(&fmatrix, 0, sizeof(cairo_matrix_t)); - fmatrix.xx = text->d_font_size; - fmatrix.yy = text->d_font_size; - memset(&ctm, 0, sizeof(cairo_matrix_t)); - ctm.xx = 1; - ctm.yy = 1; - new_scaled = cairo_scaled_font_create(text->face, - &fmatrix, - &ctm, - fopt); - cairo_font_options_destroy(fopt); - if(new_scaled == NULL) - return ERR; - - if(text->scaled_font) - cairo_scaled_font_destroy(text->scaled_font); - text->scaled_font = new_scaled; - text->flags &= ~TXF_SCALE_DIRTY; - } - - cairo_scaled_font_text_extents(text->scaled_font, - text->data, extents); + pango_layout_get_extents(text->layout, NULL, extents); + pango_extents_to_pixels(extents,NULL); return OK; } @@ -111,7 +94,7 @@ sh_text_t *text; co_aix x, y; co_aix shw; - cairo_text_extents_t extents; + PangoRectangle extents; co_aix poses[2][2]; int r; @@ -123,27 +106,45 @@ y = text->y; coord_trans_pos(shape->coord, &x, &y); r = get_extents(text, &extents); + + //printf("x=%f y=%f text=%s ascent=%d,descent=%d,width=%d height=%d\n", x,y,text->data,PANGO_ASCENT(extents), PANGO_DESCENT(extents), extents.width, extents.height); ASSERT(r == OK); text->d_x = x; - text->d_y = y; + text->d_y = y-text->font_size; shw = shape->stroke_width / 2; /* FIXME: It is unreasonable that a font exceed it's bbox. * We add 5 pixels in get right bbox. But, it is unreasonable. */ - poses[0][0] = x + extents.x_bearing - 5 - shw; - poses[0][1] = y + extents.y_bearing - 5 - shw; + + poses[0][0] = x + extents.x - 5 - shw; + poses[0][1] = y + extents.y - 5 - shw; poses[1][0] = poses[0][0] + extents.width + 10 + shape->stroke_width; poses[1][1] = poses[0][1] + extents.height + 10 + shape->stroke_width; geo_from_positions(shape->geo, 2, poses); /*! \todo Support ratation for shape_text. */ } +static void sh_text_P_generate_layout(sh_text_t *text,cairo_t *cr) +{ + PangoAttribute *attr; + PangoAttrList *attrlist; + PangoFontDescription *desc; + if (text->layout) { + g_object_unref(text->layout); + } + text->layout = pango_cairo_create_layout(cr); + desc = pango_font_description_from_string("Sans Bold"); + pango_layout_set_font_description (text->layout, desc); + pango_cairo_update_layout(cr,text->layout); + pango_layout_set_text(text->layout,text->data,strlen(text->data)); + pango_layout_set_attributes(text->layout, text->attrs); +} static void draw_text(sh_text_t *text, cairo_t *cr) { - cairo_set_scaled_font(cr, text->scaled_font); + sh_text_P_generate_layout(text, cr); cairo_move_to(cr, text->d_x, text->d_y); - cairo_text_path(cr, text->data); + pango_cairo_show_layout(cr,text->layout); }
--- a/tools/mb_c_header.m4 Sat Jan 31 12:54:13 2009 +0800 +++ b/tools/mb_c_header.m4 Sat Jan 31 13:01:07 2009 +0800 @@ -20,6 +20,19 @@ define([ADD_TEXT],[ [ shape_t *$1; ]]) +define([ADD_IMAGE],[[ + mb_img_data_t *$1_img_data; + shape_t *$1; +]]) +define([PANGO_BEGIN_TEXT],[ +[ shape_t *$1; +]]) +define([PANGO_END_TEXT],[ +]) +define([PANGO_SIZE],[]) +define([PANGO_STYLE],[]) +define([PANGO_WEIGHT],[]) +define([PANGO_FAMILY],[]) define([COLOR_STOP],[ ]) define([REF_STOPS_RADIAL],)
--- a/tools/mb_c_source.m4 Sat Jan 31 12:54:13 2009 +0800 +++ b/tools/mb_c_source.m4 Sat Jan 31 13:01:07 2009 +0800 @@ -20,6 +20,13 @@ define([ADD_RECT]) define([ADD_COORD]) define([ADD_TEXT],) +define([ADD_IMAGE],) +define([PANGO_BEGIN_TEXT],) +define([PANGO_END_TEXT],) +define([PANGO_SIZE],) +define([PANGO_STYLE],) +define([PANGO_WEIGHT],) +define([PANGO_FAMILY],) define([FILL_SHAPE]) define([STROKE_SHAPE]) define([FILL_SHAPE_WITH_PAINT]) @@ -119,6 +126,49 @@ rdman_add_shape(rdman, obj->$1, obj->$6); ]]) +define([S_ADD_IMAGE],[[ + obj->$1_img_data = MB_IMG_LDR_LOAD(img_ldr, "$2"); + obj->$1 = rdman_shape_image_new(rdman, obj->$1_img_data, + $3, $4, $5, $6); + rdman_add_shape(rdman, obj->$1, obj->$7); +]]) +define([S_PANGO_BEGIN_TEXT],[[ + { + PangoAttribute *attr; + PangoAttrList *attrs = pango_attr_list_new(); + +]]) +define([S_PANGO_END_TEXT],[[ + obj->$1 = rdman_shape_text_new(rdman, "$2", $3, $4, $5, + cairo_get_font_face(rdman->cr),attrs); + rdman_add_shape(rdman, obj->$1, obj->$6); + } +]]) +define([S_PANGO_SIZE],[[ + attr = pango_attr_size_new($1); + attr->start_index = $2; + attr->end_index = $3; + pango_attr_list_insert(attrs,attr); +]]) +define([S_PANGO_WEIGHT],[[ + attr = pango_attr_weight_new($1); + attr->start_index = $2; + attr->end_index = $3; + pango_attr_list_insert(attrs,attr); +]]) +define([S_PANGO_FAMILY],[[ + attr = pango_attr_family_new("$1"); + attr->start_index = $2; + attr->end_index = $3; + pango_attr_list_insert(attrs,attr); +]]) +define([S_PANGO_STYLE],[[ + attr = pango_attr_style_new($1); + attr->start_index = $2; + attr->end_index = $3; + pango_attr_list_insert(attrs,attr); +]]) + define([S_FILL_SHAPE_WITH_PAINT],[dnl [ rdman_paint_fill(rdman, obj->$2, obj->$1); ]]) @@ -203,6 +253,13 @@ SIMPORT([ADD_RECT]) SIMPORT([ADD_COORD]) SIMPORT([ADD_TEXT]) +SIMPORT([ADD_IMAGE]) +SIMPORT([PANGO_BEGIN_TEXT]) +SIMPORT([PANGO_END_TEXT]) +SIMPORT([PANGO_SIZE]) +SIMPORT([PANGO_WEIGHT]) +SIMPORT([PANGO_FAMILY]) +SIMPORT([PANGO_STYLE]) SIMPORT([FILL_SHAPE]) SIMPORT([STROKE_SHAPE]) SIMPORT([FILL_SHAPE_WITH_PAINT]) @@ -241,6 +298,20 @@ rdman_shape_free(rdman, obj->$1); ]]) +define([F_ADD_IMAGE],[[ + rdman_shape_free(rdman, obj->$1); + MB_IMAGE_DATA_FREE(obj->$1_img_data); +]]) +define([F_PANGO_BEGIN_TEXT],[[ + rdman_shape_free(rdman, obj->$1); +]]) +define([F_PANGO_SIZE],[[ +]]) +define([F_PANGO_STYLE],[[ +]]) +define([F_PANGO_WEIGHT],[[ +]]) + define([F_FILL_SHAPE],[[ rdman_paint_free(rdman, obj->$1_fill); ]]) @@ -257,6 +328,7 @@ FIMPORT([ADD_PATH],) FIMPORT([ADD_RECT]) FIMPORT([ADD_TEXT]) +FIMPORT([PANGO_BEGIN_TEXT]) FIMPORT([FILL_SHAPE]) FIMPORT([STROKE_SHAPE]) divert[]]) @@ -283,6 +355,7 @@ RIMPORT([ADD_RECT]) RIMPORT([ADD_COORD]) RIMPORT([ADD_TEXT]) +RIMPORT([PANGO_BEGIN_TEXT]) RIMPORT([FILL_SHAPE]) RIMPORT([STROKE_SHAPE]) RIMPORT([FILL_SHAPE_WITH_PAINT])
--- a/tools/svg2code.py Sat Jan 31 12:54:13 2009 +0800 +++ b/tools/svg2code.py Sat Jan 31 13:01:07 2009 +0800 @@ -125,8 +125,11 @@ def translate_style(node, coord_id, codefo, doc, prefix): node_id = node.getAttribute('id') - style_str = node.getAttribute('style') - prop_map = get_style_map(style_str) + try: + prop_map = node.style_map + except: + style_str = node.getAttribute('style') + prop_map = get_style_map(style_str) try: opacity = float(node.getAttribute('opacity')) @@ -210,6 +213,63 @@ pass return coord_id +## \brief Calculate geometry of ellipse where the arc is on. +# +# This function calculate the ellipse with information from SVG path data. +# +# \see calc_center_and_x_aix() +def _calc_ellipse_of_arc(x0, y0, rx, ry, x_rotate, large, sweep, x, y): + import math + + _sin = math.sin(x_rotate) + _cos = math.cos(x_rotate) + + nrx = x * _cos + y * _sin + nry = x * -_sin + y * _cos + nrx0 = x0 * _cos + y0 * _sin + nry0 = x0 * -_sin + y0 * _cos + + udx = (nrx - nrx0) / 2 / rx # ux - umx + udy = (nry - nry0) / 2 / ry # uy - umy + umx = (nrx + nrx0) / 2 / rx + umy = (nry + nry0) / 2 / ry + + udx2 = udx * udx + udy2 = udy * udy + udl2 = udx2 + udy2 + + if udy != 0: + # center is at left-side of arc + udcx = -math.sqrt((1 - udl2) * udl2) / (udy + udx2 / udy) + udcy = -udcx * udx / udy + else: + # center is at down-side of arc + udcx = 0 + udcy = math.sqrt((1 - udl2) * udl2) / udx + pass + + reflect = 0 + if large: + reflect ^= 1 + pass + if sweep != 1: + reflect ^= 1 + pass + if reflect: + udcx = -udcx + udcy = -udcy + pass + + nrcx = rx * (udcx + umx) + nrcy = ry * (udcy + umy) + + cx = nrcx * _cos - nrcy * _sin + cy = nrcx * _sin + nrcy * _cos + + xx = rx * _cos + cx + xy = rx * _sin + cy + return cx, cy, xx, xy + # M x y : Move to (x,y) # Z : close path # L x y : lineto (x,y) @@ -233,8 +293,8 @@ 'C': 6, 'c':6, 'S': 4, 's':4, 'Q': 4, 'q':4, - 'T': 2, 't':2} - + 'T': 2, 't':2, + 'A': 7, 'a':7} def translate_path_data(data,codefo): temp = data.split() @@ -244,33 +304,40 @@ if s != '': fields.append(s) cmd = '' + cmd_args=0 commands='' args=[] fix_args=[] for f in fields: - if cmd == 'A' or cmd == 'a': - try: - d = int(f) - fix_args.append(d) - if (narg % 7) == 0: - commands = commands + cmd - narg = narg + 1 - except: - pass - else: - try: - d = float(f) - args.append(d) - if (narg % command_length[cmd]) == 0: - commands = commands + cmd - narg = narg + 1 - continue - except: - pass - cmd = f - narg=0 - pass - return [commands,args,fix_args] + if f in command_length: + if cmd_args != 0 and (narg % cmd_args) != 0: + raise ValueError, 'invalid path data %s' % (repr(fields)) + cmd = f + cmd_args = command_length[f] + narg = 0 + continue + + if (narg % cmd_args) == 0: + commands = commands + cmd + pass + arg = float(f) + args.append(arg) + narg = narg + 1 + + if (narg % cmd_args) == 0 and (cmd in 'Aa'): + x0, y0, rx, ry, x_rotate, large, sweep, x, y = \ + tuple(args[-9:]) + x_rotate = int(x_rotate) + large = int(large) + sweep = int(sweep) + cx, cy, xx, xy = _calc_ellipse_of_arc(x0, y0, rx, ry, + x_rotate, large, + sweep, x, y) + args[-7:] = [cx, cy, xx, xy, x, y] + fix_args.append(sweep) + pass + pass + return commands, args, fix_args _id_sn = 0 @@ -350,47 +417,157 @@ style_str = text.getAttribute('style') style_map = get_style_map(style_str) - font_sz = 10.0 - if style_map.has_key('font-size'): - if style_map['font-size'].endswith('px'): - font_sz = float(style_map['font-size'][:-2]) - print >> codefo, 'define([MB_FONT_SZ], %f)dnl' % (font_sz) + return style_map + +def merge_style(tspan,text): + newmap = tspan.style_map + map = text.style_map + for k,v in text.style_map.items(): + if not newmap.has_key(k): + newmap[k] = v +def translate_tspan(tspan, text,coord_id, codefo, doc,txt_strs,attrs): + try: + map = tspan.style_map + except: + map = translate_font_style(tspan, codefo) + tspan.style_map = map + if tspan.hasAttribute('x'): + # Render the tspan as an independent text if the x attribute is defined. All elements inside + # the tspan will be ignore by the outter text or tspan elements. + # FIXME: We need to apply the style map recursively. + merge_style(tspan,text) + translate_text(tspan,coord_id,codefo,doc) + return '' + attr = [len(txt_strs.encode('utf8'))-1,0, tspan] + attrs.append(attr) + for node in tspan.childNodes: + if node.localName == None: + txt_strs = txt_strs + node.data + elif node.localName == 'tspan': + txt_strs = translate_tspan(node,coord_id, codefo, doc,txt_strs,attrs) pass pass + attr[1] = len(txt_strs.encode('utf8')) + return txt_strs - font_style = 'normal' - if style_map.has_key('font-style'): - font_style = style_map['font-style'].lower() + + +def generate_font_attributes(attrs,coord_id, codefo,doc): + for a in attrs: + start = a[0] + end = a[1] + node = a[2] + #print "generate attributes from %d to %d" %(start,end) + style_map = node.style_map + #print [style_map] + if style_map.has_key('font-size'): + # FIXME: Implement all units here + if style_map['font-size'].endswith('px'): + font_sz = float(style_map['font-size'][:-2]) + print >> codefo, 'PANGO_SIZE(%d,%d,%d)' % (font_sz*1024,start,end) + else: + font_sz = float(style_map['font-size']) + print >> codefo, 'PANGO_SIZE(%d,%d,%d)' % (font_sz*1024,start,end) + pass + + if style_map.has_key('font-style'): + font_style = style_map['font-style'].lower() + if font_style == 'normal': + print >> codefo, 'PANGO_STYLE(PANGO_STYLE_NORMAL,%d,%d)' % (start,end) + elif font_style == 'italic': + print >> codefo, 'PANGO_STYLE(PANGO_STYLE_ITALIC,%d,%d)' % (start,end) + elif font_style == 'oblique': + print >> codefo, 'PANGO_STYLE(PANGO_STYLE_OBLIQUE,%d,%d)' % (start,end) pass - font_family = 'Roman' - if style_map.has_key('font-family'): - font_family = style_map['font-family'].lower() + if style_map.has_key('font-family'): + font_family = style_map['font-family'].lower() + print >> codefo, 'PANGO_FAMILY(%s,%d,%d)' % (font_family,start,end) + pass + if style_map.has_key('text-anchor'): + text_anchor = style_map['text-anchor'].lower() + # FIXME: We need to implement a mb_text_set_aligment to implement SVG-styled alignment. + print "The text-anchor is not implemented yet" + pass + if style_map.has_key('font-variant'): + font_variant = style_map['font-variant'].lower() + print "The font-variant is not implemented yet" + pass + if style_map.has_key('font-weight'): + font_weight = style_map['font-weight'].lower() + if font_weight == 'normal': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_NORMAL,%d,%d)' % (start,end) + elif font_weight == 'bold': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_BOLD,%d,%d)' % (start,end) + elif font_weight == 'bolder': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_HEAVY,%d,%d)' % (start,end) + elif font_weight == 'lighter': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRALIGHT,%d,%d)' % (start,end) + elif font_weight == '100': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRALIGHT,%d,%d)' % (start,end) + elif font_weight == '200': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRALIGHT,%d,%d)' % (start,end) + elif font_weight == '300': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_LIGHT,%d,%d)' % (start,end) + elif font_weight == '400': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_NORMAL,%d,%d)' % (start,end) + elif font_weight == '500': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_NORMAL,%d,%d)' % (start,end) + elif font_weight == '600': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_SEMIBOLD,%d,%d)' % (start,end) + elif font_weight == '700': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_BOLD,%d,%d)' % (start,end) + elif font_weight == '800': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_ULTRABOLD,%d,%d)' % (start,end) + elif font_weight == '900': + print >> codefo, 'PANGO_STYLE(PANGO_WEIGHT_HEAVY,%d,%d)' % (start,end) + else: + print "The font-weight %s is not supported" % font_weight + pass + if style_map.has_key('direction'): + direction = style_map['direction'].lower() + print "The direction is not implemented yet" + pass + if style_map.has_key('unicode-bidi'): + bidi = style_map['unicode-bidi'].lower() + print "The bidi is not implemented yet" pass pass - + def translate_text(text, coord_id, codefo, doc): - translate_font_style(text, codefo) + try: + map = text.style_map + except: + map = translate_font_style(text, codefo) + text.style_map = map + attrs = [] + attr = [0,0, text] + attrs.append(attr) - txt_strs = [] + txt_strs = '' for node in text.childNodes: if node.localName == None: - txt_strs.append(node.data) + txt_strs = txt_strs + node.data elif node.localName == 'tspan': - node.setAttribute('style', text.getAttribute('style')) - translate_text(node, coord_id, codefo, doc) + txt_strs = translate_tspan(node,text,coord_id, codefo, doc,txt_strs,attrs) pass pass + attr[1] = len(txt_strs.encode('utf8')) if txt_strs: text_id = _get_id(text) x = float(text.getAttribute('x')) y = float(text.getAttribute('y')) print >> codefo, 'dnl' print >> codefo, \ - 'ADD_TEXT([%s], [%s], %f, %f, MB_FONT_SZ, [%s])dnl' % ( + 'PANGO_BEGIN_TEXT([%s], [%s], %f, %f, 16, [%s])dnl' % ( text_id.encode('utf8'), u''.join(txt_strs).encode('utf8'), x, y, coord_id.encode('utf8')) - translate_style(text, coord_id, codefo, doc, 'TEXT_') + generate_font_attributes(attrs, coord_id, codefo, doc) + print >> codefo, \ + 'PANGO_END_TEXT([%s], [%s], %f, %f, 16, [%s])dnl' % ( + text_id.encode('utf8'), u''.join(txt_strs).encode('utf8'), + x, y, coord_id.encode('utf8')) + translate_style(text, coord_id, codefo, doc, 'TEXT_') pass pass @@ -449,6 +626,9 @@ elif node.localName == 'text': translate_text(node, group_id, codefo, doc) pass + elif node.localName == 'textarea': + translate_textarea(node, group_id, codefo, doc) + pass pass pass