Skip to content
Snippets Groups Projects
Commit 6cbf685e authored by edgrif's avatar edgrif
Browse files

Brand new version of files/code to merge zmap foocanvas into foocanvas.

parent 84000d88
No related branches found
No related tags found
No related merge requests found
Showing
with 5430 additions and 0 deletions
This directory contains Zmap's version of foocanvas.
Please see foocanvas_build.html for more details.
Ed Griffiths <edgrif@sanger.ac.uk>
<!-- CVS info: $Id: foocanvas_build.html,v 1.1 2010-03-10 15:27:23 edgrif Exp $ -->
<style>
pre{ width: 95%; background-color: #DDDDDD; border-style: solid; border-width: 1px; padding: 10px }
.example{ border-color: #000000 }
</style>
<h2>Merging and Building the ZMap version of the FooCanvas</h2>
<p>
<pre>
[<i><font color="red">The system for doing this was completely rewritten/restructured in March 2010 so previous code/canvas versions have been archived.</font></i>]
</pre>
</p>
<h3>Overview</h3>
<p> To use Gnomes foocanvas widget for ZMap we have to make a number of
modifications and additions. You will need to install this altered version of
foocanvas in order to build and use zmap. This directory contains the source
files, diff files and scripts used to construct our version of the foocanvas.
This is not straight forward because:</p>
<p>
<ul>
<li>we have modified the original foocanvas code (e.g. to support different x/y scaling)
<li>gnome may have altered their original version of the foocanvas since we last merged
<li>we have created our own additional files which must be added to the foocanvas code
<li>we have modified the build/config scripts to get our files included in the build
</ul>
</p>
<p>We manage this using diff and patch to merge our code into the standard foocanvas.</p>
<p>There are two separate processes, the whole thing has to be "boot-strapped",
i.e. you can't make a diff between the zmap version and the original until you have
a zmap version, from then on it's an "updating" process of downloading the
latest foocanvas from gnome and merging our changes into it.</p>
<p>There are a set of scripts that download, diff, patch and package files to produce
the zmap version of foocanvas.</p>
<p>The scripts require a certain directory structure and should be run from the cvs
directory where they are found (the root directory for the zmap version of foocanvas):</p>
<p>
<pre>
----- gnome_foocanvas (contains latest gnome foocanvas, this remains an
| unaltered copy for reference when the merge goes wrong)
|
foocanvas ---|----- merged_foocanvas (after processing contains the merge of the latest
| gnome foocanvas with the zmap foocanvas code)
|
----- zmap_foocanvas (held in CVS, contains diffs and all source files
that are new or modified for zmap foocanvas, this remains
unaltered by the merge but is updated once the merge
is successful)
</pre>
</p>
<p>The scripts are:</p>
<dl>
<dt><b>makecvs</b>
<dd>compares source files in zmap_foocanvas with those in merged_foocanvas, any that
have changed are put back into cvs.
puts any that have back into zmap cvs.checks which source have changedand diff files have changed in zmap_foocanvas following
a merge and updat
<dt><b>makediff</b>
<dd>does a diff on gnome_foocanvas and zmap_foocanvas to create diff files
for use by makepatch
<dt><b>makedist</b>
<dd>copies, tars and gzips the merged zmap foocanvas for distribution, uses a date stamp
on the tar file and extracted directory to avoid version clashes.
<dt><b>makegnome</b>
<dd>retrieves the latest version of the gnome foocanvas into the directory
gnome_foocanvas and makes a copy of that into merged_foocanvas in preparation
for merging.
<dt><b>makepatch</b>
<dd>takes the diff files made by makediff and applies them to the relevant
files in gnome_canvas to make an up to date zmap version of the foo canva
</dl>
<h3>Bootstrapping</h3>
<p>This needed to be done initially but shouldn't need to be done again unless
either zmap or foocanvas change radically in which case a remerge by hand
may be appropriate.</p>
<p>
<ol>
<li>cd ZMap/foocanvas
<li>run "makegnome" to download the latest foocanvas from gnome into
gnome_foocanvas directory and make a copy in merged_foocanvas.
<li>in a separate directory called zmap_foocanvas make a copy of any foocanvas
files that need to be changed and add any new ones.
<li>run the script "makediff" to do a diff for changes required to the code in
merged_foocanvas to merge in the zmap_foocanvas files. This step leaves a
series of *.diff files in zmap_foocanvas.
<li>run "makepatch" to check that the diff files will patch the zmap foocanvas
files into the new ones correctly, this should produce a full set of merged
files in merged_foocanvas from which a distribution can be made.
<li>run "makecvs" to update the copies of source and diff files in zmap_foocanvas
and check them back into cvs.
<li>run "makedist" to create a gzip'd tar file that can be installed on different
systems to build the zmap foocanvas.
</ol>
</p>
<h3>Updating</h3>
<p>This is the standard procedure for either updating the version of gnome foocanvas
or adding new zmap code to the merged foocanvas.</p>
<p>
<ol>
<li>cd ZMap/foocanvas
<li>run "makegnome" to download the latest foocanvas from gnome into
gnome_foocanvas directory and make a copy in merged_foocanvas.
<li>run "makepatch" to check that the diff files will patch the zmap foocanvas
files into the new ones correctly, this should produce a full set of merged
files in merged_foocanvas from which a distribution can be made.
<li>if makepatch fails it will report all merges that failed and the patches that failed
will be listed in *.rej files. For files that failed:
<p>
<ul>
<li>compare gnome and zmap versions of the file and make alterations to the _zmap_ file
so that the code is correct.
<li>cvs edit the diff file for that source file
<li>run "makediff <filename>" to make a new diff file (will overwrite the cvs diff file).
<li>run "makepatch <filename>" to check the new diff file works.
</ul>
</p>
<li>run "makecvs" to update the copies of source and diff files in zmap_foocanvas
and check them back into cvs.
<li>run "makedist" to create a gzip'd tar file that can be installed on different
systems to build the zmap foocanvas.
</ol>
</p>
<h3>Distributing and Building zmap foocanvas</h3>
<p>The output of "makedist" is a gzip'd file that can be moved to a system and used
to build zmap foocanvas on that system. The build requires that the system has
the autoconf tools installed and will not work without them. It also requires that
the user has the right permissions to install the zmap foocanvas into the chosen
install directories (e.g. for /usr the user may need to able to use sudo).</p>
<p>The build install steps are:</p>
<ol>
<li>copy the gzip'd tar file to any convenient directory on the target machine.
<li>unzip and untar the file.
<li>cd to the foocanvas directory.
<li>If your autoconf is not installed in /usr or /usr/local then:
<pre>
export ACLOCAL_FLAGS=" -I &lt;path to autoconf tools&gt;" # NOTE the spaces !!!!!
e.g.
export ACLOCAL_FLAGS=" -I /opt/local/share/aclocal" # NOTE the spaces !!!!!
</pre>
<li>Run the autoconf tools to make the ./configure script:
<pre>
./autogen.sh --prefix=&lt;directory where you will want to install foocanvas&gt;
e.g.
./autogen.sh --prefix=/opt/local
</pre>
<li>Build the code:
<pre>
make
</pre>
<li>Install the code:
<pre>
make install
</pre>
</ol>
<h2>Patch versioning</h2>
<p>We use a combination of <b>diff</b> and <b>patch</b> to manage the merge
of zmap foocanvas code into gnome foocanvas code. It is possible to add
versioning to diff files to stop the wrong diff's being applied. The
<b>Prereq</b> flag can be used for this purpose:
<pre>
<font color="red">Prereq: 1.1.1</font>
--- old.txt 2010-03-05 09:43:46.000000000 +0000
+++ new.txt 2010-03-05 09:43:05.000000000 +0000
@@ -1,5 +1,5 @@
-line 1 of target
+first line of target
second line of target
</pre>
<p>All files in zmap_source would need to have the version number that follows
"<font color="red">Prereq:</font>" embedded in them and then patch would not
do the merge unless the user forced it. Currently this is not implemented because
it would be tedious.</p>
<H2>Old notes from the previous build system</h2>
<p>Notes from the previous system which may be useful if there are problems.</p>
<pre>
Creating the tar.gz
-------------------
$ gcvs co -d libfoocanvas-VERSION foocanvas
*** additional files fix ***
now we have additional files this step is a little more difficult and makes me
think we should just distribute a fully patched tar.gz.
$ cd libfoocanvas-VERSION/libfoocanvas/
$ patch -p0 -u < ../path/to/additional_files/Makefile.am.patch
$ cp ../path/to/additional_files/*.{c,h} .
****************************
now make all the autoconf stuff. I had to do this first.
NOT $ export AUTOMAKE=~/bin/automake
try this...
$ export AUTOMAKE=/nfs/team71/acedb/zmap/prefix/LINUX/bin/automake
aclocal needs to be told where it's m4 files are.
~zmap/prefix/LINUX/share/aclocal
~zmap/prefix/LINUX/share/aclocal-1.9
are good bets at the moment. glib-gettext.m4 seems to be a dependancy
which breaks everything silently....
NOT $ export ACLOCAL_FLAGS="-I ~/share/aclocal -I ~/share/aclocal-1.9"
try this...
$ export ACLOCAL_FLAGS='-I /nfs/team71/acedb/zmap/prefix/LINUX/share/aclocal -I /nfs/team71/acedb/zmap/prefix/LINUX/share/aclocal-1.9'
autogen.sh also requires gnome-common
$ gcvs co gnome-common; ./configure; make; make install
For the last build (20060326) I had to modify autogen.sh and
configure.in as per build.patch. Unsure as to why, possibly a broken
autotools setup.
$ ./autogen.sh
$ make dist-gzip
this uses VERSION from configure.in (currently 0.1), I was using YYYYMMDD, who knows what's best.
to change this edit the Makefile
-distdir = $(PACKAGE)-$(VERSION)
+distdir = $(PACKAGE)-YYYYMMDD
$ mv libfoocanvas-VERSION.tar.gz ZMap/foocanvas/support/
$ cvs add -ko -m'message' libfoocanvas-VERSION.tar.gz
$ cvs commit -m'message' libfoocanvas-VERSION.tar.gz
Should alter untar_patch.sh to set the version variable to VERSION and
tag the files as libfoocanvas-VERSION.
Test by running ./untar_patch.sh and seeing no errors in patch and a complete build
</pre>
#!/bin/bash
#
# diff the newly merged code and the existing zmap code,
# any files in zmap cvs that have been changed because of
# the merge need to be written back to cvs
#
scriptname=`basename $0`
msgAndExit ()
{
errmsg="$scriptname - Fatal Error: $1 !!"
echo "$errmsg"
exit 1
}
source='./zmap_source'
old='./zmap_foocanvas'
merged='./merged_foocanvas'
diff_file="./tmp_file.diff"
commit_needed=""
#
# Because gnome foocanvas may have changed we first need to copy any
# source files in merged_foocanvas that are different from those in
# zmap_foocanvas otherwise we will lose the gnome foocanvas changes.
# For any that have changed we overwrite the version
# in zmap_foocanvas with the one from merged_foocanvas.
#
echo "Comparing files in $old with new ones in $merged"
for i in `find $old -name "*" -type f | grep -v '.diff'`
do
file_name=`basename $i`
dir_name=`dirname $i`
suffix=
merged_file="$merged/${i#./*/}"
old_file=$i
# echo "diff $old_file $merged_file"
if { ! diff $old_file $merged_file > $diff_file ; }
then
echo "$old_file and $merged_file are different:"
echo
cat $diff_file
echo
echo "Replace $old_file with $merged_file [y] ?"
read reply
if [[ $reply == 'y' || $reply == '' ]]
then
echo "cp -f $merged_file $old_file"
fi
fi
done
echo "done"
#
# zmap_foocanvas now contains all the updated versions of all the files that we store
# in cvs that were required to do the merge. So we now compare all these files
# with the cvs copies in zmap_source and for any that are different we replace
# the copy in zmap_source with the one from zmap_foocanvas.
#
echo "Comparing files in $old with original ones in $source"
for i in `find $old -name "*" -type f`
do
file_name=`basename $i`
dir_name=`dirname $i`
suffix=
source_file="$source/${i#./*/}"
old_file=$i
# echo "diff $old_file $source_file"
if { ! diff $old_file $source_file > $diff_file ; }
then
echo "$old_file and $source_file are different:"
echo
cat $diff_file
echo
echo "Replace $source_file with $old_file [y] ?"
read reply
if [[ $reply == 'y' || $reply == '' ]]
then
echo "cvs edit $source_file"
echo "cp -f $old_file $source_file"
commit_needed="$commit_needed $old_file"
fi
fi
done
echo "done"
if [ -n "$commit_needed" ]
then
echo "Committing changes files to cvs."
echo "cvs commit -m 'update from latest gnome foocanvas' $commit_needed"
echo "done"
else
echo "No changes were required to files in $source to merge so no CVS commit was required."
fi
rm -f $diff_file
exit 0
#!/bin/bash
#
# make a diff between two directory trees.
#
scriptname=`basename $0`
msgAndExit ()
{
errmsg="$scriptname - Fatal Error: $1 !!"
echo "$errmsg"
exit 1
}
old='./merged_foocanvas'
new='./zmap_foocanvas'
# set up file list as single file from zmap_foocanvas given on command line or all files
# in zmap_foocanvas
if [ -n "$1" ]
then
# umm, this isn't nearly good enough a test....
if [ ! -f $1 ]
then
msgAndExit "File $1 does not exist in $new"
else
file_list=$1
fi
else
file_list=`find $new -name "*" -type f`
fi
for i in $file_list
do
file_name=`basename $i`
dir_name=`dirname $i`
old_file="$old/${i#./*/}"
new_file=$i
diff_file="$dir_name/$file_name.diff"
echo "making diff between $old_file and $new_file, output in $diff_file"
LC_ALL=C TZ=UTC0 diff -Naur $old_file $new_file > $diff_file
done
exit 0
#!/bin/bash
#
# Make working copy of the zmap foocanvas source in a
# a directory called zmap_foocanvas. Fetch the
# latest gnome version of foocanvas into a directory called
# gnome_foocanvas and make a working copy of it in a directory
# called merged_foocanvas.
#
#
scriptname=`basename $0`
# error and exit routine, call with an error string as the only arg.
msgAndExit ()
{
errmsg="$scriptname - Fatal Error: $1 !!"
echo "$errmsg"
exit 1
}
zmap_src='./zmap_source'
zmap_dir='./zmap_foocanvas'
gnome_dir='./gnome_foocanvas'
merged_dir='./merged_foocanvas'
gnome_link='http://svn.gnome.org/svn/foocanvas/trunk'
if [ -d $zmap_dir ] || [ -d $gnome_dir ] || [ -d $merged_dir ]
then
echo "Merge/Build working directories $zmap_dir $gnome_dir $merged_dir"
echo "will be removed, continue [y] ?"
read reply
if [[ $reply == 'y' || $reply == '' ]]
then
echo "removing $zmap_dir $gnome_dir $merged_dir"
rm -rf $zmap_dir $gnome_dir $merged_dir
echo "done"
else
exit 1
fi
fi
# make a working copy of the zmap foocanvas
echo "making working copy of zmap foocanvas in $zmap_dir"
cp -r $zmap_src $zmap_dir || msgAndExit "cannot copy $zmap_src to $zmap_dir"
echo "done"
# do the gnome foocanvas checkout
echo "fetching latest gnome foocanvas in to $gnome_dir"
svn co $gnome_link $gnome_dir || msgAndExit "cannot get gnome foocanvas source, check settings in $HOME/.subversion"
echo "done"
# make a working copy of the gnome foocanvas.
echo "making working copy of gnome foocanvas in $merged_dir"
cp -r $gnome_dir $merged_dir || msgAndExit "cannot copy $gnome_dir to $merged_dir"
echo "done"
exit 0
#!/bin/bash
#
# create a tar file of all the merged code for distribution.
#
scriptname=`basename $0`
msgAndExit ()
{
errmsg="$scriptname - Fatal Error: $1 !!"
echo "$errmsg"
exit 1
}
today=`date +%Y-%m-%d`
prefix="ZMap_FooCanvas_$today"
merged='./merged_foocanvas'
work_dir="./$prefix"
tar_file="$prefix.tar"
echo "Copying, tarring and gzipping $merged into $tar_file.gz"
rm -rf $work_dir
cp -r $merged $work_dir || msgAndExit "Could not copy $merged to $work_dir"
tar -cvf$tar_file $work_dir || msgAndExit "Could not tar $work_dir"
gzip $tar_file || msgAndExit "Could not gzip $tar_file"
rm -rf $work_dir
echo "done"
exit 0
#!/bin/bash
#
# Tries to apply a set of diff files to a copy of the gnome foocanvas
# to create the zmap foocanvas.
#
# Returns 0 on success or 1 if any of the patches fails.
#
scriptname=`basename $0`
msgAndExit ()
{
errmsg="$scriptname - Fatal Error: $1 !!"
echo "$errmsg"
exit 1
}
RC=0
old='./merged_foocanvas'
new='./zmap_foocanvas'
echo "patching files in $old using diffs from $new"
for i in `find $new -name "*.diff" -type f`
do
file_name=`basename $i .diff`
# Construct the patch file name from the original file name.
patch_file="$old/${i#./*/}"
patch_file="${patch_file%.*}"
# echo "patching file $patch_file from diff file $i"
patch -p0 $patch_file --backup-if-mismatch -u -s < $i || { echo '$file_name: patch failed !!' ; RC=1 ; }
done
echo "done"
exit $RC
AC_PREREQ(2.50)
AC_INIT([libfoocanvas], [0.1])
AC_CONFIG_SRCDIR([libfoocanvas/foo-canvas.c])
AC_CONFIG_HEADERS([config.h])
dnl [dist-bz2] removed from the AM_INIT_AUTOMAKE()
AM_INIT_AUTOMAKE([])
AM_MAINTAINER_MODE
GNOME_COMMON_INIT
AC_ISC_POSIX
AC_PROG_CC
AC_HEADER_STDC
AM_PROG_LIBTOOL
GNOME_COMPILE_WARNINGS
GETTEXT_PACKAGE=libfoocanvas-2.0
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The package name, for gettext])
ALL_LINGUAS=""
AM_GLIB_GNU_GETTEXT
GNOME_COMPILE_WARNINGS(maximum)
dnl
dnl GTK+ check
dnl
CANVAS_MODULES="gtk+-2.0 >= 1.3.12 pango >= 0.23"
PKG_CHECK_MODULES(LIBFOOCANVAS, $CANVAS_MODULES)
AC_SUBST(LIBFOOCANVAS_CFLAGS)
AC_SUBST(LIBFOOCANVAS_LIBS)
dnl Checks for Xft/XRender
dnl
AC_CHECK_LIB(Xrender, XRenderFindFormat,
[AC_SUBST(RENDER_LIBS, "-lXrender -lXext")
AC_DEFINE(HAVE_RENDER, 1, [Define if libXrender is available.])],
[AC_SUBST(RENDER_LIBS, "")],
[-lXext])
AC_ARG_VAR(GLIB_GENMARSHAL, [The glib-genmarshal executable.])
AC_CHECK_PROG(GLIB_GENMARSHAL, glib-genmarshal, glib-genmarshal)
AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
if test "x$with_html_dir" = "x" ; then
AC_SUBST(HTML_DIR, '${datadir}/gtk-doc/html')
else
AC_SUBST(HTML_DIR, $with_html_dir)
fi
dnl MAC OS X doesn't like this... (requires gtk-doc, which requires a million other packages)
dnl GTK_DOC_CHECK([1.0])
AC_CONFIG_FILES([
Makefile
libfoocanvas/Makefile
libfoocanvas/libfoocanvas.pc
demos/Makefile
])
AC_OUTPUT
--- ./merged_foocanvas/configure.in 2010-03-09 10:49:06.852000000 +0000
+++ ./zmap_foocanvas/configure.in 2008-03-25 09:07:37.000000000 +0000
@@ -3,7 +3,8 @@
AC_CONFIG_SRCDIR([libfoocanvas/foo-canvas.c])
AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([dist-bzip2])
+dnl [dist-bz2] removed from the AM_INIT_AUTOMAKE()
+AM_INIT_AUTOMAKE([])
AM_MAINTAINER_MODE
@@ -53,7 +54,8 @@
AC_SUBST(HTML_DIR, $with_html_dir)
fi
-GTK_DOC_CHECK([1.0])
+dnl MAC OS X doesn't like this... (requires gtk-doc, which requires a million other packages)
+dnl GTK_DOC_CHECK([1.0])
AC_CONFIG_FILES([
Makefile
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
$(WARN_CFLAGS) \
$(LIBFOOCANVAS_CFLAGS) \
-DFOOCANVASLIBDIR=\""$(libdir)"\" \
-DFOOCANVASDATADIR=\""$(datadir)"\" \
-DFOOCANVASPIXMAPDIR=\""$(datadir)/pixmaps"\" \
-DFOOCANVASBINDIR=\""$(bindir)"\" \
-DFOOCANVASLOCALSTATEDIR=\""$(localstatedir)"\" \
-DFOOCANVASLOCALEDIR=\""$(gnomelocaledir)"\" \
-DG_LOG_DOMAIN=\"Foocanvas\" \
-DVERSION=\"$(VERSION)\"
lib_LTLIBRARIES = libfoocanvas.la
libfoocanvas_la_LIBADD = \
$(RENDER_LIBS) \
$(LIBFOOCANVAS_LIBS)
libfoocanvasincludedir = $(includedir)/libfoocanvas-1.0/libfoocanvas
libfoocanvasinclude_HEADERS = \
foo-canvas-line.h \
foozmap-canvas-line-glyph.h \
foo-canvas-pixbuf.h \
foo-canvas-polygon.h \
foo-canvas-rect-ellipse.h \
foo-canvas-text.h \
foozmap-canvas-text.h \
foozmap-canvas-floating-group.h \
foo-canvas-util.h \
foo-canvas-widget.h \
foo-canvas.h \
libfoocanvas.h
libfoocanvas_la_SOURCES = \
$(libfoocanvasinclude_HEADERS) \
foo-canvas-marshal.list \
foo-canvas-i18n.h \
foo-canvas-line.c \
foozmap-canvas-line-glyph.c \
foo-canvas-pixbuf.c \
foo-canvas-polygon.c \
foo-canvas-rect-ellipse.c \
foo-canvas-text.c \
foozmap-canvas-text.c \
foozmap-canvas-floating-group.c \
foo-canvas-util.c \
foo-canvas-widget.c \
foo-canvas.c \
libfoocanvastypes.c
GENMARSHAL_COMMAND = $(GLIB_GENMARSHAL) --prefix=foo_canvas_marshal
SUFFIXES = .list
.list.h:
$(GENMARSHAL_COMMAND) --header $< >$@
.list.c:
(echo '/* This file has been automatically generated. Do not edit. */' && \
echo '#include "$*.h"' && \
$(GENMARSHAL_COMMAND) --body $< ) >$@
# A hint is needed to build the header first:
BUILT_SOURCES = foo-canvas-marshal.h
# Another hint, see bugs #172211 and #172212:
non-intermediate: foo-canvas-marshal.c
CLEANFILES = foo-canvas-marshal.h foo-canvas-marshal.c
EXTRA_DIST = libfoocanvas.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libfoocanvas.pc
--- ./merged_foocanvas/libfoocanvas/Makefile.am 2010-03-09 10:49:06.596000000 +0000
+++ ./zmap_foocanvas/libfoocanvas/Makefile.am 2008-03-25 09:07:37.000000000 +0000
@@ -22,10 +22,13 @@
libfoocanvasinclude_HEADERS = \
foo-canvas-line.h \
+ foozmap-canvas-line-glyph.h \
foo-canvas-pixbuf.h \
foo-canvas-polygon.h \
foo-canvas-rect-ellipse.h \
foo-canvas-text.h \
+ foozmap-canvas-text.h \
+ foozmap-canvas-floating-group.h \
foo-canvas-util.h \
foo-canvas-widget.h \
foo-canvas.h \
@@ -36,10 +39,13 @@
foo-canvas-marshal.list \
foo-canvas-i18n.h \
foo-canvas-line.c \
+ foozmap-canvas-line-glyph.c \
foo-canvas-pixbuf.c \
foo-canvas-polygon.c \
foo-canvas-rect-ellipse.c \
foo-canvas-text.c \
+ foozmap-canvas-text.c \
+ foozmap-canvas-floating-group.c \
foo-canvas-util.c \
foo-canvas-widget.c \
foo-canvas.c \
This diff is collapsed.
--- ./merged_foocanvas/libfoocanvas/foo-canvas-line.c 2010-03-09 10:49:06.570000000 +0000
+++ ./zmap_foocanvas/libfoocanvas/foo-canvas-line.c 2010-03-04 15:11:52.000000000 +0000
@@ -1,3 +1,4 @@
+/* Last edited: Mar 4 15:11 2010 (edgrif) */
/*
* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
* All rights reserved.
@@ -315,7 +316,7 @@
/* Add possible over-estimate for wide lines */
if (line->width_pixels)
- width = line->width / line->item.canvas->pixels_per_unit;
+ width = line->width / line->item.canvas->pixels_per_unit_x;
else
width = line->width;
@@ -443,7 +444,7 @@
return;
if (line->width_pixels)
- width = line->width / line->item.canvas->pixels_per_unit;
+ width = line->width / line->item.canvas->pixels_per_unit_x;
else
width = line->width;
@@ -454,9 +455,9 @@
shape_c = line->shape_c + width / 2.0;
if (line->width_pixels) {
- shape_a /= line->item.canvas->pixels_per_unit;
- shape_b /= line->item.canvas->pixels_per_unit;
- shape_c /= line->item.canvas->pixels_per_unit;
+ shape_a /= line->item.canvas->pixels_per_unit_x;
+ shape_b /= line->item.canvas->pixels_per_unit_x;
+ shape_c /= line->item.canvas->pixels_per_unit_x;
}
shape_a += 0.001;
@@ -577,7 +578,7 @@
if (line->width_pixels)
width = (int) line->width;
else
- width = (int) (line->width * line->item.canvas->pixels_per_unit + 0.5);
+ width = (int) (line->width * line->item.canvas->pixels_per_unit_x + 0.5);
gdk_gc_set_line_attributes (line->gc,
width,
@@ -1103,12 +1104,12 @@
*/
if (line->width_pixels)
- width = line->width / item->canvas->pixels_per_unit;
+ width = line->width / item->canvas->pixels_per_unit_x;
else
width = line->width;
- if (width < (1.0 / item->canvas->pixels_per_unit))
- width = 1.0 / item->canvas->pixels_per_unit;
+ if (width < (1.0 / item->canvas->pixels_per_unit_x))
+ width = 1.0 / item->canvas->pixels_per_unit_x;
changed_miter_to_bevel = 0;
VOID:INT,INT,INT,INT
BOOLEAN:BOXED
VOID:VOID
--- ./merged_foocanvas/libfoocanvas/foo-canvas-marshal.list 2010-03-09 10:49:06.537000000 +0000
+++ ./zmap_foocanvas/libfoocanvas/foo-canvas-marshal.list 2008-03-25 09:07:37.000000000 +0000
@@ -1,2 +1,3 @@
VOID:INT,INT,INT,INT
BOOLEAN:BOXED
+VOID:VOID
This diff is collapsed.
--- ./merged_foocanvas/libfoocanvas/foo-canvas-pixbuf.c 2010-03-09 10:49:06.594000000 +0000
+++ ./zmap_foocanvas/libfoocanvas/foo-canvas-pixbuf.c 2010-03-04 15:19:06.000000000 +0000
@@ -1,3 +1,4 @@
+/* Last edited: Mar 4 15:19 2010 (edgrif) */
/* GNOME libraries - GdkPixbuf item for the GNOME canvas
*
* Copyright (C) 1999 The Free Software Foundation
@@ -530,13 +531,13 @@
}
if (priv->x_in_pixels) {
- x = i2w_dx + priv->x / item->canvas->pixels_per_unit;
+ x = i2w_dx + priv->x / item->canvas->pixels_per_unit_x;
} else {
x = i2w_dx + priv->x;
}
if (priv->y_in_pixels) {
- y = i2w_dy + priv->y / item->canvas->pixels_per_unit;
+ y = i2w_dy + priv->y / item->canvas->pixels_per_unit_y;
} else {
y = i2w_dy + priv->y;
}
@@ -548,7 +549,7 @@
}
if (priv->width_in_pixels)
- width /= item->canvas->pixels_per_unit;
+ width /= item->canvas->pixels_per_unit_x;
if (priv->height_set) {
height = priv->height;
@@ -557,7 +558,7 @@
}
if (priv->height_in_pixels)
- height /= item->canvas->pixels_per_unit;
+ height /= item->canvas->pixels_per_unit_y;
switch (priv->anchor) {
@@ -747,8 +748,8 @@
pixbuf = priv->pixbuf;
*actual_item = item;
-
- no_hit = item->canvas->pixels_per_unit * 2 + 10;
+ /* guessing that the x factor is OK here. RNGC */
+ no_hit = item->canvas->pixels_per_unit_x * 2 + 10;
if (!priv->pixbuf)
return no_hit;
@@ -789,13 +790,13 @@
priv = gcp->priv;
if (priv->x_in_pixels) {
- priv->x += dx * item->canvas->pixels_per_unit;
+ priv->x += dx * item->canvas->pixels_per_unit_x;
} else {
priv->x += dx;
}
if (priv->y_in_pixels) {
- priv->y += dy * item->canvas->pixels_per_unit;
+ priv->y += dy * item->canvas->pixels_per_unit_y;
} else {
priv->y += dy;
}
This diff is collapsed.
--- ./merged_foocanvas/libfoocanvas/foo-canvas-polygon.c 2010-03-09 10:49:06.574000000 +0000
+++ ./zmap_foocanvas/libfoocanvas/foo-canvas-polygon.c 2010-03-04 15:18:21.000000000 +0000
@@ -1,3 +1,4 @@
+/* Last edited: Mar 4 15:18 2010 (edgrif) */
/*
* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
* All rights reserved.
@@ -253,7 +254,7 @@
/* Add outline width */
if (poly->width_pixels)
- width = poly->width / poly->item.canvas->pixels_per_unit;
+ width = poly->width / poly->item.canvas->pixels_per_unit_x;
else
width = poly->width;
@@ -377,7 +378,7 @@
if (poly->width_pixels)
width = (int) poly->width;
else
- width = (int) (poly->width * poly->item.canvas->pixels_per_unit + 0.5);
+ width = (int) (poly->width * poly->item.canvas->pixels_per_unit_x + 0.5);
gdk_gc_set_line_attributes (poly->outline_gc, width,
GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND);
@@ -778,7 +779,7 @@
if (poly->outline_set) {
if (poly->width_pixels)
- width = poly->width / item->canvas->pixels_per_unit;
+ width = poly->width / item->canvas->pixels_per_unit_x;
else
width = poly->width;
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment