Re: Request for approval: Non-uniform scaling (a.k.a. subshapes) patch
- From: "Marcel Toele" <dpy dia gmail com>
- To: "discussions about usage and development of dia" <dia-list gnome org>
- Subject: Re: Request for approval: Non-uniform scaling (a.k.a. subshapes) patch
- Date: Fri, 30 Nov 2007 15:37:59 +0100
I have tried my patch on mandriva one 2008.0 livecd, it works as advertised on that system as well.
Systems on which my supplied patch is known to work for svn 3861 are:
1. Debian stable/nelly
2. PCLinuxOS 2007
3. Mandriva One 2008.0
I shall describe the steps I've taken to produce the working dia executable/plugin:
Step 1. Basic OS
--------------------------
I have downloaded and installed the following livecd on a virtual machine:
http://ftp.nluug.nl/ftp/pub/os/Linux/distr/Mandrakelinux/official/iso/2008.0/mandriva-linux-2008-one-KDE-cdrom-i586.iso
MD5: 871020f9d7d9f3f5b94d9c3c3127f492
Step 2. Package Repository Configuration
-----------------------------------------------------------
Then I added the following media to mandriva (using
easyurpmi.zarb.org):
urpmi.addmedia --update plf-free
http://ftp.cica.es/mirrors/Linux/plf/mandriva/2008.0/free/release/binary/i586/ with media_info/hdlist.cz
urpmi.addmedia plf-free_backports
http://ftp.cica.es/mirrors/Linux/plf/mandriva/2008.0/free/backports/binary/i586/ with media_info/hdlist.cz
urpmi.addmedia --update plf-nonfree
http://ftp.cica.es/mirrors/Linux/plf/mandriva/2008.0/non-free/release/binary/i586/ with media_info/hdlist.cz
urpmi.addmedia plf-nonfree_backports
http://ftp.cica.es/mirrors/Linux/plf/mandriva/2008.0/non-free/backports/binary/i586/ with media_info/hdlist.cz
urpmi.addmedia main
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandriva/official/2008.0/i586/media/main/release with media_info/hdlist.cz
urpmi.addmedia --update main_updates
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandriva/official/2008.0/i586/media/main/updates with media_info/hdlist.cz
urpmi.addmedia main_backports
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandriva/official/2008.0/i586/media/main/backports with media_info/hdlist.cz
urpmi.addmedia contrib
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandriva/official/2008.0/i586/media/contrib/release with media_info/hdlist.cz
urpmi.addmedia --update contrib_updates
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandriva/official/2008.0/i586/media/contrib/updates with media_info/hdlist.cz
urpmi.addmedia contrib_backports
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandriva/official/2008.0/i586/media/contrib/backports with media_info/hdlist.cz
urpmi.addmedia non-free
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandriva/official/2008.0/i586/media/non-free/release with media_info/hdlist.cz
urpmi.addmedia --update non-free_updates
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandriva/official/2008.0/i586/media/non-free/updates with media_info/hdlist.cz
urpmi.addmedia non-free_backports
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandriva/official/2008.0/i586/media/non-free/backports with media_info/hdlist.cz
Step 3. Installing Build Dependencies
-------------------------------------------------------
Then I added the following packages to the installation:
urpmi libglib2.0_0-devel libgtk+2.0_0-devel libgdk_pixbuf2.0_0-devel libcairo2-devel-1.4.10-1mdv2008.0 patch intltool autogen automake libtool make gcc gcc-c++ rarian
(when prompted with multiple options, default option)
Step 4. Checkout/Patching/Building
------------------------------------------------------
wget -O
subshape_for_dia_svn_rev3861.patch.gz http://mail.gnome.org/archives/dia-list/2007-November/gzQLYesgHxpO.gz wget -O
subshape_for_dia_demo_shapes_and_sheets.tgz
http://mail.gnome.org/archives/dia-list/2007-November/gz4XdQ4DaPBD.gz tar xvfz subshape_for_dia_demo_shapes_and_sheets.tgz
svn co
http://svn.gnome.org/svn/dia/trunk 3861 dia
cd dia
zcat ../subshape_for_dia_svn_rev3861.patch.gz | patch -p0
./autogen.sh
make
Step 5. Running
--------------------------
app/run_dia.sh
"select sheets Test, Subshape"
"draw the subshape"
"double click it"
"set draw background="">
This gives me exactly the output from this demo movie:
http://krnl.nl/dia_custom_shapes_with_non_uniform_scaling.html---------------------------------------------
I'm afraid I am unable to find out why it doesn't work for you, Lars.
Can you please describe your build setup, or perhaps you can try
my build setup, to assure that it works?
cheers,
Marcel
Kern Automatiseringsdiensten BV
PS,
As I pointed out earlier, it seems that the default for drawing backgrounds on shapes seems to have switched from true to false.
Please beware of doing that, as it seems to incur a huge functional regression for the custom_objects plugin/shapes: These
shapes usually depend on having their backgrounds drawn to reflect their icons.
2007/11/30, Marcel Toele <dpy dia gmail com>:
Okay, the source of my differing results has been located:
Somewhere dia went from a situation where "draw background" value defaulted to true, to a situation where it defaults to false.
Since my bottom-left subshape has no outline, and only a fill, it disappears. (I have found this in
defaults.dia).
This means, that to me it appeared as if there was something wrong, while in fact, it only was rendered differently because its background was not drawn.
The consequences of my results are on one hand very clear: On both my (debian/lenny/testing) development box *and* my (pclinuxos) linux laptop the provided patch and demo shape works out of the box on svn checkout
3861.
I will try it one last time on a complete clean install of mandriva one 2008 livecd (with additional build tools), if it also works on this machine, then I'm afraid the source of the problem is not on this end.
greetings,
Marcel
2007/11/30, Marcel Toele <dpy dia gmail com
>:
Just to inform you, I'm trying to figure out was is going on.
I have just reproduced my initial result (The outline shape, with only a star drawn at the top/right position, but it *does* do non-uniform scaling, unlike the result Lars got, which had an outline shape with start at top/right which did uniform scaling).
Heres what I did:
I moved my ~/.dia out of the way, created a new .dia and only extracted my supplied demo shapes/sheets in that directory.
When I then run app/run_dia.sh I get the outline shape with the single star at top/right.
Interestingly: When I quit the svn dia and start an older release, e.g. 0.95, then the shape is rendered fine (blue background, containing two "subshapes"), of course with this older version, I get uniform scaling (distortion). Now, when I quit this older
release dia and subsequently restart the svn dia with app/run_dia.sh all is well and the shape with both subshapes are correctly
rendered *with* non-uniform scaling (i.e. no distortion).
I'm investigating the matter further...
cheers,
Marcel
2007/11/26, Marcel Toele <dpy dia gmail com
>:
2007/11/24, Lars Clausen <lars raeder dk>:
I tested your patch against 3861 with the sample shape you provided, but
it worked just like any other shape, the star in the corner scaled just
as much as the box.
-Lars
I just couldn't believe my eyes when I read that. So on my home laptop, a linux box (which is running pclinuxos2007, note: the patch was prepared on debian nelly/testing) that hasn't ever seen my patch or a dia devel dir before, I did an svn check out (which was still at 3861) and subsequent build (I even had to install intltool for that):
svn co http://svn.gnome.org/svn/dia/trunk dia
cd dia
zcat /tmp/subshape_for_dia_svn_rev3861.patch.gz | patch -p0
./autogen.sh
( report came out with all extras set to: no )
make
cd ~
tar xvfz /tmp/subshape_for_dia_demo_shapes_and_sheets.tgz
cd -
./app/run_dia.sh
* The first time I started dia, I got some graphic weirdness with a non-filled shape, with only an outline star drawn at the top-right corner. This was rather odd behaviour, but the subshape stayed with a proper scale.
* Then I started vanilla dia 0.95-1, which showed my shape with uniform scaling (i.e. not what you want), but filled the shape properly.
* Following this, I restarted my svn built and this time the graphic weirdness was gone and the shape performed as demonstrated in the video.
* Then I rebooted my whole machine and started the dia again from the svn build dir and it still worked, without graphic glitches and with working subshape/subscaling.
So apart from the first-time-start graphic weirdness that I cannot explain and cannot reproduce, the subshape/subscale patch works fine here on a never-before-used-for-dia-development laptop with a simple svn checkout and applying the provided patch files.
I am clueless as to why it doesn't work for you, is anyone else having the same problems with my patch?
Any suggestions as to how to proceed will be much appreciated.
cheers,
Marcel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]