Mercurial > MadButterfly
changeset 377:06b40e01cac4
merge
author | wycc |
---|---|
date | Sat, 04 Apr 2009 06:12:42 +0800 |
parents | 7d244a85dd68 (current diff) 44b8223f307c (diff) |
children | a3231496c6de 9c70de05a0b6 |
files | inkscape/Makefile |
diffstat | 6 files changed, 69 insertions(+), 368 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/calculator/calculator_scr.svg Sat Apr 04 06:12:10 2009 +0800 +++ b/examples/calculator/calculator_scr.svg Sat Apr 04 06:12:42 2009 +0800 @@ -98,7 +98,7 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.9475" - inkscape:cx="-225.72559" + inkscape:cx="-141.75146" inkscape:cy="201.83531" inkscape:document-units="px" inkscape:current-layer="layer1" @@ -125,6 +125,15 @@ inkscape:groupmode="layer" id="layer1"> <rect + style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero" + id="rect2462" + width="307.12402" + height="404.22165" + x="-1.6355898e-08" + y="0" + rx="4.1063418" + ry="5.0559778" /> + <rect style="opacity:1;fill:url(#radialGradient3222);fill-opacity:1;stroke:none;stroke-opacity:1" id="rect2227" width="283.905" @@ -134,7 +143,7 @@ rx="4.0359654" ry="3.5442207" /> <rect - style="opacity:0.5;fill:#ff0000;stroke:#000000;stroke-width:0.8387413;stroke-opacity:1" + style="opacity:0.50000000000000000;fill:#ff0000;stroke:none;stroke-width:0.83874130000000002;stroke-opacity:1" id="rect2192" width="45.543846" height="39.211391" @@ -143,7 +152,8 @@ rx="4.0359654" ry="3.5442207" /> <g - id="but_0"> + id="but_0" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -165,7 +175,8 @@ sodipodi:role="line">0</tspan></text> </g> <g - id="but_1"> + id="but_1" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -188,7 +199,8 @@ sodipodi:role="line">1</tspan></text> </g> <g - id="but_2"> + id="but_2" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -210,7 +222,8 @@ sodipodi:role="line">2</tspan></text> </g> <g - id="but_3"> + id="but_3" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -232,7 +245,8 @@ sodipodi:role="line">3</tspan></text> </g> <g - id="but_4"> + id="but_4" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -254,7 +268,8 @@ sodipodi:role="line">4</tspan></text> </g> <g - id="but_5"> + id="but_5" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -276,7 +291,8 @@ sodipodi:role="line">5</tspan></text> </g> <g - id="but_6"> + id="but_6" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -298,7 +314,8 @@ sodipodi:role="line">6</tspan></text> </g> <g - id="but_7"> + id="but_7" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -320,7 +337,8 @@ sodipodi:role="line">7</tspan></text> </g> <g - id="but_8"> + id="but_8" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -342,7 +360,8 @@ sodipodi:role="line">8</tspan></text> </g> <g - id="but_9"> + id="but_9" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -364,7 +383,8 @@ sodipodi:role="line">9</tspan></text> </g> <g - id="but_add"> + id="but_add" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -386,7 +406,8 @@ sodipodi:role="line">+</tspan></text> </g> <g - id="but_minus"> + id="but_minus" + mbsprite="yes"> <rect ry="5.0559778" rx="4.0216751" @@ -408,7 +429,8 @@ sodipodi:role="line">-</tspan></text> </g> <g - id="but_mul"> + id="but_mul" + mbsprite="yes"> <rect ry="3.5442207" rx="4.0359654" @@ -417,7 +439,7 @@ height="39.211391" width="45.543846" id="rect2194" - style="opacity:0.5;fill:#ff0000;stroke:#000000;stroke-width:0.8387413;stroke-opacity:1" /> + style="opacity:0.5;fill:#ff0000;stroke:none;stroke-width:0.8387413;stroke-opacity:1" /> <text id="text2248" y="240.63324" @@ -430,7 +452,8 @@ sodipodi:role="line">*</tspan></text> </g> <g - id="but_div"> + id="but_div" + mbsprite="yes"> <rect ry="3.5442207" rx="4.0359654" @@ -439,7 +462,7 @@ height="39.211391" width="45.543846" id="rect2196" - style="opacity:0.5;fill:#ff0000;stroke:#000000;stroke-width:0.8387413;stroke-opacity:1" /> + style="opacity:0.5;fill:#ff0000;stroke:none;stroke-width:0.8387413;stroke-opacity:1" /> <text id="text2252" y="293.40369" @@ -452,7 +475,8 @@ sodipodi:role="line">/</tspan></text> </g> <g - id="but_eq"> + id="but_eq" + mbsprite="yes"> <rect ry="3.5442207" rx="4.0359654" @@ -461,7 +485,7 @@ height="39.211391" width="45.543846" id="rect2198" - style="opacity:0.5;fill:#ff0000;stroke:#000000;stroke-width:0.8387413;stroke-opacity:1" /> + style="opacity:0.5;fill:#ff0000;stroke:none;stroke-width:0.8387413;stroke-opacity:1" /> <text id="text2256" y="348.28494" @@ -474,7 +498,8 @@ sodipodi:role="line">=</tspan></text> </g> <g - id="but_clr"> + id="but_clr" + mbsprite="yes"> <rect ry="3.5442207" rx="4.0359654" @@ -483,7 +508,7 @@ height="39.211391" width="45.543846" id="rect2184" - style="opacity:0.5;fill:#ff0000;stroke:#000000;stroke-width:0.8387413;stroke-opacity:1" /> + style="opacity:0.5;fill:#ff0000;stroke:none;stroke-width:0.8387413;stroke-opacity:1" /> <text id="text2260" y="127.70448"
--- a/include/mb_tools.h Sat Apr 04 06:12:10 2009 +0800 +++ b/include/mb_tools.h Sat Apr 04 06:12:42 2009 +0800 @@ -138,7 +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)) +#define MB_MAX(a, b) ((a) > (b)? (a): (b)) +#define MB_MIN(a, b) ((a) < (b)? (a): (b)) #endif /* __TOOLS_H_ */
--- a/inkscape/Makefile Sat Apr 04 06:12:10 2009 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,328 +0,0 @@ -# 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 Apr 04 06:12:10 2009 +0800 +++ b/src/Makefile.am Sat Apr 04 06:12:42 2009 +0800 @@ -10,8 +10,8 @@ timertool.c tools.c visibility.c X_supp.c prop.c sprite.c \ mouse.c shape_image.c img_ldr.c $(MBAF_SOURCES) -libmbfly_la_CPPFLAGS = @cairo_CFLAGS@ `pkg-config --cflags pangocairo` -libmbfly_la_LDFLAGS = @cairo_LIBS@ `pkg-config --libs pangocairo` +libmbfly_la_CPPFLAGS = @cairo_CFLAGS@ @pangocairo_CFLAGS@ +libmbfly_la_LDFLAGS = @cairo_LIBS@ @pangocairo_LIBS@ X_main_SOURCES = X_main.c X_main_LDADD = $(top_builddir)/src/libmbfly.la
--- a/src/redraw_man.c Sat Apr 04 06:12:10 2009 +0800 +++ b/src/redraw_man.c Sat Apr 04 06:12:42 2009 +0800 @@ -1614,28 +1614,28 @@ /* Even areas */ area = areas[i++]; if(area->w != 0 || area->h != 0) { - poses0[0][0] = MIN(poses0[0][0], area->x); - poses0[0][1] = MIN(poses0[0][1], area->y); - poses0[1][0] = MAX(poses0[1][0], area->x + area->w); - poses0[1][1] = MAX(poses0[1][1], area->y + area->h); + poses0[0][0] = MB_MIN(poses0[0][0], area->x); + poses0[0][1] = MB_MIN(poses0[0][1], area->y); + poses0[1][0] = MB_MAX(poses0[1][0], area->x + area->w); + poses0[1][1] = MB_MAX(poses0[1][1], area->y + area->h); } /* Odd areas */ area = areas[i++]; if(area->w != 0 || area->h != 0) { - poses1[0][0] = MIN(poses1[0][0], area->x); - poses1[0][1] = MIN(poses1[0][1], area->y); - poses1[1][0] = MAX(poses1[1][0], area->x + area->w); - poses1[1][1] = MAX(poses1[1][1], area->y + area->h); + poses1[0][0] = MB_MIN(poses1[0][0], area->x); + poses1[0][1] = MB_MIN(poses1[0][1], area->y); + poses1[1][0] = MB_MAX(poses1[1][0], area->x + area->w); + poses1[1][1] = MB_MAX(poses1[1][1], area->y + area->h); } } if(i < n_areas) { area = areas[i]; if(area->w != 0 || area->h != 0) { - poses0[0][0] = MIN(poses0[0][0], area->x); - poses0[0][1] = MIN(poses0[0][1], area->y); - poses0[1][0] = MAX(poses0[1][0], area->x + area->w); - poses0[1][1] = MAX(poses0[1][1], area->y + area->h); + poses0[0][0] = MB_MIN(poses0[0][0], area->x); + poses0[0][1] = MB_MIN(poses0[0][1], area->y); + poses0[1][0] = MB_MAX(poses0[1][0], area->x + area->w); + poses0[1][1] = MB_MAX(poses0[1][1], area->y + area->h); } }
--- a/tools/svg2code.py Sat Apr 04 06:12:10 2009 +0800 +++ b/tools/svg2code.py Sat Apr 04 06:12:42 2009 +0800 @@ -190,13 +190,17 @@ if prop_map.has_key('stroke-width'): if prop_map['stroke-width'].endswith('px'): - stroke_width = float(prop_map['stroke-width'][:-2]) + stroke_width = float(prop_map['stroke-width'][:-2]) / 2 else: - stroke_width = float(prop_map['stroke-width']) + stroke_width = float(prop_map['stroke-width']) / 2 pass print >> codefo, 'STROKE_WIDTH([%s], %f)dnl' % ( node_id, stroke_width) pass + elif prop_map.has_key('stroke') and prop_map['stroke'] != 'none': + print >> codefo, 'STROKE_WIDTH([%s], %f)dnl' % ( + node_id, 0.5) + pass if prop_map.has_key('display'): display = prop_map['display'].strip().lower()