GNOME Bugzilla – Bug 169143
dia: Unable to fill some assorted shapes
Last modified: 2006-01-28 16:30:21 UTC
Distribution/Version: Debian A Debian user reported the following: ============================================================================== "Left-Up Arrow", Heptagon, Five Point Star, Trapezoid, Right Angle and Triangle assorted shapes can't be filled (ie. the selected background color is ignored). It looks like the problem is the style="fill: #ffffff" in polygon definition (shapes that can be filled use style="fill: default" (or style="fill: background" for arrow-turn-up.shape)). Replacing #ffffff by default solves the problem. ============================================================================== See patch at http://bugs.debian.org/297783
I'm not sure if this is related to #93933. Probably not.
this is directly related to bug #93933 which if fixed would avoid the need to set these things up one shape at a time. You dont want really to replace it with "default" you want to replace the fill with foreground and the line with background.
Comment from bug 169144 Just so you know the Associated shapes are only really a workaround and I'm more than happy to see them die and be replaced by more powerful Drawing Tools.
The suggested solution of forcing all colors to be "foreground" and "background" is suboptimal, better to let the exporter choose. The shapes mentioned in this bug should still be fixed. Here's a bit of shell script that fixes all shapes in a directory. I would have applied it to all shapes, except some of the map symbols at least have meaningfull colors. sed -i 's/: #000000/: foreground/;s/: #ffffff/: background/;' *.shape
I realise forcing the foreground and background is suboptimal but it is only part of the solution. Shape creaters will still want to be able to preset the colours of their shapes. That shell script will be extremely useful thanks.
Created attachment 38300 [details] [review] the patch debian provided it isn't as clear but using defualt rather than foreground and background works fine so I'm attaching the patch supplied by Debian and it should probably be used.
Created attachment 38301 [details] [review] Patch to fix some other Foreground backgroudn colour issues with shapes I fixed two shapes in the Civil sheet and the whole Logic sheet. The connector in the logic sheet was a shade off black which I assumed was not intentional and fixed it to use foreground for both the line and the fill. Thanks Lars that line of sed scripting was a huge help. Now if only I can figure out what's going on in bug 169107 and do the same for the programmed objects?
Patch 38300 did not apply cleanly, but I could fix it by hand, so I did. Patch 38301 did apply, it's in there now. Still many shapes left that may have problems, fairly sure some of them do have problems. Leaving open till they are fixed. The programmed objects is a whole different ball of wax. larsrc@linux:~/dia/shapes> find . -name \*.shape | xargs grep -l \#ffffff ./Map/Isometric/Block7.shape ./Map/Isometric/Car1.shape ./Map/Isometric/Car2.shape ./Map/Isometric/Factory.shape ./Map/Isometric/FootBridge.shape ./Map/Isometric/OneWay.shape ./Map/Isometric/RedCar.shape ./network/diskette.shape ./network/laptop.shape ./network/plotter.shape ./network/router-symbol.shape ./network/switch-atm-symbol.shape ./network/switch-symbol.shape ./network/telephone.shape ./network/zip-disk.shape larsrc@linux:~/dia/shapes> find . -name \*.shape | xargs grep -l \#000000 ./Assorted/arrow-chevron.shape ./Assorted/arrow-down.shape ./Assorted/arrow-left-notched.shape ./Assorted/arrow-left-right-up.shape ./Assorted/arrow-left-right.shape ./Assorted/arrow-left.shape ./Assorted/arrow-pentagon.shape ./Assorted/arrow-quad.shape ./Assorted/arrow-right-notched.shape ./Assorted/arrow-right.shape ./Assorted/arrow-up-down-left.shape ./Assorted/arrow-up-down.shape ./Assorted/arrow-up.shape ./Assorted/circle-quarter.shape ./Assorted/circle.shape ./Assorted/cross-maltese.shape ./Assorted/cross-swiss.shape ./Assorted/diamond.shape ./Assorted/heart.shape ./Assorted/hexagon.shape ./Assorted/moon-quarter.shape ./Assorted/octagon.shape ./Assorted/parallelogram-horizontal.shape ./Assorted/parallelogram-vertical.shape ./Assorted/pentagon.shape ./Assorted/square.shape ./Assorted/star4.shape ./Assorted/star4curved.shape ./Assorted/star6.shape ./Assorted/star7.shape ./Assorted/star8.shape ./Assorted/star8curved.shape ./Assorted/star8sharp.shape ./Assorted/sun.shape ./Assorted/triangle-isoceles.shape ./Civil/civil_backflow_preventer.shape ./Civil/civil_basin.shape ./Civil/civil_frequency_converter.shape ./Civil/civil_motor.shape ./Civil/civil_preliminary_clarification_tank.shape ./Civil/civil_vertical_propeller.shape ./Map/Isometric/Block1.shape ./Map/Isometric/Block2.shape ./Map/Isometric/Block3.shape ./Map/Isometric/Block4.shape ./Map/Isometric/Block5.shape ./Map/Isometric/Block6.shape ./Map/Isometric/Block7.shape ./Map/Isometric/Car1.shape ./Map/Isometric/Car2.shape ./Map/Isometric/Factory.shape ./Map/Isometric/FootBridge.shape ./Map/Isometric/OneWay.shape ./Map/Isometric/RedCar.shape ./Map/Isometric/Roof1.shape ./Map/Isometric/Train1.shape ./Map/Isometric/Train2.shape ./Map/Isometric/Tree1.shape ./network/dat_external.shape ./network/diskette.shape ./network/laptop.shape ./network/mobile_phone.shape ./network/monitor.shape ./network/pc_bigtower.shape ./network/pc_desktop.shape ./network/pc_miditower.shape ./network/pc_minitower.shape ./network/router-symbol.shape ./network/speaker.shape ./network/speaker_amp.shape ./network/switch-atm-symbol.shape ./network/switch-symbol.shape ./network/telephone.shape ./network/workstation.shape ./network/zip-disk.shape
Removing PATCH keyword as all current patches are applied.
My Isometric Map shapes are finished and should not be changed with the possible exception of the Footbridge shape where I seem to have forgotten to allow the foreground colour to be changed. There might be some improvements small that could be made to the Network shapes but they cotian more than two colours and i think bug 169107 is the best way to work with those characteristics. Please take a look at the network shapes and let me know what you think. In the meantime I'll see about making a patch for the Civil shapes and the Isometric Map Footbridge (or I might just go home and eat dinner instead).
Created attachment 38321 [details] [review] Patch to clean up Footbridge, various Civil shapes, and laptop in network shapes
Created attachment 38323 [details] [review] add laptop to network sheet Fixed Footbridge Fixed up various Civil shapes (a "convert group to Path" feature in Dia would've helped) Fixed up the Laptop shape in Network Laptop shape I created years ago never got added to the network sheet. I cleaned it up to work nicely with background and foreground. (Normally it looks a bit like my old Dell laptop but if you invert the colours it looks a lot more like an apple Powerbook, which worked out even better than I planned) Depending on what you think of the network sheet these last patches should be enough to close this bug. (Now I'm definately going home for food)
Applied the color fixes. Please in the future when making a patch on top of one that's already applied make sure it's incremental, or patch will complain. This one I could sort out by hand, code patches are not so easy. The laptop is already in the, called Laptop PC. Which is of course a snap at Mac users, but hey. Of the network shapes, the following IMHO could use default colors: WAN connection WAN link mobile telephony cell Odd. Some of the Assorted shapes still have #000000, but use foreground colors right.
Sorry about the bad patches, now that I'm getting a bit more practice I hope that will happen less often (and hopefully not at all). Wan connection works fine (or worked correctly in Dia 0.94. flash.shape from CVS looks fine to me) Wan Link doesn't. (not even sure which shape file this is in, having difficulty finding it) I wasn't sure if Mobile Telephony Cell should be filled, it is currently empty but if you want it, I'll change it.
Comment on attachment 38323 [details] [review] add laptop to network sheet It is there since almost two years (or am I missing something?): http://cvs.gnome.org/viewcvs/dia/sheets/network.sheet.in?r1=1.4&r2=1.5
Comment on attachment 38321 [details] [review] Patch to clean up Footbridge, various Civil shapes, and laptop in network shapes If this isn't alread applied it needs work to apply cleanly. (The first change already is in cvs)
*** Bug 306186 has been marked as a duplicate of this bug. ***
Just checked with current cvs. All assorted shapes respect the color settings now. If there are remaining issues discussed here separate bug reports should be filled for them.