# HG changeset patch
# User wycc
# Date 1238796762 -28800
# Node ID 06b40e01cac4cf83ceef18a2a3cad585bb4de9e2
# Parent 7d244a85dd68f4ad7725a881bcafb6b27eb3770a# Parent 44b8223f307c33b937fcf6cc4753b463d3b9841c
merge
diff -r 7d244a85dd68 -r 06b40e01cac4 examples/calculator/calculator_scr.svg
--- 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">
+
+ id="but_0"
+ mbsprite="yes">
0
+ id="but_1"
+ mbsprite="yes">
1
+ id="but_2"
+ mbsprite="yes">
2
+ id="but_3"
+ mbsprite="yes">
3
+ id="but_4"
+ mbsprite="yes">
4
+ id="but_5"
+ mbsprite="yes">
5
+ id="but_6"
+ mbsprite="yes">
6
+ id="but_7"
+ mbsprite="yes">
7
+ id="but_8"
+ mbsprite="yes">
8
+ id="but_9"
+ mbsprite="yes">
9
+ id="but_add"
+ mbsprite="yes">
+
+ id="but_minus"
+ mbsprite="yes">
-
+ id="but_mul"
+ mbsprite="yes">
+ style="opacity:0.5;fill:#ff0000;stroke:none;stroke-width:0.8387413;stroke-opacity:1" />
*
+ id="but_div"
+ mbsprite="yes">
+ style="opacity:0.5;fill:#ff0000;stroke:none;stroke-width:0.8387413;stroke-opacity:1" />
/
+ id="but_eq"
+ mbsprite="yes">
+ style="opacity:0.5;fill:#ff0000;stroke:none;stroke-width:0.8387413;stroke-opacity:1" />
=
+ id="but_clr"
+ mbsprite="yes">
+ style="opacity:0.5;fill:#ff0000;stroke:none;stroke-width:0.8387413;stroke-opacity:1" />
(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_ */
diff -r 7d244a85dd68 -r 06b40e01cac4 inkscape/Makefile
--- 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:
diff -r 7d244a85dd68 -r 06b40e01cac4 src/Makefile.am
--- 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
diff -r 7d244a85dd68 -r 06b40e01cac4 src/redraw_man.c
--- 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);
}
}
diff -r 7d244a85dd68 -r 06b40e01cac4 tools/svg2code.py
--- 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()