gEDA-dev: Darker grid color when zoomed out

a r nbs.public at gmail.com
Sat Jan 26 11:08:07 EST 2008


Hi,

I'm getting "Tried to get an invalid color: 22" messages when running
gschem 1.3.1 (and libgeda) with your patch.

How about a major/minor grid with two different colors? See the
attached patch for the x_grid.c file. Note that this patch is for
illustrating the idea only. It was not tested with variable grid sizes
and is using hard-coded parameters (minor grid color is a net color,
grid spacing is fixed to 2x/16x of the snap spacing).

Cheers,

-r.


On Jan 26, 2008 2:40 PM, Tomaž Šolc <tomaz.solc at tablix.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi guys
>
> I finally had some time to do some electronic design again and hack on
> gschem. Since I'm just learning to use git I made a small patch to try
> it out.
>
> This patch defines a new color "grid-blend-color" which is a darker or
> lighter variant of the "grid-color" (depending on the color used for
> background). This color is used for drawing the grid when grid is in
> fixed mode and distance between grid points falls bellow the number of
> screen pixels specified in "w_current->grid_fixed_blend_threshold".
>
> The end result is that the schematic is a bit more readable when zoomed
> out and grid points are still well visible when zoomed in. This is
> basically a primitive simulation of rendering grid points that are less
> than one pixel in diameter.
>
> I submitted it to sf.net tracker in case anyone else finds it useful. I
> guess it won't be necessary once gschem gets support for cairo.
>
> http://sourceforge.net/tracker/index.php?func=detail&aid=1880298&group_id=161080&atid=818428
>
> When I made this patch I also noticed the weird way colors are set via
> Scheme functions. Is there a reason why for example Scheme functions for
> defining colors must have the "DO NOT CHANGE" index parameter? Why
> couldn't this parameter be set to a constant value for each function
> call in g_rc.c?
>
> Best regards
> Tomaz
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHm0ZusAlAlRhL9q8RAgFFAJ4sV16ly9cfxU7euBxJq6pqvT82tQCfQIkX
> pMl/BPy6rpukQUWUjMlnEdE=
> =sV0p
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> geda-dev mailing list
> geda-dev at moria.seul.org
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x_grid.diff
Type: text/x-patch
Size: 1965 bytes
Desc: not available
Url : http://www.seul.org/pipermail/geda-dev/attachments/20080126/de46b5a8/attachment.bin 


More information about the geda-dev mailing list