kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #36056
Re: eeschema GAL renderer (with old tools)
Le 01/06/2018 à 22:39, Tomasz Wlostowski a écrit :
> On 28/05/18 23:43, Tomasz Wlostowski wrote:
>> Hi all,
>>
>> This is to inform that I'm working on it (as the XOR-based rendering
>> doesn't work under GTK3). I wrote a hacked GAL canvas which uses the
>> legacy eeschema tool code. It's non-functional yet (editing-wise), but
>> draws the schematics and the selection rectangles.
>>
>> I'll publish the code as soon as it is in usable state.
>>
> Hi again,
>
> I've uploaded a more-or-less functional version of GALified eeschema to
> my github [1]. Note it only has new canvas, but old tools (hacked to
> work with different rendering model). Currently only the schematic
> editor is GALified, the viewer/library editor as well as all preview
> panels in various dialogs still use the old renderer.
>
> Have a look if you have time and report bugs (I know the colors are
> somewhat incorrect and pin labels are sometimes at wrong positions).
>
> Since we are at it: could someone of our senior devs explain why the
> library editor view has inverted Y axis wrs to all other Kicad applications?
Symbols in library use the usual Y axis mathematical orientation (bottom to top)
The reason is these coordinates are *not* draw coordinates, and can use the mathematical Y axis
orientation.
Draw coordinates use the top to bottom Y axis because when Kicad was started, it was the "normal"
axis convention in graphic libraries (only a very few were available and only one multi-platform)
There is no draw coordinates stored in symbols, because symbol are not stored in the schematic.
Because symbols (in schematic) can be mirrored and rotated, instead of storing draw coordinates
(that was not possible), a much better way is used: each symbol in schematic use a transform matrix,
that takes in account the rotation and the mirroring (and at no cost the inverted Y *draw axis*).
each draw coordinate (that cannot be stored) is computed on the fly using the symbol library
coordinate, transformed by the rot/mirror matrix and a translation.
Because only mirror and 90 deg rot are allowed, the matrix coefficients are only -1, 0, +1, and the
transform is very cheap.
Of course this is not the case for other rotation angles (especially in Pcbnew).
Other schematic items (wires ... ) use the Draw Y axis orientation because the available graphic
library (existing in 1992 / 1994 ) was using this orientation (like most of graphic applications)
You certainly cannot compare the available graphic library in 1992 and graphic libraries existing now.
>
> Cheers,
> Tom
>
> [1] https://github.com/twlostow/kicad-dev/tree/tom-eeschema-gal
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
--
Jean-Pierre CHARRAS
References